Skip to content

Commit

Permalink
Fix setEnabledSSL(Protocols|Ciphers)
Browse files Browse the repository at this point in the history
- this commit fixes issue SMACK-712
- problem caused by opening input/ output stream before setting ssl parameters to SSLSession
- problem fixed by changing order of this operations
  • Loading branch information
Tomas Nosek committed Feb 10, 2016
1 parent 263578f commit 25b7db0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -742,12 +742,12 @@ else if (keyStoreType != null){
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
host, plain.getPort(), true);
// Initialize the reader and writer with the new secured version
initReaderAndWriter();

final SSLSocket sslSocket = (SSLSocket) socket;
TLSUtils.setEnabledProtocolsAndCiphers(sslSocket, config.getEnabledSSLProtocols(), config.getEnabledSSLCiphers());

// Initialize the reader and writer with the new secured version
initReaderAndWriter();
// Proceed to do the handshake
sslSocket.startHandshake();

Expand Down

0 comments on commit 25b7db0

Please sign in to comment.