Could not find a valid certification path

I created a certificate on my system using the following command:

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

      

I imported this certificate into the cacerts of the new system using the command:

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.

      

But still I get the link when I run my jar file on a new system ... Where did I go wrong ??

+3


source to share


1 answer


Try reading Apache Tomcat SSL Configuration Guide .

In the Edit Tomcat configuration file , explain that you can have an attribute keystoreFile

for the connector configuration.



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

      

0


source







All Articles