From d4b863ee397e7da3e64b1c1aa486c33f2daab592 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Sat, 6 Jan 2018 21:36:43 -0500 Subject: [PATCH] Add new file --- csr.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 csr.sh diff --git a/csr.sh b/csr.sh new file mode 100644 index 0000000..0f2f0fa --- /dev/null +++ b/csr.sh @@ -0,0 +1,29 @@ +#!/bin/bash +URL=$1 + +openssl req -new -sha512 -nodes -out $URL.ad.johnhgaunt.com.csr -newkey rsa:4096 -keyout $URL.ad.johnhgaunt.com.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=$URL.ad.johnhgaunt.com + +[ req_ext ] +subjectAltName = @alt_names + +[ alt_names ] +DNS.1 = $URL.ad.johnhgaunt.com +DNS.2 = $URL +EOF +) \ No newline at end of file