Skip to Main Content

Java Security


For appeals, questions and feedback, please email

Trouble using keystore in PKCS12 format

843811Sep 24 2008 — edited Sep 24 2008
Has anyone had much luck using a Java keystore in PKCS12 format? I work at a company where we use this format to store SSL certificates. Unfortunately keytool doesn't seem to work well with it. I have a certificate chain in DER format, and I am trying to import the file into our keystore.

keytool -import -alias aliasname -file vChain.cer -keystore keystore.p12 -storetype pkcs12
Enter keystore password:
Trust this certificate? [no]: yes
keytool error: TrustedCertEntry not supported

Is it possible to import a DER or PEM certificate into a PKCS12 keystore? I have tried using openssl to convert the certificate into PKCS12 format before importing, but that doesn't work either, because it complains about not finding a private key.

Any help would be appreciated! Thanks.
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2008
Added on Sep 24 2008