Last active
January 25, 2021 15:21
-
-
Save joeyates/c79d64a396991306d0ffca831b6a7880 to your computer and use it in GitHub Desktop.
Get the expiry date for an online TLS/SSL certificate
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 bash | |
hostname=$1 | |
online-certificate $hostname | \ | |
openssl x509 -inform pem -noout -enddate |
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 bash | |
hostname=$1 | |
echo | \ | |
openssl s_client \ | |
-connect $hostname:443 \ | |
-servername $hostname \ | |
2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment