OpenSSL

From DN Wiki
Revision as of 14:46, 13 November 2020 by Dave (talk | contribs)
Jump to navigation Jump to search

Using OpenSSL to check and manipulate certs.

Convert PFX to PEM

Extract the key, then the cert, from the PFX. You'll be prompted for password.

openssl pkcs12 -in MY_CERT_AND_KEY.pfx -nocerts -out MY_CERT.key
openssl pkcs12 -in MY_CERT_AND_KEY.pfx -clcerts -nokeys -out MY_CERT.crt

Validate Something

Check the key.

openssl rsa -in MY_CERT.key -check