aboutsummaryrefslogtreecommitdiffstats
path: root/spec/tls/config2/prepare.sh
blob: 1d67af4e6633da22551d6fe6bb31e37343131239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

certs="./certs"

for domain in {,xmpp.}example.com; do
	openssl req -x509 \
	  -newkey rsa:4096 \
	  -keyout "${certs}/${domain}.key" \
	  -out "${certs}/${domain}.crt" \
	  -sha256 \
	  -days 365 \
	  -nodes \
	  -subj "/CN=${domain}" 2>/dev/null;
done