File: myproxy-crl.cron

package info (click to toggle)
myproxy 6.1.22-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,628 kB
  • ctags: 1,812
  • sloc: ansic: 25,183; sh: 11,726; perl: 3,673; makefile: 361
file content (23 lines) | stat: -rwxr-xr-x 568 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

CRLDAYS=14
SIMPLECADIR="/home/globus/.globus/simpleCA"
PASS="/home/globus/.globus/.simplecapass"
CONF="$SIMPLECADIR/grid-ca-ssl.conf"
CACERT="$SIMPLECADIR/cacert.pem"
INDEX="$SIMPLECADIR/index.txt"
HASH=`openssl x509 -noout -hash -in $CACERT`
PEMCRL="$SIMPLECADIR/$HASH.r0"
DERCRL="$SIMPLECADIR/$HASH.crl"

if [ ! -e $INDEX ] ; then
   touch $INDEX
fi

openssl ca -gencrl -config $CONF -passin file:$PASS \
  -crldays $CRLDAYS -out $PEMCRL.$$ &&
mv $PEMCRL.$$ $PEMCRL &&
openssl crl -outform DER -in $PEMCRL -out $DERCRL.$$ &&
mv $DERCRL.$$ $DERCRL

exit 0