Created
January 22, 2015 17:39
-
-
Save necrobious/32263ca6cb5dfb6fcd82 to your computer and use it in GitHub Desktop.
TLS expiration date report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
doTLSCheck () { | |
echo [$1] | |
echo | openssl s_client -connect $1:443 -servername $1 2>/dev/null | openssl x509 -noout -dates | grep 'notAfter' | sed 's/notAfter=/expires: /g' | |
echo '' | |
} | |
for dom in "$@"; | |
do | |
doTLSCheck "$dom"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment