How to check SSL Key / CSR / Certificate Files using OpenSSL

In case you need to verify, if certificate private key / signing request / certificate file do match, use the following openssl commands:

openssl rsa -noout -modulus -in {{privatekey_file}} | openssl md5
openssl rsa -noout -modulus -in {{certificate_file}} | openssl md5
openssl req -noout -modulus -in {{request_file}} | openssl md5

All MD5 hashes presented by every command should match, so you’re sure you’ve got no “certificate files mixup”.

Leave a Reply