Debian Codegraph @

myproxy-cert-checker

raw
1 #!/bin/sh
2
3 # example certificate_issuer_checker script
4
5 # pull cert from stdin to shell variable
6 cert=`openssl x509 -text`
7
8 # check for MD5 signatures
9 echo "$cert" | grep 'Algorithm: md5' > /dev/null 2>&1
10 if [ $? = "0" ]; then
11 echo "MD5 signature detected" 1>&2
12 exit 1
13 fi
14
15 # all done
16 exit 0