OpenSSL: Difference between revisions

From DN Wiki
Jump to navigation Jump to search
(Created page with "Category:Network Category:Software <div style="float:right;">__TOC__</div> Using OpenSSL to check and manipulate certs. == TITLE == Check the key. openssl rsa -in MY...")
 
No edit summary
Line 3: Line 3:
Using OpenSSL to check and manipulate certs.
Using OpenSSL to check and manipulate certs.


== TITLE ==
== 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.
Check the key.
  openssl rsa -in MY_CERT.key -check
  openssl rsa -in MY_CERT.key -check

Revision as of 14:46, 13 November 2020

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