diff --git a/src/com/mysql/jdbc/ExportControlled.java b/src/com/mysql/jdbc/ExportControlled.java index c1291f1d8..b3362639a 100644 --- a/src/com/mysql/jdbc/ExportControlled.java +++ b/src/com/mysql/jdbc/ExportControlled.java @@ -89,8 +89,8 @@ protected static void transformSocketToSSLSocket(MysqlIO mysqlIO) throws SQLExce List allowedProtocols = new ArrayList(); List supportedProtocols = Arrays.asList(((SSLSocket) mysqlIO.mysqlConnection).getSupportedProtocols()); - for (String protocol : (Util.isEnterpriseEdition(mysqlIO.getServerVersion()) ? new String[] { "TLSv1.2", "TLSv1.1", "TLSv1" } : new String[] { - "TLSv1.1", "TLSv1" })) { + for (String protocol : (mysqlIO.versionMeetsMinimum(5, 6, 0) && Util.isEnterpriseEdition(mysqlIO.getServerVersion()) ? new String[] { "TLSv1.2", + "TLSv1.1", "TLSv1" } : new String[] { "TLSv1.1", "TLSv1" })) { if (supportedProtocols.contains(protocol)) { allowedProtocols.add(protocol); }