12/08/2024

Extracting crt and key from pfx file using openssl

Because I allways forget this, here ist how to do it.

Extract the Key and Cert

openssl pkcs12 -in pfxfile.pfx -nocerts -out keyfile.key -passin pass:pfxpassword -passout pass:newpassword

openssl pkcs12 -in pfxfile.pfx -clcerts -nokeys -out certfile.crt -passin pass:pfxpassword -passout pass:newpassword