How to extract key and cert from pfx

In this article let’s discuss about How to extract key and cert from pfx. Let’s go through the following methods without any delay.

Method 1:

# enter password and pass phrase used to encrypt when prompted
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [cert_encr.key]
openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [cert.crt]
# decrypt the key file
openssl rsa -in [cert_encr.key] -out [cert.key]

Hope the above solution works.

Realted Posts : Font manger for arch