With the leaf certificate from Stackoverflow.com, you can extract the public key that is embedded inside of the cert with this command:
openssl x509 -pubkey -noout -in stackexchangecom.crt > pubkey.pem
Print your cert information..
openssl x509 -in stackexchangecom.crt -text -noout
Print your public key...
openssl rsa -inform PEM -pubin -in pubkey.pem -text -noout
now you can compare the Modulus of the cert and public key to see they are the same.
Forked from rustymagnet3000/a_openssl_command_playground.md
Created
November 20, 2020 14:48
-
-
Save BurgerZ/f176d2e057a7f20e3bb0720db52d81f0 to your computer and use it in GitHub Desktop.
openSSL public key extract
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment