Skip to content

Commit 814147c

Browse files
committed
TLS defaults changed for Servers built with OpenSSL.
1 parent c64f291 commit 814147c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/com/mysql/jdbc/ExportControlled.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
33
44
The MySQL Connector/J is licensed under the terms of the GPLv2
55
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
@@ -115,7 +115,8 @@ protected static void transformSocketToSSLSocket(MysqlIO mysqlIO) throws SQLExce
115115
String enabledTLSProtocols = mysqlIO.connection.getEnabledTLSProtocols();
116116
if (enabledTLSProtocols != null && enabledTLSProtocols.length() > 0) {
117117
tryProtocols = enabledTLSProtocols.split("\\s*,\\s*");
118-
} else if (mysqlIO.versionMeetsMinimum(8, 0, 4) || mysqlIO.versionMeetsMinimum(5, 6, 0) && Util.isEnterpriseEdition(mysqlIO.getServerVersion())) {
118+
} else if (mysqlIO.versionMeetsMinimum(5, 7, 28) || mysqlIO.versionMeetsMinimum(5, 6, 46) && !mysqlIO.versionMeetsMinimum(5, 7, 0)
119+
|| mysqlIO.versionMeetsMinimum(5, 6, 0) && Util.isEnterpriseEdition(mysqlIO.getServerVersion())) {
119120
// allow all known TLS versions for this subset of server versions by default
120121
tryProtocols = TLS_PROTOCOLS;
121122
} else {

0 commit comments

Comments
 (0)