Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zugarzeeker/31d5a7be3b740e1b1182ba6d42c23927 to your computer and use it in GitHub Desktop.
Save zugarzeeker/31d5a7be3b740e1b1182ba6d42c23927 to your computer and use it in GitHub Desktop.
Let's Encrypt Certificates SHA256 fingerprint
#!/bin/bash
BASE_URL="https://letsencrypt.org/certs/"
CERTIFICATES="lets-encrypt-x3-cross-signed.pem lets-encrypt-x4-cross-signed.pem lets-encrypt-x1-cross-signed.pem lets-encrypt-x2-cross-signed.pem"
for CERTIFICATE in $CERTIFICATES; do
echo "# $CERTIFICATE "
curl --silent "${BASE_URL}${CERTIFICATE}" | openssl x509 -noout -fingerprint -sha256 -inform pem | cut -d'=' -f2 | tr '[:upper:]' '[:lower:]' | sed -e 's/://g' |
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment