Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Added Legacy SSL support
Browse files Browse the repository at this point in the history
  • Loading branch information
karimhm committed Aug 17, 2021
1 parent 524e4b1 commit e1b23af
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,12 @@ public enum SecurityMode {
* be used. If only TLS encryption is available from the server, the connection
* will fail.
*/
disabled
disabled,

/**
* Legacy SSL encryption.
*/
legacy
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,18 @@ private void connectUsingConfiguration() throws ConnectionException, IOException
break innerloop;
}
}

// Legacy SSL
if (ConnectionConfiguration.SecurityMode.legacy == config.getSecurityMode()) {
try {
proceedTLSReceived();
} catch (Exception e) {
LOGGER.finer("Could not enable SSL encryption while connecting to " + inetSocketAddress);
RemoteConnectionException<Rfc6120TcpRemoteConnectionEndpoint> rce = new RemoteConnectionException<>(
endpoint, inetAddress, e);
connectionExceptions.add(rce);
}
}
LOGGER.finer("Established TCP connection to " + inetSocketAddress);
// We found a host to connect to, return here
this.host = host;
Expand Down

0 comments on commit e1b23af

Please sign in to comment.