Possible duplicate:
SSL confirmation warning: unrecognized_name error since updating to Java version 1.7.0
My J2SE application uses HttpsUrlConnection to access a secure location. It worked very well until I upgraded the JRE to 1.7. Now I get the message "Remote host of a closed connection during a handshake" SSLException. After starting the application using -Djavax.net.debug = ssl: a handshake in both JRE 1.6 and JRE 1.7, it seems to me that until 1.7 the cached client session does not resume.
UPDATE : I realized that in JRE 1.6, my client application uses SSLv2Hello encapsulation. However, this is not done in accordance with JRE 1.7, which is most likely the cause of the exception. My question is this: how do I enable SSLv2Hello encapsulation for clients running JRE 1.7?
UPDATE # 2 : SSLv2Hello runs on JRE 7 through System.setProperty ("https.protocols", "TLSv1, SSLv2Hello"). However, this did not exclude the exclusion of a handshake. It turns out that the true reason for the exception is a set of ciphers. On JRE 6, the server selects SSL_RSA_WITH_RC4_128_MD5 from the client options, while on JRE 7 it always goes with TLS_DHE_RSA_WITH_AES_128_CBC_SHA. For some reason, the server cannot resume cached sessions using TLS_DHE_RSA_WITH_AES_128_CBC_SHA. The problem is fixed using System.setProperty ("https.cipherSuites", presumably CipherSuites), where suggested CipherSuites always starts with SSL_RSA_WITH_RC4_128_MD5. Any flaws with this approach?
# 3:
SNI - , . . " (SNI) JSSE" http://docs.oracle.com/javase/7/docs/technotes/guides/security/enhancements7.html