Convert PFX Key To Certificates
Steps
PFX_FILEPATH=input.pfx
openssl pkcs12 -in $PFX_FILEPATH -nocerts -out encrypted.private.key.crt
openssl pkcs12 -in $PFX_FILEPATH -cacerts -nokeys -chain -out ca.crt
openssl pkcs12 -in $PFX_FILEPATH -clcerts -nokeys -out site.crt
openssl rsa -in encrypted.private.key.crt -out decrypted.private.key.crt
References
- Unix & Linux - How to export CA certificate chain from PFX in PEM format without bag attributes
- markbrilman.nl - Howto convert a PFX to a seperate .key/.crt file
Last updated: 13th February 2021
First published: 1st February 2021
First published: 1st February 2021