Skip to content

Commit 02db0e6

Browse files
committed
BUG/MINOR: acme: allow "processing" in challenge requests
Allow the "processing" status in the challenge object when requesting to do the challenge, in addition to "pending". According to RFC 8555 https://datatracker.ietf.org/doc/html/rfc8555/#section-7.1.6 Challenge objects are created in the "pending" state. They transition to the "processing" state when the client responds to the challenge (see Section 7.5.1) However some CA could respond with a "processing" state without ever transitioning to "pending". Must be backported to 3.2.
1 parent c103123 commit 02db0e6

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/acme.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ enum acme_ret acme_res_challenge(struct task *task, struct acme_ctx *ctx, struct
12301230
}
12311231
trash.data = res;
12321232

1233-
if (strncasecmp("pending", trash.area, trash.data) == 0) {
1233+
if (strncasecmp("pending", trash.area, trash.data) == 0 || strncasecmp("processing", trash.area, trash.data) == 0) {
12341234
if (chk) { /* during challenge chk */
12351235
memprintf(errmsg, "challenge status: %.*s", (int)trash.data, trash.area);
12361236
ret = ACME_RET_RETRY;
@@ -1241,16 +1241,10 @@ enum acme_ret acme_res_challenge(struct task *task, struct acme_ctx *ctx, struct
12411241
}
12421242
}
12431243

1244-
/* during challenge check */
12451244
if (strncasecmp("valid", trash.area, trash.data) == 0) {
12461245
ret = ACME_RET_OK;
12471246
goto out;
12481247
}
1249-
if (strncasecmp("processing", trash.area, trash.data) == 0) {
1250-
memprintf(errmsg, "challenge status: %.*s", (int)trash.data, trash.area);
1251-
ret = ACME_RET_RETRY;
1252-
goto out;
1253-
}
12541248

12551249
if (hc->res.status < 200 || hc->res.status >= 300 || mjson_find(hc->res.buf.area, hc->res.buf.data, "$.error", NULL, NULL) == MJSON_TOK_OBJECT) {
12561250
/* XXX: need a generic URN error parser */

0 commit comments

Comments
 (0)