I recently received an error that my SSL certificate did not match the private key. How can I validate that the cert matches the key?
1 Answer
You can validate that a CSR, certificate and privatekey match each other by comparing their Modulus
values:
Here is the CSR modulus:
openssl req -noout -modulus -in mydomain.com.csr
Modulus=XYZ
Here is the certificate modulus:
openssl x509 -noout -modulus -in mydomain.com.cer
Modulus=XYZ
Here is the privatekey modulus:
openssl rsa -noout -modulus -in mydomain.com.key
Modulus=XYZ