How do I import a certificate chain and it's certificate into a java keystore?
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 - certificat开发者_如何学Goe private key
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
精彩评论