Skip to content

Instantly share code, notes, and snippets.

@rgpower
Created May 27, 2022 20:40
Show Gist options
  • Save rgpower/efcd198ecf642c71644ff20e03b46005 to your computer and use it in GitHub Desktop.
Save rgpower/efcd198ecf642c71644ff20e03b46005 to your computer and use it in GitHub Desktop.
Verify that a given pkcs8 private key and certificate match
$ cat private-pkcs8.pem | openssl pkey -pubout -in - | openssl md5
(stdin)= 3b6b231d32d76732b76d04b1bcb53270
$ cat website.cer | openssl x509 -pubkey -noout -in - | openssl md5 # got the cer by copying from browser
(stdin)= 3b6b231d32d76732b76d04b1bcb53270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment