Skip to content

Instantly share code, notes, and snippets.

@artbikes
Forked from neonexus/OpenSSL Commands.md
Last active August 29, 2015 14:07
Show Gist options
  • Save artbikes/fc9d848660707765c57e to your computer and use it in GitHub Desktop.
Save artbikes/fc9d848660707765c57e to your computer and use it in GitHub Desktop.

Generate KEY and CSR:

openssl req -new -newkey rsa:2048 -nodes -keyout DOMAIN.key -out DOMAIN.csr

Echo the KEY in PEM format:

openssl rsa -in DOMAIN.key -outform PEM

Echo the CRT in PEM format:

openssl x509 -inform PEM -in DOMAIN.crt

Echo the CA CERTIFICATE CHAIN in PEM format:

(openssl x509 -inform PEM -in COMODORSADomainValidationSecureServerCA.crt; openssl x509 -inform PEM -in COMODORSAAddTrustCA.crt; openssl x509 -inform PEM -in AddTrustExternalCARoot.crt)

Echo the FULL CERTIFICATE CHAIN in PEM format:

(openssl x509 -inform PEM -in DOMAIN.crt; openssl x509 -inform PEM -in COMODORSADomainValidationSecureServerCA.crt; openssl x509 -inform PEM -in COMODORSAAddTrustCA.crt; openssl x509 -inform PEM -in AddTrustExternalCARoot.crt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment