1 #!/bin/sh
2
3 openssl x509 -in $1 -enddate -noout | grep notAfter| awk -F= '{print $2}' | \
4 while read l; do
5 t=`date -j -f "%b %d %T %Y %Z" "$l" +%s`
6 n=`date +%s`
7 echo `expr $t - $n`
8 done