Skip to content

Instantly share code, notes, and snippets.

@mattes
Last active November 16, 2019 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattes/4101349d109b8338a196e49a04572cfa to your computer and use it in GitHub Desktop.
Save mattes/4101349d109b8338a196e49a04572cfa to your computer and use it in GitHub Desktop.
openssl genrsa -out server-ca-key.pem 4096
openssl req -x509 -new -key server-ca-key.pem -days 1825 -out server-ca.pem -subj '/C=US/ST=California/L=Palo Alto/O=Organization/CN=Debug Root CA'
openssl genrsa -out server-key.pem 4096
openssl req -subj '/CN=*' -sha256 -new -key server-key.pem -out server.csr
echo "subjectAltName = IP:127.0.0.1" > server-extfile.cnf
openssl x509 -req -days 1825 -sha256 -in server.csr -CA server-ca.pem -CAkey server-ca-key.pem -CAcreateserial -out server.pem -extfile server-extfile.cnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment