Skip to content

Instantly share code, notes, and snippets.

@necrobious
Created January 22, 2015 17:39
Show Gist options
  • Save necrobious/32263ca6cb5dfb6fcd82 to your computer and use it in GitHub Desktop.
Save necrobious/32263ca6cb5dfb6fcd82 to your computer and use it in GitHub Desktop.
TLS expiration date report
#!/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