In my java Code i am creating one instance of SSL Context using command
SSLContext ctx = SSLContext.getInstance("TLS");
But in my tomcat server i am setting TLSv1.2 and i am getting handshake error.
How we can support all the TLS protocols using this method like in cpp we have SSLV23 client method which will support all protocols.
SSLContext ctx = SSLContext.getInstance("TLS");
- it gets worse. On Java 8 and below, you also get SSLv3. A bug report was filed with Oracle, but it was closed as "won't fix" because its by design. Also see Which Cipher Suites to enable for SSL Socket? – GaffeSSLContext.getInstance("TLSv1.2")
does not necessarily support all protocols - it depends of JVM. In my case the class configured like this cannot connect to an Apache server using TLSv1 being run on IBM JVM 1.7.0 when it can connect being run on Oracle JVM 1.7.0. – Livi