This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes converting jks to p12 certificate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "converting jks to p12 certificate" Watch "converting jks to p12 certificate" New topic

converting jks to p12 certificate

kona krishnakumar
Ranch Hand

Joined: Dec 03, 2011
Posts: 32
Hi All,

Please help me with below issue.

Iam converting server certs jks to pkcs12 certificate For that I had set the java path and enter the following command in command prompt.

keytool -importkeystore -srckeystore servercerts -destkeystore wallet.p12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass admin -deststorepass admin123 -srcalias -destalias -srckeypass admin -destkeypass admin123 -noprompt

I had successfully created pkcs12 certificate, but not able to check the information of certificate by using the below command

keytool -v -list -keystore wallet.p12

it is throwing following error

D:\Daytoday\oct\12102012\jks\jks>keytool -v -list -keystore wallet.p12

keytool error: Invalid keystore format Invalid keystore format

How can I confirm, whether the converted jks to p12 cert successfully or not. Kindly share your suggestions

Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 971

Since you have specified

-deststoretype PKCS12

when creating the keystore you need to specify PKCS12 when listing the content.

keytool -v -list -storetype PKCS12 -keystore wallet.p12
kona krishnakumar
Ranch Hand

Joined: Dec 03, 2011
Posts: 32
Thank you very much. It has worked.
I agree. Here's the link:
subject: converting jks to p12 certificate
Similar Threads
Unable to use JKS type - Please help
PFX file not getting imported into keystore
DER input, Integer tag error - with a pkcs12 keystore
Import .cer(public key) into .pfx