Created
March 30, 2020 15:08
-
-
Save magickatt/cf7767634d86eba5527e7f64ed50f50a to your computer and use it in GitHub Desktop.
Check SSL certificate validity
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
HOSTNAME=example.com && \ | |
echo | openssl s_client -showcerts \ | |
-servername $HOSTNAME \ # Required for SNI | |
-connect $HOSTNAME:443 2>/dev/null | \ | |
openssl x509 -inform pem -noout -text | \ | |
grep Validity -A 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment