0

We're trying to configure Apache HTTPd to use an SSL cert from a JKS keystore file we have. Since we want only one of the certs out of the JKS (www.MySite.com) and not the others (such as test.MySite.com), how do we specify the correct certificate pair to export?

This is the command we're using.

keytool -importkeystore -srckeystore MyKeystore.jks -srcstoretype JKS
\ -destkeystore keystore.p12 -deststoretype PKCS12

This appears to pick one (at random?) from the JKS file to export. And not the one we want....

Forgive me if I have all this wrong, SSL is way out of my wheelhouse. Thanks for any help.

| improve this question | | | | |
1

List the certificates inside a keystore to get the alias

keytool -list -v -keystore KEYSTORE.jks

Convert a JKS file to PKCS12 format (Java 1.6.x and above)

keytool -importkeystore -srckeystore KEYSTORE.jks -destkeystore KEYSTORE.p12 \
-srcstoretype JKS -deststoretype PKCS12 -srcstorepass mysecret  \
-srcalias myalias -destalias myalias

See also: http://shib.kuleuven.be/docs/ssl_commands.shtml

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.