Skip to content

Instantly share code, notes, and snippets.

@shoan
Last active June 1, 2020 11:13
Show Gist options
  • Select an option

  • Save shoan/833c7467d37ba4b99795be3ad827129f to your computer and use it in GitHub Desktop.

Select an option

Save shoan/833c7467d37ba4b99795be3ad827129f to your computer and use it in GitHub Desktop.
Check if an ssl certificate and key match
openssl rsa -modulus -noout -in myserver.key | openssl md5
openssl rsa -check -noout -in myserver.key
# RSA Key is ok
# If it doesn't say 'RSA key ok', it isn't OK!"
# To view the modulus of the RSA public key in a certificate:
openssl x509 -modulus -noout -in myserver.crt | openssl md5
# To view the hash of the CSR
openssl req -noout -modulus -in mycsr.csr | openssl md5
# Decode the CSR.
openssl req -in csr.txt -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment