Skip to content

Instantly share code, notes, and snippets.

@brainsik
Last active February 19, 2017 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brainsik/a9800374a9882d4e0273e2879a0cdb69 to your computer and use it in GitHub Desktop.
Save brainsik/a9800374a9882d4e0273e2879a0cdb69 to your computer and use it in GitHub Desktop.
OpenSSL client commands

Connect to TLS endpoint w/SNI

echo | openssl s_client -connect $site:$port -servername $site

Show certificate expiration dates

echo | openssl s_client -connect $site:$port -servername $site 2>/dev/null | openssl x509 -noout -dates

Show all certificate info

echo | openssl s_client -connect $site:$port -servername $site 2>/dev/null | openssl x509 -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment