Skip to content

Commit 63d943e

Browse files
committed
Add simple script to generate CSRs for infra certs
1 parent 3c146cb commit 63d943e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -euf
4+
set -x
5+
6+
while read HOST FILE; do
7+
yes "" | openssl req -key /etc/pki/tls/private/scripts-2048.key -new -sha256 -reqexts SAN -config <(cat /etc/pki/tls/openssl.cnf <(printf "[req_distinguished_name]\ncommonName_default=$HOST\n[SAN]\nsubjectAltName=DNS:$HOST\n")) -out $FILE.csr
8+
done <<EOF
9+
scripts.mit.edu scripts
10+
scripts-cert.mit.edu scripts-cert
11+
*.scripts.mit.edu star.scripts
12+
EOF

0 commit comments

Comments
 (0)