2012-04-09 220 views
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文件時,仍然出現link錯誤...我錯了哪裏?

+0

並且您是否在您的tomcat中正確添加了證書配置?你可以告訴我關於ssl的tomcat server.xml嗎? – linuxeasy 2012-04-09 11:48:43

+0

http://stackoverflow.com/questions/2290570/pkix-path-building-failed-while-making-ssl-connection此鏈接可能會幫助您 – linuxeasy 2012-04-09 11:52:05

+0

[鏈接](http://pastie.org/3755116)..這是在我的系統(服務器) – user10101 2012-04-09 11:52:22

回答

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"/>