Skip to content

Commit

Permalink
Fine tune support for TLSv1.1 and TLSv1.2 with MySQL 5.5 servers.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjssilva committed Nov 23, 2015
1 parent f2bc1a8 commit e4a0522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/mysql/jdbc/ExportControlled.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ protected static void transformSocketToSSLSocket(MysqlIO mysqlIO) throws SQLExce

List<String> allowedProtocols = new ArrayList<String>();
List<String> 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);
}
Expand Down

0 comments on commit e4a0522

Please sign in to comment.