Once you have determined that they do not match, you still have a problem - what to do about it. Often a certificate can simply be assembled incorrectly. When the CPU signs your certificate, they send you a block that looks something like this:
they will also send you a package (often two certificates) that represent their authority to provide you with a certificate. it will look something like
-----BEGIN CERTIFICATE----- MIICC-this-is-the-certificate-that-signed-your-request -this-is-the-certificate-that-signed-your-request-this -is-the-certificate-that-signed-your-request-this-is-t he-certificate-that-signed-your-request-this-is-the-ce rtificate-that-signed-your-request-A -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIICC-this-is-the-certificate-that-signed-for-that-one -this-is-the-certificate-that-signed-for-that-one-this -is-the-certificate-that-signed-for-that-one-this-is-t he-certificate-that-signed-for-that-one-this-is-the-ce rtificate-that-signed-for-that-one-this-is-the-certifi cate-that-signed-for-that-one-AA -----END CERTIFICATE-----
except that, unfortunately, they will not be so clearly marked.
Thus, the general practice is to combine all this into one file - your certificate, and then the signed certificates. But since they are not easy to distinguish, sometimes it happens that someone accidentally puts them in a different order - signs the certificates, and then the final certificate - without noticing. In this case, your certificate will not match your key.
You can check what, according to the servast, it represents by running
openssl x509 -noout -text -in yourcert.cert
Next to the top you should see “Subject:” and then stuff similar to your data. If instead it looks like your CA, your kit is probably out of order; you can try to backup and then transfer the last certificate to the beginning, hoping that this is the one that is your certificate.
If this does not work, you will just need to return the certificate. When I do CSR, I like to clearly indicate which server it is on (and not just ssl.key or server.key), and make a copy of it with the date of the name, for example mydomain.20150306.key, etc. their private and public key pairs are unlikely to be mixed up with another set.
Vynce Mar 06 '15 at 7:43 2015-03-06 07:43
source share