Enabling TLS-1.2 on embedded Jetty

为君一笑 提交于 2019-12-04 13:35:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!