Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using keytool with Bouncy Castle PKCS12 keystore

843811Apr 15 2003 — edited Jan 26 2005
Hi, hope someone can help.

I'm trying to create a keystore and import an X.509 v3 certificate into it.
c:\j2sdk1.4.1_02\bin\keytool -import -alias myCert
   -file base64.cer -storetype PKCS12 
   -provider org.bouncycastle.jce.provider.BouncyCastleProvider 
   -keystore myKeystore -storepass password
The reason I'm using this type of keystore is simply because it is the type expected by the program I am trying to run, which is:

org.bouncycastle.mail.smime.examples.CreateEncryptedMail

The output I get from keytool (after displaying my certificate) is:

Trust this certificate? [no]: yes
Certificate was added to keystore
keytool error: java.io.IOException: PKCS 12 storing not implemented

This is a surprise to me as the Bouncy Castle documentation states:

"The third is a PKCS12 compatabile keystore. PKCS12 provides a slightly different situation from the regular key store, the keystore password is currently the only password used for storing keys. Otherwise it supports all the functionality required for it to be used with the keytool."

So my questions are, am I doing something wrong, and if so, what?

Thanks



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2005
Added on Apr 15 2003
4 comments
7,106 views