1 #!/bin/sh 2 # 3 # usage: fingerprint <file> 4 # dump a fingerprint of the given file. 5 6 file="${1?:missing file name}" 7 8 printf "SHA256:" 9 openssl x509 -in "$file" -noout -fingerprint -sha256 | 10 sed -e 's/^.*=//' -e 's/://g' | 11 tr A-Z a-z