- Enable tls1.2 support via system parameter
1
$ java -Djdk.tls.client.protocols=TLSv1.2
- Enable tls1.2 support via JAVA_OPTS
1
$ java -Djdk.tls.client.protocols=TLSv1.2
1
$ JAVA_OPTS=$JAVA_OPTS -Djdk.tls.client.protocols=TLSv1.2
- Via SSLContext
1
2
3
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
SSLContext.setDefault(sslContext);