How do I import an existing Java keystore (.jks) file into a Java installation?

Ok, so here was my process: keytool -list -v -keystore permanent.jks – got me the alias. keytool -export -alias alias_name -file certificate_name -keystore permanent.jks – got me the certificate to import. Then I could import it with the keytool: keytool -import -alias alias_name -file certificate_name -keystore keystore location As @Christian Bongiorno says the alias can’t … Read more

Converting .jks to p12

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 \ -deststorepass mysecret \ -srcalias myalias \ -destalias myalias \ -srckeypass mykeypass \ -destkeypass mykeypass \ -noprompt from A few frequently used SSL commands

How to import an existing X.509 certificate and private key in Java keystore to use in SSL?

I used the following two steps which I found in the comments/posts linked in the other answers: Step one: Convert the x.509 cert and key to a pkcs12 file openssl pkcs12 -export -in server.crt -inkey server.key \ -out server.p12 -name [some-alias] \ -CAfile ca.crt -caname root Note: Make sure you put a password on the … Read more

Difference between .keystore file and .jks file

Ultimately, .keystore and .jks are just file extensions: it’s up to you to name your files sensibly. Some application use a keystore file stored in $HOME/.keystore: it’s usually implied that it’s a JKS file, since JKS is the default keystore type in the Sun/Oracle Java security provider. Not everyone uses the .jks extension for JKS … Read more