-
Notifications
You must be signed in to change notification settings - Fork 5
/
run-all.sh
executable file
·55 lines (44 loc) · 1.28 KB
/
run-all.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash -e
function usage() {
echo -e "Usage:
This script simulates Let's Encrypt key ceremonies where we previously have
or eventually will be generating cryptographic material.
./$(basename "${0}") [-h]
-h | Outputs this help text"
}
if [ "${1}" == "-h" ]; then
usage
exit 0
fi
if [ "$#" -ne 0 ]; then
usage
exit 1
fi
function setup_softhsm2() {
# see init-softhsm.sh for slot initialization
export SOFTHSM2_CONF="${PWD}/softhsm2.conf"
echo "directories.tokendir = ${PWD}/softhsm/" > ${SOFTHSM2_CONF}
}
function output_human_readable_text_files() {
for x in $(find ./ceremonies/ -type f -name '*.cert.pem'); do
openssl x509 -text -noout -out "${x%.*}.txt" -in "${x}" &
done
for r in $(find ./ceremonies/ -type f -name '*.cross-csr.pem'); do
openssl req -text -noout -out "${r%.*}.txt" -in "${r}" &
done
for c in $(find ./ceremonies -type f -name '*.crl.pem'); do
openssl crl -text -noout -out "${c%.*}.txt" -in "${c}" &
done
wait
}
function run_ceremonies() {
./ceremonies/2015/run.sh
./ceremonies/2000/run.sh
./ceremonies/2020/run.sh
./ceremonies/2021/run.sh
./ceremonies/2023/run.sh
}
setup_softhsm2
run_ceremonies
output_human_readable_text_files
echo "All done!"