Squoggle
Mac's tech blog
Verifying Certs, Keys & CSRs – MD5 Sum
Posted by on September 14, 2019
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.
Recent Comments