Converting .jks to p12

Matrix picture Matrix · May 17, 2010 · Viewed 90.6k times · Source

How can I convert a .jks file to p12. jks is a java key store file so how can I convert it to the p12 format?

Answer

Daniel Silveira picture Daniel Silveira · Jun 16, 2010

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