Skip to content

Instantly share code, notes, and snippets.

@pollux-
Last active March 7, 2019 01:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pollux-/c94987644e544198282aed6419992439 to your computer and use it in GitHub Desktop.
Save pollux-/c94987644e544198282aed6419992439 to your computer and use it in GitHub Desktop.
Extract the public key from a certificate
openssl s_client -connect api.github.com:443 | openssl x509 -pubkey -noout | openssl rsa -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