I'd like to use TLS/TLSv1.2 for an ssl context:
SSLContext context = SSLContext.getInstance("TLSv1.2");
context.init(new KeyManager[] { km }, new TrustManager[] { new MyTrustStore(keyStore) }, new SecureRandom());
System.out.println("PROTOCOL: "+SSLContext.getDefault().getSupportedSSLParameters().getProtocols()[0]);
We're using custom Truststores and keymanagers, just ignore that here, but we do need those.
Now this prints "SSLv2Hello" every time.
I have tried both
SSLContext context = SSLContext.getInstance("TLSv1.2");
and
SSLContext context = SSLContext.getInstance("TLS");
And neither worked.
For reference this runs on JDK 1.8.0_171
Thank you for your help