我已使用以下命令在系统中创建了一个证书:
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 错误...我哪里出错了?
最佳答案
尝试阅读 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"/>
关于java - 无法找到有效的认证路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10072638/