0

如何使用 JAVA 创建 Tomcat 密钥库文件

我正在创建与启用 SSL 的 tomcat 服务器的 http 连接,但它会生成错误 SSL Handshake failed

所以我想在运行时创建一个密钥库,因为我将联系多个启用 SSL 的服务器(不知道这种方法是否成功)

请提出一种如何使用 java 程序或任何其他绕过 SSL 握手的方式创建 tomcat 密钥库文件的方法

4

2 回答 2

1

Where are you getting sslhandshake error exactly? While client wants to connect to tomcat server or while tomcat server is trying to connect to other servers for some purpose? And can you paste the exception trace?

In either case, it does not make any sense to create keystore programatically in a server but one can inspect java's keytool source code to play on keystores.

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/sun/security/tools/KeyTool.java/

于 2012-11-30T01:29:23.680 回答
0

查看 Tomcat 官网的 How-To guide SSL configuration

http://tomcat.apache.org/tomcat-4.1-doc/ssl-howto.html

于 2012-08-24T09:48:52.287 回答