Skip to content

Instantly share code, notes, and snippets.

@BarDev
Created October 21, 2019 13:37
Show Gist options
  • Save BarDev/a73fcdcc5182d19d9fbc8a6a447cfd8e to your computer and use it in GitHub Desktop.
Save BarDev/a73fcdcc5182d19d9fbc8a6a447cfd8e to your computer and use it in GitHub Desktop.
All Things Certs

All Things Certs

View x509 Certificate (SSL)

openssl x509 -in certificate.crt -text -noout

View a PKCS#12 file (.pfx or .p12)

openssl pkcs12 -info -in keyStore.p12

Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM

openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes

Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

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