Skip to content

Instantly share code, notes, and snippets.

@ivankristianto
Forked from pereirinha/command
Created January 7, 2018 16:11
Show Gist options
  • Save ivankristianto/744ebbb8da745f0af563e4f673768ef5 to your computer and use it in GitHub Desktop.
Save ivankristianto/744ebbb8da745f0af563e4f673768ef5 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