Skip to content

Instantly share code, notes, and snippets.

@Anthonyzou
Created September 15, 2017 19:49
Show Gist options
  • Select an option

  • Save Anthonyzou/1ce271003742c17439d4f5eb684356a3 to your computer and use it in GitHub Desktop.

Select an option

Save Anthonyzou/1ce271003742c17439d4f5eb684356a3 to your computer and use it in GitHub Desktop.
openssl req -x509 -sha256 -newkey rsa:2048 -keyout server.key \
-out server.crt -days 36500 -nodes \
-subj "/C=CA/ST=Alberta/L=/O=Localhost/OU=Org/CN=localhost" \
-config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:localhost")) \
-reqexts SAN -extensions SAN⏎
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment