5 [ "$1" == "" ] && echo "Usage: $0 <year>" && exit 1
11 generateCRL() { # name, year, month
14 pushd $1.ca > /dev/null
15 TZ=UTC LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="${year}-${month}-01 00:00:00" openssl ca -gencrl -config "$BASE/selfsign.config" -keyfile key.key -cert key.crt -crldays 35 -out $2_$3.crl
19 generateCRLs (){ #name start
20 [[ "$2" == "" ]] && start=$(echo {01..12})
21 [[ "$2" == "07" ]] && start=$(echo {07..12})
22 for month in $start; do
23 generateCRL "$1" "$year" "$month"
27 generateYearCRLs (){ #name idx
28 [[ "$2" == "1" ]] && start=$(echo {01..12})
29 [[ "$2" == "2" ]] && start=$(echo {07..12})
30 for month in $start; do
31 generateCRL "$1" "$year" "$month"
33 [[ "$2" == "1" ]] && start=$(echo {01..12})
34 [[ "$2" == "2" ]] && start=$(echo {01..12})
35 for month in $start; do
36 generateCRL "$1" "$((year+1))" "$month"
38 [[ "$2" == "1" ]] && return
39 [[ "$2" == "2" ]] && start=$(echo {01..06})
40 for month in $start; do
41 generateCRL "$1" "$((year+2))" "$month"
45 for ca in $STRUCT_CAS; do
49 for i in ${TIME_IDX}; do
50 generateYearCRLs $year/ca/env_${year}_$i $i
51 generateYearCRLs $year/ca/env_${year}_$i $i