Skip to content

Instantly share code, notes, and snippets.

@cybergavin
Created October 1, 2021 02:21
Show Gist options
  • Select an option

  • Save cybergavin/4b004c5dc8bf974d5cef310adc52b8f9 to your computer and use it in GitHub Desktop.

Select an option

Save cybergavin/4b004c5dc8bf974d5cef310adc52b8f9 to your computer and use it in GitHub Desktop.
PFX to PEM
  • Extract CA Cert(s)
openssl pkcs12 -in myapp.pfx -cacerts -nokeys -out myapp-ca.crt
  • Extract Server Cert
openssl pkcs12 -in myapp.pfx -clcerts -nokeys -out myapp-server.crt
  • Create Chain Cert
cat myapp-server.crt myapp-ca.crt > myapp-chain.crt
  • Extract Private Key
openssl pkcs12 -in myapp.pfx -nocerts -out myapp.key -nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment