Skip to content

Instantly share code, notes, and snippets.

@sbryant
Created June 17, 2015 22:04
Show Gist options
  • Save sbryant/1c62b5140ba94d48bc04 to your computer and use it in GitHub Desktop.
Save sbryant/1c62b5140ba94d48bc04 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -xe
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout test-ssl.key -out test-ssl.crt -config <(
cat <<-EOF
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
CN=*.github.dev
O=GitHub Automatic Self Signed Certificate
[v3_req]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
basicConstraints = CA:TRUE
subjectAltName=DNS:github.dev
EOF
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment