Last active
June 22, 2016 03:43
-
-
Save estahn/dd5cf8a8fb8a9c0b0fb6a6190383d39d to your computer and use it in GitHub Desktop.
Check SSL on all ELBs
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/sh | |
ELBS=`aws elb describe-load-balancers | jq -r '.LoadBalancerDescriptions[] | select(.ListenerDescriptions[].Listener.SSLCertificateId) | .DNSName'` | |
for elb in ${ELBS}; do | |
OUTPUT=`echo | timeout 2 openssl s_client -connect ${elb}:443 2>/dev/null | openssl x509 -noout -enddate 2> /dev/null` | |
echo "${elb};${OUTPUT}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment