blob: 89269d736c3a5cf2aa433fb0ef4bebbd08fb599e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
certs="./certs"
for domain in {,xmpp.}example.com example.net; do
openssl req -x509 \
-newkey rsa:4096 \
-keyout "${certs}/${domain}.key" \
-out "${certs}/${domain}.crt" \
-sha256 \
-days 365 \
-nodes \
-quiet \
-subj "/CN=${domain}" 2>/dev/null;
done
for domain in example.org; do
openssl req -x509 \
-newkey rsa:4096 \
-keyout "${certs}/${domain}.key" \
-out "${certs}/${domain}.crt" \
-sha256 \
-days 365 \
-nodes \
-subj "/CN=${domain}" \
-addext "subjectAltName = DNS:${domain}, DNS:groups.${domain}, DNS:share.${domain}" \
2>/dev/null;
done
|