Reputation: 87247
I have a wilcard certificate along with a certificate chain and private key. How do I import that into my java keystore?
certificate chain *.whatever.com - certificate private key
Upvotes: 2
Views: 6649
Reputation: 87247
I found the answer here -
You have to convert your to a PKCS12 certificate to import it with a command similar to the following.
keytool -importkeystore -deststorepass changeit -destkeypass changeit -destkeystore my-keystore.jks -srckeystore cert-and-key.p12 -srcstoretype PKCS12 -srcstorepass cert-and-key-password -alias 1
To convert from PEM to PKCS12 use the following command.
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
Upvotes: 2