问题
Currently I am using this code which is enabling TLS 1.2:
ServerConnector httpsConnector = new ServerConnector(server,
new SslConnectionFactory(sslContextFactory, "http/1.1"),
new HttpConnectionFactory(https_config));
httpsConnector.setPort(8443);
httpsConnector.setIdleTimeout(50000)
Now I am using TLS 1.1 and want to change it to TLS 1.2.
回答1:
Java 8 is TLS/1.2 by default.
- https://blogs.oracle.com/java-platform-group/entry/java_8_will_use_tls
You can diagnose TLS in the JVM using the techniques at:
- https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https
If you want to force TLS/1.2, see the prior answer at:
How to force java server to accept only tls 1.2 and reject tls 1.0 and tls 1.1 connections
Know that the ciphers and protocols you expose in Jetty's SslContextFactory will also have an influence on your TLS support level. (For example: you can exclude the ciphers that TLS/1.0 knows about leaving no ciphers to negotiate against)
来源:https://stackoverflow.com/questions/43287071/enabling-tls-1-2-on-embedded-jetty