Add new file
This commit is contained in:
29
csr.sh
Normal file
29
csr.sh
Normal file
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user