This will be a quick one, recently had to order a bunch of certificates and unfortunately it had to be handled by a different team which meant the time between when I ordered the cert and got it was… significant. Needless to say I didn’t have a lot of confidence that my certs-csrs-keys all matched up.
So here is a quick way to validate you have the correct key-cert-csr combos.
openssl rsa -modulus -noout -in MYPRIVATEKEY.key | openssl md5 (stdin)= 6cb0c65584f007820167f09e40f59a73
openssl req -modulus -noout -in MYCSR.csr | openssl md5 (stdin)= 6cb0c65584f007820167f09e40f59a73
openssl x509 -modulus -noout -in MYCERT.crt | openssl md5 (stdin)= 6cb0c65584f007820167f09e40f59a73
Now provided that all the md5 hashes match up, you know everything as been set up correctly. You can also check the infomation within the certificate by running the following command.
openssl x509 -in MYCERT.crt -text -noout