我使用此命令在我的系统中创建了证书:
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 :(得分: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"/>