mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-10 07:01:21 +00:00
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:
@@ -87,11 +87,9 @@ public class MySQLAuthenticationProviderModule implements Module {
|
|||||||
MySQLSSLMode sslMode = environment.getMySQLSSLMode();
|
MySQLSSLMode sslMode = environment.getMySQLSSLMode();
|
||||||
driverProperties.setProperty("sslMode", sslMode.getDriverValue());
|
driverProperties.setProperty("sslMode", sslMode.getDriverValue());
|
||||||
|
|
||||||
// Set legacy properties
|
// For compatibility, set legacy useSSL property when SSL is disabled.
|
||||||
if (sslMode == MySQLSSLMode.DISABLED)
|
if (sslMode == MySQLSSLMode.DISABLED)
|
||||||
driverProperties.setProperty("useSSL", "false");
|
driverProperties.setProperty("useSSL", "false");
|
||||||
else
|
|
||||||
driverProperties.setProperty("useSSL", "true");
|
|
||||||
|
|
||||||
// Check other SSL settings and set as required
|
// Check other SSL settings and set as required
|
||||||
File trustStore = environment.getMySQLSSLTrustStore();
|
File trustStore = environment.getMySQLSSLTrustStore();
|
||||||
|
Reference in New Issue
Block a user