Blame


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