How to extract pfx certificate?

To extract pfx or pkcs12 certificate into key, cert and cert_chain. you would need the following openssl commands to extract them.
1. To obtain .key file out of it:

openssl pkcs12 -in keyhandedoverbycerteam.pfx -nocerts -nodes -passin pass:hwBvB6FAA6K | openssl rsa -out yourserverurlname.key

2.To obtain cert file:

openssl pkcs12 -in keyhandedoverbycerteam.pfx -clcerts -nokeys -passin pass:hwBvB6FAA6K -out yourserverurlname.crt

3. To extract cert_chain:

openssl pkcs12 -in keyhandedoverbycerteam.pfx -nokeys -passin pass:hwBvB6FAA6K -out yourserverurlname_certchain.crt

 

 

2 thoughts on “How to extract pfx certificate?

Leave a Reply

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