diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-07-12 23:04:33 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-07-12 23:04:33 +0200 |
commit | eb5f9f6c49da8665869d43834b0d4b53052c0580 (patch) | |
tree | 16746c87c28111874cd1f27bd71dfa2904507375 /certs | |
parent | b2d7290761be81525aed5ceaf64042be0720704d (diff) |
gencerts: Print the SHA1 digests in hex not base64 format.
Diffstat (limited to 'certs')
-rwxr-xr-x | certs/gencerts.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/certs/gencerts.sh b/certs/gencerts.sh index 0c0f07d..b0ff43d 100755 --- a/certs/gencerts.sh +++ b/certs/gencerts.sh @@ -44,7 +44,7 @@ x509fpr2() { str="$str$(printf '%-6s' "$h" | tr '[a-z]' '[A-Z]')" dgst="$(openssl pkey -pubin -outform DER <"$pub" | openssl dgst -"$h" -binary | base64)" hd=$(printf '%s' "$dgst" | base64 -d | xxd -c256 -p | tr '[a-f]' '[A-F]' | sed -e 's/../&:/g' -e 's/:$//') - if [ $((${#indent} + ${#str} + 1 + ${#hd})) -le 72 ]; then + if [ $((${#str} + 1 + ${#hd})) -le 72 ]; then printf '%s %s\n' "$indent$str" "$hd" else printf '%s %s\n' "$indent$str" "$dgst" |