Skip to content

Instantly share code, notes, and snippets.

@philcryer
Created August 11, 2015 17:09
Show Gist options
  • Save philcryer/92b174567a5cb5043ae9 to your computer and use it in GitHub Desktop.
Save philcryer/92b174567a5cb5043ae9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# inspired by Mattias Geniar's post:
# https://ma.ttias.be/how-to-read-an-ssl-certificate-info-from-the-cli/
# could it mimic the functionality of this online one ssl testing tool?
# https://www.ssllabs.com/ssltest/analyze.html
if [[ ! $1 ]]; then
echo " ERR: please provide a site to check"
echo " ERR: (i.e.) ssl_check.sh google.com"
exit 0
fi
openssl s_client -showcerts -connect $1:443
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment