Skip to content

Instantly share code, notes, and snippets.

@davidwalter0
Last active July 26, 2017 20:16
Show Gist options
  • Save davidwalter0/1a96b1afe5794f2a0c8d50e1de3e8aa4 to your computer and use it in GitHub Desktop.
Save davidwalter0/1a96b1afe5794f2a0c8d50e1de3e8aa4 to your computer and use it in GitHub Desktop.
example certificate info dump with openssl
#!/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