Skip to content

Instantly share code, notes, and snippets.

@zglozman
Created December 7, 2017 18:58
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 zglozman/13f9cf4ae10991775ca0266969062385 to your computer and use it in GitHub Desktop.
Save zglozman/13f9cf4ae10991775ca0266969062385 to your computer and use it in GitHub Desktop.
Extract Public key from a certificate
openssl s_client -connect www.facebook.com:443 -servername www.facebook.com -cipher ECDHE-ECDSA-AES128-GCM-SHA256 < /dev/null | ngs -e 'read().lines()["-----BEGIN CERTIFICATE-----"..."-----END CERTIFICATE-----"].join("\n").echo()' | openssl x509 -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment