Reputation: 61
I currently have a wildcard certificate from Comodo that is currently used for Apache. I need to use this for Confluence, running on Tomcat. I tried following their instructions, but realized that I need to import the current cert using the keytool command to get it to the right format.
I currently have the following files from Comodo:
filename.ca-bundle
filename.crt
filename.key
Has anyone been able to convert the certificate to work on Tomcat and if so, can you point to the documentation used? Thanks!
Upvotes: 0
Views: 2067
Reputation: 61
I figured it out. Need to convert to PKCS12, then to JKS.
To convert to PKCS12:
openssl pkcs12 -export -in <filename.crt> -inkey <filename.key> -out <filename.pkcs12> -name tomcat -CAfile <filename.ca-bundle> -caname root
Make note of the password entered as you will need it for the next step.
To convert from PKCS12 to JKS:
./keytool -importkeystore -deststorepass <some_password> -destkeypass <some_password> -destkeystore <filename.jks> -srckeystore <filename.pkcs12> -srcstoretype PKCS12 -srcstorepass <password_entered_previously> -alias tomcat
Upvotes: 5