3 conf=/etc/ca/check-x509-certs.conf
5 usage="usage: $0 [-c CONF] [-d DAYS] [-s SECS]"
7 while getopts c:d:s: opt; do
10 d) time=$(( $OPTARG * 86400 )) ;;
12 *) echo >&2 "$usage"; exit 1 ;;
15 shift $(( $OPTIND - 1 ))
16 case $# in 0) ;; *) echo >&2 "$usage"; exit 1 ;; esac
18 if [ ! -f $conf ]; then exit 0; fi
22 case "$line" in "" | "#"*) continue ;; esac
24 if openssl x509 -in "$file" -noout -checkend $time; then
27 if openssl x509 -in "$file" -noout -checkend 0; then
30 state="ALREADY EXPIRED!"
32 case $any in nil) any=t ;; t) echo ;; esac
34 openssl x509 -in "$file" -noout -issuer -dates