openssl question
I have an application certificate requested from mitcerts in pkcs12 format. I'm now being asked for the public key of that cert, base64 encoded... is there some command to extract that with openssl? Is there something else I would need?
- Login to post comments


Convert pkcs12 cert to base64
I would think something like the following should do the trick:
openssl pkcs12 -in mycert.pfx -out mycert.pem
openssl enc -base64 -in mycert.pem -out mycert.b64
This should convert your mycert.pfx file to mycert.b64, base64-encoded.
Thanks, I also got a tip from
Thanks, I also got a tip from someone else, who suggested:
openssl pkcs12 -in myFile.p12 -out myPublicKey.pem -clcerts -nokeys
Which also seemed to work.