Last active
June 6, 2021 23:28
-
-
Save a-yasui/206817e30c56a349692ac5e78c83bc9f to your computer and use it in GitHub Desktop.
SSL Certificate Display
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 | |
# | |
# ./ssl_check.sh <host> | |
# | |
# Via: https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools | |
host_name=$1 | |
if [[ "X${host_name}" = "X" ]]; then | |
echo "./ssl_check.sh <host>" | |
echo "This script is display the SSL pem list" | |
exit 1; | |
fi | |
echo | openssl s_client -showcerts -servername "${host_name}" -connect "${host_name}:443" 2>/dev/null | openssl x509 -inform pem -noout -text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment