5 [ "$1" == "" ] && echo "Usage: $0 <year>" && exit 1
12 generateCRL() { # name, year, month
15 pushd $1.ca > /dev/null
16 TZ=UTC LD_PRELOAD="$(findLibfaketime)" 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
20 generateCRLs (){ #name start
21 [[ "$2" == "" ]] && start=$(echo {01..12})
22 [[ "$2" == "07" ]] && start=$(echo {07..12})
23 for month in $start; do
24 generateCRL "$1" "$year" "$month"
28 generateYearCRLs (){ #name idx
29 [[ "$2" == "1" ]] && start=$(echo {01..12})
30 [[ "$2" == "2" ]] && start=$(echo {07..12})
31 for month in $start; do
32 generateCRL "$1" "$year" "$month"
34 [[ "$2" == "1" ]] && start=$(echo {01..12})
35 [[ "$2" == "2" ]] && start=$(echo {01..12})
36 for month in $start; do
37 generateCRL "$1" "$((year+1))" "$month"
39 [[ "$2" == "1" ]] && return
40 [[ "$2" == "2" ]] && start=$(echo {01..06})
41 for month in $start; do
42 generateCRL "$1" "$((year+2))" "$month"
46 for ca in "${STRUCT_CAS[@]}"; do