GUACAMOLE-728: Merge workaround for legacy Connector/J SSL behavior.

Older versions of the MySQL / MariaDB driver do not support the same level of granular SSL/TLS control, and the legacy "useSSL" parameter cannot be specified without breaking the behavior of "sslMode".
This commit is contained in:
Mike Jumper
2020-06-25 17:54:36 -07:00
committed by GitHub

View File

@@ -87,11 +87,9 @@ public class MySQLAuthenticationProviderModule implements Module {
MySQLSSLMode sslMode = environment.getMySQLSSLMode();
driverProperties.setProperty("sslMode", sslMode.getDriverValue());
// Set legacy properties
// For compatibility, set legacy useSSL property when SSL is disabled.
if (sslMode == MySQLSSLMode.DISABLED)
driverProperties.setProperty("useSSL", "false");
else
driverProperties.setProperty("useSSL", "true");
// Check other SSL settings and set as required
File trustStore = environment.getMySQLSSLTrustStore();