Last active
July 26, 2017 20:16
-
-
Save davidwalter0/1a96b1afe5794f2a0c8d50e1de3e8aa4 to your computer and use it in GitHub Desktop.
example certificate info dump with openssl
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
#!/bin/bash | |
# https://gist.github.com/davidwalter0/1a96b1afe5794f2a0c8d50e1de3e8aa4 | |
# https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools | |
domain=${1} | |
if (( $# < 1 )); then | |
echo usage ${0##*/} domain | |
exit 1 | |
fi | |
echo | \ | |
openssl s_client -showcerts -servername ${domain}\ | |
-connect ${domain}: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