如下图所示,打开tomcat\conf\server.xml文件,进行如下配置:
?注意:需要将申请的tomcat版本的ssl认证文件,如server.jks存放到tomcat\conf\ssl_file\目录下。
<Connector port="10086" protocol="HTTP/1.1" connectionTimeout="60000" URIEncoding="UTF-8" maxPostSize="-1"
maxParameterCount="-1" maxHttpHeaderSize="102400" redirectPort="8443"
scheme="https" secure="true" SSLEnabled="true" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2"
keystoreFile="/conf/ssl_file/server.jks" keystorePass="test123456"
truststoreFile="/conf/ssl_file/server.jks" truststorePass="test123456"
clientAuth="false" truststoreType="jks"/>
?nginx配置TLSv1.2版本示例如下:
{
server_name xxx.xxx.com;
listen 443;
ssl on;
access_log /logs/nginx/xxx.xxx.com_access.log main;
error_log /logs/nginx/xxx.xxx.com_error.log;
ssl_certificate /opt/nginx/ssl/xxx.xxx.com.pem; # 公钥证书
ssl_certificate_key /opt/nginx/ssl/xxx.xxx.com.key; # 私钥证书
ssl_session_timeout 5m; # 客户端能够重用会话缓存中ssl参数的过期时间
# 指定支持的协议,这里可以配置TLSv1 TLSv1.1 TLSv1.2, 如果只写1.2表示仅支持1.2. 注:OpenSSL版本要求 >= 1.0.1
ssl_protocols TLSv1.2;
# 加密套件,多个之间用冒号分隔,前有感叹号的表示必须废弃
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
# 设置协商加密算法,优先使用服务端定义的加密套件
ssl_prefer_server_ciphers on;
}
参照:TestSSLServer4.exe工具使用方法简单介绍(查SSL的加密版本SSL3或是TLS1.2)-CSDN博客
?工具下载见:https://download.csdn.net/download/XiaoXiao_RenHe/88666191