简体   繁体   English

如何在本地Tomcat中启用TLS 1.2?

[英]How to enable TLS 1.2 in local Tomcat?

I am trying to enable TLS 1.2 in application side because the database server and the database instance now supports TLS 1.2 so I have to be align with that from the application side. 我试图在应用程序端启用TLS 1.2,因为数据库服务器和数据库实例现在支持TLS 1.2,因此我必须与应用程序端的协议保持一致。 I've added a property sslEnabledProtocols=”TLSv1.2” in the server.xml file which is inside the server folder in my STS IDE. 我在STS IDE的服务器文件夹内的server.xml文件中添加了属性sslEnabledProtocols=”TLSv1.2” I also have the mssql-jdbc 6.4.0 jar and I am using JDK 7 with Tomcat 7. For some reason I am getting C:\\Users\\myName/.keystore due to C:\\Users\\ssadat\\.keystore (The system cannot find the file specified) exception. 我也有mssql-jdbc 6.4.0 jar,并且我将JDK 7与Tomcat 7配合使用。 C:\\Users\\myName/.keystore due to C:\\Users\\ssadat\\.keystore (The system cannot find the file specified)某种原因,我得到了C:\\Users\\myName/.keystore due to C:\\Users\\ssadat\\.keystore (The system cannot find the file specified)异常。 I am not sure what else is missing. 我不确定还缺少什么。

Server.xml 在server.xml

在此处输入图片说明

Stacktrace 堆栈跟踪 在此处输入图片说明

To enable TLS , you need to give the details of the certificate which it will search in a keystone. 要启用TLS,您需要提供将在梯形图中搜索的证书的详细信息。 By default it's searching in your home directory for a keystore folder. 默认情况下,它在主目录中搜索密钥库文件夹。 So you should create a keystore, generate certificate and configure it's path in server.xml file 因此,您应该创建一个密钥库,生成证书并在server.xml文件中配置它的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM