Created
May 12, 2016 07:47
-
-
Save snobu/e08b5563a9366ca92090f4b39d781142 to your computer and use it in GitHub Desktop.
Count certs in TLS handshake
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
| while true | |
| do | |
| if [ $(openssl s_client -showcerts -connect $1:443 -servername $1 2>&1 < /dev/null | grep "BEGIN CERTIFICATE" | wc -l) != 2 ] | |
| then echo "!!!INTERMEDIATE NOT SERVED!!! OpenSSL exit code = $?" | |
| fi | |
| sleep 1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment