Skip to content

Instantly share code, notes, and snippets.

@pereirinha
Last active January 7, 2018 16:11
Show Gist options
  • Save pereirinha/827da56bc35d27d08e7deddcb8228763 to your computer and use it in GitHub Desktop.
Save pereirinha/827da56bc35d27d08e7deddcb8228763 to your computer and use it in GitHub Desktop.
Local certificate
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout ssl/domain.com.key \
-new \
-out ssl/domain.com.crt \
-subj /CN=domain.com \
-reqexts SAN \
-extensions SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:domain.com')) \
-sha256 \
-days 3650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment