Skip to content

Instantly share code, notes, and snippets.

@abdallah
Created Nov 4, 2014
Embed
What would you like to do?
Check SSL for domain if SHA-1 or SHA-256

Suggested usage

Put certificates list in certs.txt and run:

awk '{ print $3 }' certs.txt | while read d; do bash check_sha256.sh $d 2>/dev/null; done | grep OK
#!/bin/bash
echo -n $1:
if openssl s_client -connect $1:443 < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin | grep -iq "sha256"; then echo " OK"; else echo " sha-1"; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment