Created
March 13, 2018 20:26
-
-
Save deekayen/e60a7e06d478965c49c02c083aa632a8 to your computer and use it in GitHub Desktop.
Generate a multi subdomain-wildcard CSR.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > csr_details.txt <<-EOF | |
[req] | |
default_bits = 3072 | |
prompt = no | |
default_md = sha256 | |
req_extensions = req_ext | |
distinguished_name = dn | |
[ dn ] | |
C=US | |
ST=Georgia | |
L=Somewhere | |
O=Online | |
CN = *.deekayen.net | |
[ req_ext ] | |
subjectAltName = @alt_names | |
[ alt_names ] | |
DNS.1 = *.deekayen.net | |
DNS.2 = deekayen.net | |
DNS.3 = *.*.deekayen.net | |
EOF | |
# Let’s call openssl now by piping the newly created file in | |
openssl req -new -sha256 -nodes -out \*.deekayen.net.csr -newkey rsa:3072 -keyout \*.deekayen.net.key -config <( cat csr_details.txt ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment