Skip to content

Instantly share code, notes, and snippets.

@NonCoderF
Created February 9, 2023 15:09
Show Gist options
  • Save NonCoderF/dc3226c0f6d0fc4bdae37cae7432b175 to your computer and use it in GitHub Desktop.
Save NonCoderF/dc3226c0f6d0fc4bdae37cae7432b175 to your computer and use it in GitHub Desktop.
Generating SHA256 hash of public key from a certificate (mycertfile.pem)
openssl x509 -in mycertfile.pem -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