Skip to content

Instantly share code, notes, and snippets.

@sengupta-saikat
Created August 21, 2023 05:05
Show Gist options
  • Save sengupta-saikat/2d2fc10d3c70cdc094df497f46f80490 to your computer and use it in GitHub Desktop.
Save sengupta-saikat/2d2fc10d3c70cdc094df497f46f80490 to your computer and use it in GitHub Desktop.
Extract Cert and Key from PFX
  • Extract the CA certs only: openssl pkcs12 -in mtf.pfx -out ca_certs.pem -cacerts -nokeys

  • Extract the Client certs only: openssl pkcs12 -in mtf.pfx -out client_certs.pem -clcerts -nokeys

  • Extract Private Key Only: openssl pkcs12 -in mtf.pfx -nocerts -out private.key -nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment