Hi, I've noticed that some code inside *handshake()* method can be omitted. After executing the call to: *ssl.startHandshake()*, according to SSLSocket <http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSocket.html#startHandshake%28%29>javadoc, after returning from this call the negotiated handshake is complete. So the following code that tries to read bytes from the socket is useless since errors during handshake process would be thrown earlier.
Am I missing something? BR, Maxim Kirilov.