Question

How can I export the private key embedded in an .cer file and convert it to .pem using openssl.

Update:

If I download a .cer file from Apple and import it into KeyChain, I can export the private key as a .p12 file. How can I do this using openssl?

alt text
(source: flickr.com)

alt text
(source: flickr.com)

Was it helpful?

Solution

Unfortunately - the certificate does not contain the private key (it does, however contain the public key). You'll need the private key source (a .p12 usually), to extract the private key.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top