【发布时间】:2016-10-18 04:44:11
【问题描述】:
我正在尝试使用 SSL 在服务器上配置 tomcat7,因为我需要通过 https:// 发送请求
我正在执行以下步骤-:
1.Create a keystore file using Java
2.Configure Tomcat to use the keystore
我尝试使用
直接创建密钥库 keytool -genkey -alias tomcat -keyalg RSA
然后尝试访问https://[host]:8443 成功了
但是当我尝试使用 .cer 文件创建密钥库时
keytool -import -trustcacerts -alias server -file your_site_name.p7b -keystore your_site_name.jks
也用过
keytool -import -alias simple -file Example.cer -keystore exampleraystore
并尝试访问https://[host]:8443 它不起作用.. 显示“网页无法”显示“
为什么
【问题讨论】:
-
每当我使用 .p7b 文件时,它都会给出一个错误,即它不是 X509 证书。
-
所以我在第二步使用 .cer 文件创建证书
标签: java tomcat ssl certificate keystore