From 516b2b64128c76f7b556c1379aa4e27be651eb12 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Mon, 8 Jan 2018 08:48:21 -0500 Subject: [PATCH] Update csr.sh --- csr.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/csr.sh b/csr.sh index a5198ac..76f3aa9 100644 --- a/csr.sh +++ b/csr.sh @@ -9,29 +9,29 @@ DOMAIN="home.johnhagunt.com" for i in $HOSTNAMES; do openssl req -new -sha512 -nodes -out $i.$DOMAIN.csr -newkey rsa:4096 -keyout $i.$DOMAIN.key -config <( - cat <<-EOF - [req] - default_bits = 4096 - prompt = no - default_md = sha512 - req_extensions = req_ext - distinguished_name = dn - - [ dn ] - C=US - ST=PA - L=Pittsburgh - O=Gaunt - OU=Gaunt - emailAddress=admin@johnhgaunt.com - CN=$i.$DOMAIN - - [ req_ext ] - subjectAltName = @alt_names - - [ alt_names ] - DNS.1 = $i.$DOMAIN - DNS.2 = $i - EOF - ) +cat <<-EOF +[req] +default_bits = 4096 +prompt = no +default_md = sha512 +req_extensions = req_ext +distinguished_name = dn + +[ dn ] +C=US +ST=PA +L=Pittsburgh +O=Gaunt +OU=Gaunt +emailAddress=admin@johnhgaunt.com +CN=$i.$DOMAIN + +[ req_ext ] +subjectAltName = @alt_names + +[ alt_names ] +DNS.1 = $i.$DOMAIN +DNS.2 = $i +EOF +) done \ No newline at end of file