Extracting private key from .cer to .pem with openssl
-
06-09-2019 - |
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?
(source: flickr.com)
(source: flickr.com)
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