Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save orweinberger/191b135a234c9c3ce27adcaad68e7ef5 to your computer and use it in GitHub Desktop.
Save orweinberger/191b135a234c9c3ce27adcaad68e7ef5 to your computer and use it in GitHub Desktop.
openssl req -new -sha256 -nodes -out your-new-domain.com.csr -newkey rsa:2048 -keyout your-new-domain.com.key -config <(
cat <<-EOF
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[ dn ]
C=US
ST=New York
L=Rochester
O=End Point
OU=Testing Domain
emailAddress=your-administrative-address@your-awesome-existing-domain.com
CN = www.your-new-domain.com
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = your-new-domain.com
DNS.2 = www.your-new-domain.com
EOF
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment