Created
October 24, 2016 18:02
-
-
Save kckrinke/5f7c38a2777c6747ef355a19f5929098 to your computer and use it in GitHub Desktop.
Another way of retrieving SSL (public) certificate from a remote host
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 | |
if [ $# -ne 1 ] | |
then | |
echo "usage: $(basename $0) host:port" | |
exit 1 | |
fi | |
openssl x509 -in <(openssl s_client -connect "$1" -prexit 2>/dev/null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment