- Convert key and cert to a single pkcs12 format.
openssl pkcs12 -export -inkey <pathto>/key.txt -in <pathto>/cert.txt -out cert.pkcs12
- Remove existing tomcat aliased PrivateKeyEntry from cacerts.
keytool -delete -alias tomcat -keystore <pathto>/cacerts
- Use java-1.6 keytools to import PKCS12 keystoretype into existing cacerts keystore file.
keytool -importkeystore -destkeystore cacerts -srckeystore cert.pkcs12 -srcstoretype PKCS12
- Note the alias of the newly imported PrivateKeyEntry, which would normally be 1.
keytool -list -keystore <pathto>/cacerts | grep PrivateKeyEntry
- Change the alias to tomcat.
keytool -changealias -alias 1 -destalias tomcat -keystore <pathto>/cacerts
Importing existing SSL key and certificate for tomcat
Submitted by sandip on Fri, 07/25/2008 - 16:50
»
- sandip's blog
- Login or register to post comments
Thanks
This was helpful!