Skip to main content

Extract key/cert from PFX

  1.  Extract key from pfx file
    openssl pkcs12 -in /path/to/file.pfx --nocerts -out /path/to/exported.key
  2. Extract certificate from pfx file
    openssl pkcs12 -in /path/to/file.pfx -clcerts -nokeys -out /path/to/cert.crt
  3. decrypt private key if desired.
    openssl rsa -in /path/to/exported.key -out /path/to/decrypted.key