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