ibmjstart / bluemix-letsencrypt

Let's Encrypt wrapper for Cloud Foundry apps on IBM Bluemix
MIT License
36 stars 15 forks source link

Error while uploading certificate #27

Open neeraj-laad opened 5 years ago

neeraj-laad commented 5 years ago

I'm getting error while uploading the certificate:

bx app domain-cert-add xyz.io -c cert.pem -k privkey.pem -I chain.pem

Uploading certificate to domain 'xyz.io'... FAILED Error: {code: 'bad_request', message: 'The domain xyz.io is not supported by the certificate CN/SAN matches [host.xyz.io] and misses [].'}

Here's my domains.json file:

"domains": [
  {
    "domain": "xyz.io",
    "hosts": [
      "host"
    ]

This used to work as is earlier but I am unable to upload the certs now.. Am I missing a step here?

lmsurpre commented 5 years ago

Maybe they added some validation to the upload or something?

Anyway, to include the bare domain (xyz.io) in your cert from let's encrypt, just add an entry for "." the beginning of your hosts list:

    "hosts": [
      ".",
      "host"
    ]

Try that and let us know if IBM Cloud is still complaining about the cert you get.

neeraj-laad commented 5 years ago

I actually don't want to include the bare domain in my cert, we have a different cert for that already. I only want to add a cert for this subdomain. We have been able to do this in the past, but looks like something has changed which is stopping us from doing so now.

Is there a way to skip/bypass this validation?

Agusnez commented 5 years ago

I have the same problem here.

lmsurpre commented 5 years ago

Thanks for the reports, I havn't had a chance to try this in a while. Have you tried writing IBM Cloud support to see if something changed on their end?

patelnisarg61 commented 4 years ago

Is there a solution to this? Because I am facing the same problem.

patelnisarg61 commented 4 years ago

If i keep "." Then it says: Waiting for certs... Certs not ready yet, retrying in 5 seconds. Certs not ready yet, retrying in 5 seconds.