summaryrefslogtreecommitdiff
path: root/scripts/x509fingerprint.sh
blob: 55501503b000b5d401730ff58ac191dd1b52ea16 (plain)
1
2
3
4
5
6
7
8
9
10
cert=$1
[ -f "$cert" ] || (echo "$0: Provide path to certificate as argument."; exit 2;)

openssl x509 -sha1 -in $cert -noout -fingerprint | tr -d ':'
openssl x509 -sha224 -in $cert -noout -fingerprint | tr -d ':'
openssl x509 -sha256 -in $cert -noout -fingerprint | tr -d ':'
openssl x509 -sha512 -in $cert -noout -fingerprint | tr -d ':'

exit $?