Created
March 10, 2015 19:18
-
-
Save derektamsen/d1053ced05b261d0dce5 to your computer and use it in GitHub Desktop.
Outputs the openssl certificate details including the chain, subject, and expiration date. Usage: `./checksslcert <fqdn> [port]` - <fqdn>: The hostname or fully qualified domain name of the cert to check - [port]: The tcp port the ssl service is listening on. This will default to `443` if unspecified.
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
#!/usr/bin/env sh | |
checksslcert() { | |
echo "QUIT" | openssl s_client -servername ${1} -connect ${1}:${2:-443} | |
echo "QUIT" | openssl s_client -servername ${1} -connect ${1}:${2:-443} | openssl x509 -noout -dates | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment