squoggle

Mac's tech blog — Linux, sysadmin, TLS

VERIFYING(1) SSL/TLS/OpenSSL 2019-09-14

Verifying Certs, Keys & CSRs - MD5 Sum

Posted 2019-09-14

Sometimes you will need to verify that a Cert or a CSR belong to a Key. You can do that by checking the MD5 sum of each file.

Get the MD5 sum from the Key:

$ openssl rsa -noout -modulus -in [key-file.key] | openssl md5

Get the MD5 sum from a CSR:

$ openssl req -noout -modulus -in [CSR-file.csr] | openssl md5

Get the MD5 sum from a Cert:

openssl x509 -noout -modulus -in [certificate-file.crt] | openssl md5

Compare the resulting numbers. If they match then your files belong to each other. If they don’t match then there has been a mixup in the files somehow.

VERIFYING(1) RSS 2019-09-14