5 [ "$1" == "" ] && echo "Usage: $0 <year>" && exit 1
12 fetchCRLS(){ #year, cyear month timeIdx
17 # no "for ca in $STRUCT_CAs" because that's cassiopeias work.
22 for month in {01..12}; do
23 BASE=crls-${year}/$year-$month
25 cp root.ca/${year}_${month}.crl $BASE/root.crl
26 for ca in $STRUCT_CAS; do
27 cp $ca.ca/${year}_${month}.crl $BASE/$ca.crl
32 for month in {01..12}; do
33 BASE=crls-${year}/$cyear-$month
36 fetchCRLS $year $cyear $month 1
37 [ "$month" -gt "6" ] && fetchCRLS $year $cyear $month 2
41 for month in {01..12}; do
42 BASE=crls-${year}/$cyear-$month
45 fetchCRLS $year $cyear $month 1
46 fetchCRLS $year $cyear $month 2
50 for month in {01..06}; do
51 BASE=crls-${year}/$cyear-$month
54 fetchCRLS $year $cyear $month 2
58 rm -f crl-passwords1.txt crl-passwords2.txt
60 PASSW1=`head -c15 /dev/urandom | base64`
61 PASSW2=`head -c15 /dev/urandom | base64`
62 echo "Crypting CRL $i"
63 echo "$i: $PASSW1" >> crl-passwords1.txt
64 echo "$i: $PASSW2" >> crl-passwords2.txt
65 tar c -C $i . | openssl enc -e -kfile <(echo -n "$PASSW1$PASSW2") -md sha256 -aes-256-cbc > $i.tar.aes-256-cbc