I am trying to consume TLSv1.2 enabled protocol web services on JRE 1.5 and facing below issue. Looks like TLSv1.2 does not supported by JRE1.5 but at the same time we cannot upgrade our target environment to a latest version of JRE. IS there any way to make this work in jdk1.5 itself?
Exception in thread "main" java.lang.IllegalArgumentException: TLSv1.2
at com.sun.net.ssl.internal.ssl.ProtocolVersion.valueOf(ProtocolVersion.java:120)
at com.sun.net.ssl.internal.ssl.ProtocolList.<init>(ProtocolList.java:36)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setEnabledProtocols(SSLSocketImpl.java:2017)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:396)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at TLSHandshake.main(TLSHandshake.java:43)
Thanks in advance
Most developer questions that end with "is it possible?" can be answered yes. The only problem may be the necessary effort and the costs...
Java is at large parts a modular architecture which means that you can implement own modules that replace and extend functionality from Java.
If you want you can implement your own networking implementation that uses a JNI part for establishing TLS 1.2 connections. The JNI part would use one of the common SSL/TLS native libraries such as OpenSSL/LibreSSL/gnutls,...).
From my understanding this would require an very experienced Java and C/C++ developer (team) for some weeks/months.
From a long term perspective using that developer (team) for migrating to Java 1.7/1.8 would make more sense.