3

我使用以下命令在我的系统中创建了一个证书:

keytool -export -file test.cert -keystore test -storepass 123456 -alias sriram 
Ans: Certificate stored in file <test.cert>.

我已使用以下命令将此证书导入到新系统的 cacerts 中:

keytool -importcert -trustcacerts -file "path-to-public-cert" -keystore JAVA_HOME/jre/lib/security/cacerts".

The output is something like this:Trust this certificate? [no]: yes Certificate was added to keystore.

但是当我在新系统中运行我的 jar 文件时,我仍然收到链接错误......我哪里出错了?

4

1 回答 1

0

尝试阅读 Apache Tomcat SSL 配置方法。

编辑 Tomcat 配置文件段落中,它解释了您可以拥有keystoreFile连接器配置的属性。

<Connector 
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="${user.home}/.keystore" keystorePass="changeit"
           clientAuth="false" sslProtocol="TLS"/>
于 2012-04-09T14:35:25.030 回答