I am trying to implement SSL in tomcat 8 first time.
I have third party signed X.509 certificate in the form of .pem file.
However after configuration when I try to start tomcat, it is giving me following error:
22-Nov-2017 18:48:01.735 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-8443"] 22-Nov-2017 18:48:01.897 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["https-jsse-nio-8443"] java.lang.IllegalArgumentException: java.io.IOException: Alias name [null] does not identify a key entry at ...
Following are the steps I have followed:
- Renamed certificate.pem to certificate.p7b.
- Applied following command to inport certificate into keystore:
D:\keytest2>keytool -import -alias tomcat -trustcacerts -file certificate.p7b -keystore keystore.kdb
Enter keystore password: test
Re-enter new password: test
...
...
Certificate was added to keystore
- Checked imported certificate:
D:\keytest2>keytool -list -v -keystore keystore.kd
Which gives me following outout:
Keystore type: JKS Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat Creation date: Nov 22, 2017 Entry type: trustedCertEntry ... ...
Tomcat Configuration:
<Connector port="8443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="file:///D:/keytest2/keystore.kdb" keystorePass="test"
clientAuth="false" sslProtocol="TLS">
Please guide me where I am doing wrong.