简体   繁体   English

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

[英]How to create Tomcat keystore file using JAVA

How to create Tomcat keystore file using JAVA 如何使用JAVA创建Tomcat密钥库文件

I am creating a http connection to SSL enabled tomcat server but it generates error SSL Handshake failed 我正在创建与启用SSL的tomcat服务器的http连接,但它会生成错误SSL握手失败

So I want to create a keystore at runtime as i will be contacting multiple SSL enabled servers (Don't know this approach will be successfull or not) 所以我想在运行时创建密钥库,因为我将联系多个启用SSL的服务器(不知道这种方法是否成功)

Please suggest a way to how to create a tomcat keystore file using java program or any other way to bypass SSL handshake 请提出一种使用Java程序或其他任何绕过SSL握手方式创建tomcat密钥库文件的方法

Where are you getting sslhandshake error exactly? 您到底在哪里收到sslhandshake错误? While client wants to connect to tomcat server or while tomcat server is trying to connect to other servers for some purpose? 当客户端想要连接到tomcat服务器时,还是当tomcat服务器出于某种目的而尝试连接到其他服务器时? 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. 无论哪种情况,在服务器上以编程方式创建密钥库都没有任何意义,但是可以检查Java的密钥工具源代码以在密钥库上播放。

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

Look at the How-To guide SSL configuration on Tomcat's official site 在Tomcat的官方网站上查看如何指导SSL配置

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

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

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