Posts java7 TLS 1.2
Post
Cancel

java7 TLS 1.2

  • 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);
This post is licensed under CC BY 4.0 by the author.