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
Bookmark/Search this post with
Thanks
This was helpful!