Comment 14 for bug 1482924

Revision history for this message
Nathan Bryant (nrb) wrote :

JDK6 is not working as expected. See my test programs above posted in previous comments.

Actual result:

---
$ java -version
java version "1.6.0_36"
OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu2~ppa2~snapshot20150911020748)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
$ java TLSVersions
java.vendor java.version proto enabledProtocols
Sun Microsystems Inc. 1.6.0_36 TLSv1.2 java.security.NoSuchAlgorithmException: TLSv1.2 SSLContext not available
Sun Microsystems Inc. 1.6.0_36 TLSv1.1 TLSv1,TLSv1.1
Sun Microsystems Inc. 1.6.0_36 TLSv1 TLSv1
Sun Microsystems Inc. 1.6.0_36 TLS TLSv1
Sun Microsystems Inc. 1.6.0_36 SSL TLSv1
---

Expected result:

---
$ java TLSVersions
java.vendor java.version proto enabledProtocols
Sun Microsystems Inc. 1.6.0_36 TLSv1.2 java.security.NoSuchAlgorithmException: TLSv1.2 SSLContext not available
Sun Microsystems Inc. 1.6.0_36 TLSv1.1 TLSv1,TLSv1.1
Sun Microsystems Inc. 1.6.0_36 TLSv1 TLSv1
Sun Microsystems Inc. 1.6.0_36 TLS TLSv1,TLSv1.1
Sun Microsystems Inc. 1.6.0_36 SSL TLSv1
---

A failure to connect result can also be seen if you take TLSSimple.java and edit socketFactory.createSocket( "www.google.com"... to point to some server that has TLSv1.0 entirely disabled. The point is that SSLContext.getInstance( "TLS" ) should return a context that supports a v1.1 hello because SSLContext.getInstance( "TLS" ) is not version-specific and should return a default instance. This is the approach that JDK7 has taken.