CER/DER to PEM, extracting key from certificate

openssl commands
working with certificates

extraction key from cert(if it is allowed):

openssl pkcs12 -in CertificateWithKey.pfx -out EncryptedCertificateKEY.key

decrypting key:

openssl rsa -in EncryptedCertificateKEY.key -out UNEncryptedCertificateKEY.key

convert cer to pem:

openssl x509 -inform der -in Certificate.cer -out Certificate.pem

Leave a Reply

Your email address will not be published. Required fields are marked *