I am trying to add an SSL certificate to my ecommerce site following these instructions:
When I get to the part about pasting in the contents of the ssl certificate, I am pasting in the certificate for my domain, www_mydomain_com.crt, into the “New Certifictate” box, and I get an error:
Failed to install certificate : Missing or invalid signed SSL certificate : Data does not start with line -----BEGIN CERTIFICATE-----
But the certificate I am posting does start with ----BEGIN etc, so I don’t understand what I am doing wrong.
Can you paste in the first line of your SSL cert, exactly as it is in your file?
Sure. Thanks for the help:
Yeah, that looks correct…
I’m looking at the code – it does specific look for 5 dashes, both at the beginning and end of that line.
If there were a copy and paste issue, where one of the dashes were missing, that could cause it to throw that error.
If you try it again, being super-sure that it begins with five dashes, do you still have that problem?
I was super careful and got the same error. Would it be fair to say that my problem is the second part of the statement, “invalid signed” certificate? Perhaps I messed something up when I submitted my signing request to the certificate issuing company? My key is in the bottom part of the form.
I solved this problem.
My certificate is issued by Comodo, and they email you the certificate as text file, and send a zip for the other files. Today, I tried having the certificate reissued and got the same error.
While I was thinking about troubleshooting, I clicked my mouse into the paste box for some reason and notice that my cursor did not touch the end of a line, space was between the end of the character line, and my flashing cursor. I deleted it on the first line and found that every line from begin certificate to end certificate had an extra, invisible space. Once I removed all these characters, webmin accepts my certificate, but gives me the mismatched key and certificate. So I am still working on getting SSL to work.
Sorry to bring up this old post but i am having the exact same issue with the exact same kind of comodo cert. And it does start with -----BEGIN CERTIFICATE-----
so i dont know what the issue is. I copied it to a text file and named it .pem .cert. and tried .crt but it dont matter it wont take it with same error as this post. There are no spaces before or after the cert.
OK now i get what he was saying about the spaces just for others ill show you an example
LKFJLDSJFLFJSLFJSLFJSLFJSLFJFLSJFLSFJ <---------- open your cert and look right here at the end of the lines (i will explain below)
in a comodo cert the spaces are all along the right side there. Just move you curser there and you will see them after the text stops
it will be lksajfldjflfsjdslfjlajflsafj_ <---- that underline at the end represents a space
you need to start from the very top right after the last dash ----- start here removing the spaces and go all the way down your cert and remove them from the right side all the way down.
then when you get to the last line if it is a half line, there is still a space after the half line, get rid of that space too
then on the next line should be your closeing
-----END CERTIFICATE----- make sure no spaces after that (yes keep this on a seperate line by itself)
and now it will accept the cert and load it…