Tomcat SSL: no trusted certificate found

I created a certificate using keytool:

keytool -genkey -alias tomcat -keyalg RSA

Exported and imported to my keystore:

keytool -export -alias tomcat name.crt
keytool -import -file name.crt

When I do keytool -list, I have 2 entries:

tomcat, Sept 15, 2010, keyEntry,
Certificate fingerprint (MD5): ...
mykey, Sept 17, 2010, trustedCertEntry
Certificate fingerprint (MD5):...

Please note that the fingerprints for both entries are the same.

I configured my server.xml file to my .keystore file

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
       maxThreads="150" scheme="https" secure="true"
       keystoreFile="${user.home}/.keystore" keystorePass="changeit"
       clientAuth="false" sslProtocol="TLS" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="443" />

But in my tomcat logs, I see when I execute an action in my Java application:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
...
sun.security.validator.ValidatorException: No trusted certificate found

Is there any other configuration that needs to be done?

+3
source share
1 answer

You need a client (i.e. browser) to trust your server certificates.

, . , , .

.

Update:

, , . , java- webapp https. ?

"truststore", , . Property javax.net.ssl.trustStore .

, HandManager TrustManager. , , : http://download.oracle.com/javase/1.4.2/docs/guide/security/jsse/JSSERefGuide.html

: http://stilius.net/java/java_ssl.php

+1

Source: https://habr.com/ru/post/1765518/


All Articles