summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-06-15 19:03:32 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-06-15 19:03:32 +0200
commit064a4d7ccbd455c0bde1b527ee8a0453af471148 (patch)
tree72b93adecfb37fac909b723dca475987ed789fca /certs
parent02d4a5892bb3019d448c453ad279788fcd3f1531 (diff)
crt.sh: Replace SHA1 by SHA256 as SPKI digest to list certificates.
Diffstat (limited to 'certs')
-rwxr-xr-xcerts/gencerts.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/certs/gencerts.sh b/certs/gencerts.sh
index 81a27fc..5008f89 100755
--- a/certs/gencerts.sh
+++ b/certs/gencerts.sh
@@ -21,9 +21,9 @@ x509fpr() {
local msg="$1" host cert h spki
host="${msg%%,*}"; host="${host%% *}"; host="${host#\`}"
cert="$DIR/${host%%:*}.pem"
- spki=$(openssl pkey -pubin -outform DER <"$cert" | openssl dgst -sha1 | sed -nr 's/^[^=]+=\s*//p')
- [ "$typ" = mdwn ] && printf '\n [%s](https://crt.sh/?spkisha1=%s&iCAID=16418)\n\n' "$msg" "$spki" \
- || printf ' %s\n X.509: https://crt.sh/?spkisha1=%s&iCAID=16418\n SPKI:\n' \
+ spki=$(openssl pkey -pubin -outform DER <"$cert" | openssl dgst -sha256 | sed -nr 's/^[^=]+=\s*//p')
+ [ "$typ" = mdwn ] && printf '\n [%s](https://crt.sh/?spkisha256=%s&iCAID=16418)\n\n' "$msg" "$spki" \
+ || printf ' %s\n X.509: https://crt.sh/?spkisha256=%s&iCAID=16418\n SPKI:\n' \
"$( echo "$msg" | tr -d '`' )" "$spki"
for h in sha1 sha256; do
[ "$typ" = mdwn ] || echo -n ' '