Created
July 3, 2013 12:53
-
-
Save xee5ch/5917639 to your computer and use it in GitHub Desktop.
Bashism with OpenSSL s_client to download SSL cert and process cert to get expiry date.
This file contains 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
SSLHOST=domain.tld | |
SSLPORT=443 | |
echo "" | openssl s_client -connect $SSLHOST:$SSLPORT 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' |openssl x509 -text|grep "Not After :" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment