Monday, February 11, 2008

Converting keystores between JKS and P12

Johan dug up these keytool commands, that with in JDK6 and onwards (not in JDK5 and earlier).

JKS → P12
keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12

P12 → JKS
keytool -importkeystore -srckeystore keystore.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore keystore.jks

2 comments:

BKS said...

THANK YOU for posting this.....I was having all kinds of weird issues and I eventually got my cert converted to P12 and then used your info to get my store created and working.

Thanks!
Brian

Saman said...

You are awesome!! Thank you!!