0% found this document useful (0 votes)
30 views2 pages

OpenSSL Command Cheat Sheet

The document provides a series of OpenSSL commands for generating and managing SSL certificates and private keys. It includes commands for creating a Certificate Signing Request (CSR), generating self-signed certificates, converting certificate formats, and checking the validity of keys and certificates. Additionally, it covers exporting and importing PKCS12 files for secure storage of certificates and private keys.

Uploaded by

xpeh78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

OpenSSL Command Cheat Sheet

The document provides a series of OpenSSL commands for generating and managing SSL certificates and private keys. It includes commands for creating a Certificate Signing Request (CSR), generating self-signed certificates, converting certificate formats, and checking the validity of keys and certificates. Additionally, it covers exporting and importing PKCS12 files for secure storage of certificates and private keys.

Uploaded by

xpeh78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

openssl req ‐out CSR.csr ‐new ‐newkey rsa:2048 ‐nodes ‐keyout privateKey.

key

openssl req ‐x509 ‐sha256 ‐nodes ‐days 365 ‐newkey rsa:2048 ‐keyout privateKey.key ‐out certificate.crt

openssl req ‐out CSR.csr ‐key privateKey.key ‐new

openssl x509 ‐x509toreq ‐in certificate.crt ‐out CSR.csr ‐signkey privateKey.key

openssl rsa ‐in privateKey.pem ‐out newPrivateKey.pem

openssl req ‐text ‐noout ‐verify ‐in CSR.csr

openssl rsa ‐in privateKey.key ‐check

openssl x509 ‐in certificate.crt ‐text ‐noout

openssl pkcs12 ‐info ‐in keyStore.p12

openssl x509 ‐noout ‐modulus ‐in certificate.crt | openssl md5


openssl rsa ‐noout ‐modulus ‐in privateKey.key | openssl md5
openssl req ‐noout ‐modulus ‐in CSR.csr | openssl md5

openssl s_client ‐connect www.paypal.com:443

openssl x509 ‐inform der ‐in certificate.cer ‐out certificate.pem

openssl x509 ‐outform der ‐in certificate.pem ‐out certificate.der

1 of 2
openssl pkcs12 ‐in keyStore.pfx ‐out keyStore.pem ‐nodes

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

2 of 2

You might also like