Tomcat 启用TLS1.2 1.3 禁用TLS1.0 1.1

Tomcat 8.5及之后版本默认应如下,在conf/server.xm配置文件中修改如图:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig protocols="TLSv1.2,TLSv1.3" sslProtocol="TLSv1.2">   
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector 

验证检测:

1. 测试TLS1.0协议: 

   输入命令:

openssl s_client -connect www.example.com:8080 -tls1  < /dev/null

 

标红行表示使用TLS1.0协议连接不通,说明我们已经禁用了TLS1.0。

 2. 测试TLS1.2协议

     openssl s_client -connect www.example.com:443 -tls1_2 < /dev/null

     

 

      注: 表示使用TLS1.2协议连接通过,说明我们已经禁用了TLS1.2。

 

第三方评测网站

一、https://myssl.com

 

二、https://ssllabs.com/ssltest

 

参考: https://www.cnblogs.com/lsdb/p/7193291.html 

            https://www.jianshu.com/p/480e4e76f5e6





  

posted on 2022-10-19 13:44  Msea  阅读(5989)  评论(0编辑  收藏  举报

导航