Skip to content

Instantly share code, notes, and snippets.

@mvsantos
Created September 20, 2018 00:25
Show Gist options
  • Save mvsantos/3afe14815eecce106cd2260e4f4569e0 to your computer and use it in GitHub Desktop.
Save mvsantos/3afe14815eecce106cd2260e4f4569e0 to your computer and use it in GitHub Desktop.
# Generate CSR and KEY
openssl req -nodes -newkey rsa:2048 -nodes -keyout www.key -out www.csr \
-subj "/C=GB/ST=Greater London/L=London/O=Example Ltd./OU=example.com/CN=www.example.com"
openssl req -in www.csr -noout -text
openssl rsa -in www.key -noout -text
# Send CSR to certificate issuer to get a new certifificate
# Verify issued certificate: www.crt
(openssl x509 -noout -modulus -in www.crt | openssl md5; \
openssl rsa -noout -modulus -in www.key | openssl md5; \
openssl req -noout -modulus -in www.csr | openssl md5;) | uniq
cat www.crt bundle-inter-root-ca.crt > www-chained.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment