Noticed that when testing Greenlock.js against the Pebble ACME server (official testing server for ACME protocol), I received the following error repeatedly:
[acme-v2] mydomain.local status:400 Cannot update challenge with status valid, only status pending
Works without errors when used against live / staging, but the speed of localhost demonstrates the issue. The issue above explains the correct flow for these requests to avoid errors.
--
BTW, relative novice here w.r.t ACME & Greenlock
Noticed that when testing Greenlock.js against the Pebble ACME server (official testing server for ACME protocol), I received the following error repeatedly:
>[acme-v2] mydomain.local status:400 Cannot update challenge with status valid, only status pending
It appears as though another ACME client had the same issue: https://github.com/letsencrypt/pebble/issues/133
Works without errors when used against live / staging, but the speed of localhost demonstrates the issue. The issue above explains the correct flow for these requests to avoid errors.
--
BTW, relative novice here w.r.t ACME & Greenlock
Seems like this issue can be solved in ACME._postChallenge in the checkResult function by adding 'pending' to the possible states that result in pollStatus getting called. I'll submit a patch for this soon.
Subsequent error is that the finalize URL is called twice - if the ACME server validates the challenge in the initial call then any further calls will error with a 403 because you can't finalize an already valid certificate. Trying to determine whether there's a POST-as-GET alternative for ACME._pollOrderStatus - looking at other implementations
Seems like this issue can be solved in `ACME._postChallenge` in the `checkResult` function by adding 'pending' to the possible states that result in `pollStatus` getting called. I'll submit a patch for this soon.
Subsequent error is that the finalize URL is called twice - if the ACME server validates the challenge in the initial call then any further calls will error with a 403 because you can't finalize an already valid certificate. Trying to determine whether there's a POST-as-GET alternative for `ACME._pollOrderStatus` - looking at other implementations
SO ACME._pollOrderStatus should use the same GET on order._orderUrl as was used in ACME._postChallenge. I've made a patch for this locally and it works great.
I'll tidy it up a bit and create a PR.
SO `ACME._pollOrderStatus` should use the same GET on `order._orderUrl` as was used in `ACME._postChallenge`. I've made a patch for this locally and it works great.
I'll tidy it up a bit and create a PR.
Noticed that when testing Greenlock.js against the Pebble ACME server (official testing server for ACME protocol), I received the following error repeatedly:
It appears as though another ACME client had the same issue: https://github.com/letsencrypt/pebble/issues/133
Works without errors when used against live / staging, but the speed of localhost demonstrates the issue. The issue above explains the correct flow for these requests to avoid errors.
--
BTW, relative novice here w.r.t ACME & Greenlock
Seems like this issue can be solved in
ACME._postChallengein thecheckResultfunction by adding 'pending' to the possible states that result inpollStatusgetting called. I'll submit a patch for this soon.Subsequent error is that the finalize URL is called twice - if the ACME server validates the challenge in the initial call then any further calls will error with a 403 because you can't finalize an already valid certificate. Trying to determine whether there's a POST-as-GET alternative for
ACME._pollOrderStatus- looking at other implementationsSO
ACME._pollOrderStatusshould use the same GET onorder._orderUrlas was used inACME._postChallenge. I've made a patch for this locally and it works great.I'll tidy it up a bit and create a PR.