When working with SSL certificates, it can be handy to check that the certificate you got (.crt file) properly corresponds to the private key (.key file) and the certificate request (.csr file).
Just use those commands :
1 2 3 |
openssl x509 -noout -modulus -in certificate.crt | openssl md5 openssl rsa -noout -modulus -in privateKey.key | openssl md5 openssl req -noout -modulus -in CSR.csr | openssl md5 |
They will output a string composed of numbers. All 3 of them need to be the same in order for your certificate to work properly on your server.
It’s as simple as that.