I created a certificate using keytool:
keytool -genkey -alias tomcat -keyalg RSA
Exported and imported it into 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):...
Note that the fingerprints for both entries are the same.
I configured my server.xml to point 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 perform an action in my Java app:
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?