Skip to content

Instantly share code, notes, and snippets.

@sadikaya
Created November 27, 2017 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadikaya/1e60e5a7307fa7b54a8a74c3d47430e6 to your computer and use it in GitHub Desktop.
Save sadikaya/1e60e5a7307fa7b54a8a74c3d47430e6 to your computer and use it in GitHub Desktop.
Converting a PFX file to PEM and Key via openssl

Export the private key

openssl pkcs12 -in certificate.pfx -out certificate.key -nocerts -nodes

Take out the encryption from the private key

openssl rsa -in certificate.key -out certificate_new.key

Export the SSL certificate

openssl pkcs12 -in certificate.pfx -out certificate.pem -nokeys -clcerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment