Last active
December 28, 2018 08:17
-
-
Save ralavay/d0b799eb2e68c498015165df301e5602 to your computer and use it in GitHub Desktop.
Show SSL cert expiration date
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
# Put this into ~/.profile | |
# Usage: | |
# cert-check domain.name | |
# Example: | |
# cert-check www.google.com | |
function cert-check() { | |
yes QUIT | openssl s_client -showcerts -servername $1 -connect $1:443 > /tmp/$1.pem && openssl x509 -inform PEM -in /tmp/$1.pem -text -out certdata | grep -i 'not after' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment