Harshad Ravindra Sovani wrote:
> 
> Hi all!
> 
> Is there a way to convert a certificate from pkcs12 to pkcs8 format?
> 

No since neither is a certificate format as such. PKCS#12 files can
contain certificates but PKCS#8 is for private keys only.

If you want to convert a private key contained in a PKCS#12 file to
PKCS#8 format then something like:

openssl pkcs12 -in file.p12 -nocerts -out key.pem
openssl pkcs8 -in key.pem -topk8 -out p8key.pem

should do it. Though you may need to change the options to the second
command to get the right format (PEM or DER) and encryption.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to