无法找到有效的认证路径

时间:2012-04-09 11:40:39

标签: java https war executable-jar

我使用此命令在我的系统中创建了证书:

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文件时,我仍然收到link错误...我哪里出错?

1 个答案:

答案 0 :(得分:0)

尝试阅读Apache Tomcat SSL Configuration How-To

Edit the Tomcat Configuration File段中,它解释了您可以为连接器配置提供keystoreFile属性。

<Connector 
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="${user.home}/.keystore" keystorePass="changeit"
           clientAuth="false" sslProtocol="TLS"/>