Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active April 26, 2017 18:59
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 miguelmota/d78cf66bdefce599bc4bcf72a297dc75 to your computer and use it in GitHub Desktop.
Save miguelmota/d78cf66bdefce599bc4bcf72a297dc75 to your computer and use it in GitHub Desktop.
openssl show ssl certificate and public key

This command will show you the certificate (use -showcerts as an extra parameter if you want to see the full chain):

openssl s_client -connect the.host.name:443

This will get the certificate and print out the public key:

openssl s_client -connect the.host.name:443 | openssl x509 -pubkey -noout

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment