Skip to content

Instantly share code, notes, and snippets.

@soledue
Created December 23, 2020 12:20
Show Gist options
  • Save soledue/bd1cb011a1dfec38f298e78565d8292e to your computer and use it in GitHub Desktop.
Save soledue/bd1cb011a1dfec38f298e78565d8292e to your computer and use it in GitHub Desktop.
extract public key from host
openssl s_client -servername www.google.com -connect www.google.com:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment