Minimal X.509 certificate authority.
[ca] / bin / issue-crl
1 #! /bin/sh
2
3 set -e
4 certroot=$(cd ${0%/*}/..; pwd)
5 cd "$certroot"
6 . lib/func.sh
7 runas_ca
8
9 now=$(date +%Y-%m-%d)
10 n=0
11 while t=$now#$n.crl; [ -f crls/$t ]; do
12 n=$(expr $n + 1)
13 done
14 openssl ca -config openssl.conf -gencrl -out crls/$t
15 rm -f crls/new
16 ln -s $t crls/new
17 mv crls/new crls/current