chillibear.com

Converting certificates

To convert a pkcs12 certificate into a pem formatted certificate and extract the key

openssl pkcs12 -clcerts -nokeys -in input-certificate.p12 -out output-certificate.pem
openssl pkcs12 -nocerts -in input-certificate.p12 -out output-key.pem

If you need to create a pkcs12 certificate from the of pem certificate and key.

openssl pkcs12 -export -out output-certificate.p12 -inkey input-key.pem -in input-certificate.pem

Written on 09 Dec 2009 and categorised in OpenSSL, tagged as pkcs12 and pem

Home, Post archive

site copyright Eric Freeman

Valid XHTML 1.0 Strict