};
static acme_problem_status_t Problems[] = {
+ { "acme:error:agreementRequired", APR_EGENERAL, 1 },
{ "acme:error:badCSR", APR_EINVAL, 1 },
{ "acme:error:badNonce", APR_EAGAIN, 0 },
{ "acme:error:badSignatureAlgorithm", APR_EINVAL, 1 },
{ "acme:error:serverInternal", APR_EGENERAL, 0 },
{ "acme:error:unauthorized", APR_EACCES, 0 },
{ "acme:error:unsupportedIdentifier", APR_BADARG, 1 },
- { "acme:error:userActionRequired", APR_EAGAIN, 0 },
+ { "acme:error:userActionRequired", APR_EGENERAL, 1 },
{ "acme:error:badRevocationReason", APR_EINVAL, 1 },
{ "acme:error:caa", APR_EGENERAL, 0 },
{ "acme:error:dns", APR_EGENERAL, 0 },
req->resp_json = problem;
ptype = md_json_gets(problem, MD_KEY_TYPE, NULL);
- pdetail = md_json_gets(problem, MD_KEY_DETAIL, NULL);
- req->rv = problem_status_get(ptype);
- md_result_problem_set(req->result, req->rv, ptype, pdetail,
- md_json_getj(problem, MD_KEY_SUBPROBLEMS, NULL));
-
-
-
- if (APR_STATUS_IS_EAGAIN(req->rv)) {
- md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, req->rv, req->p,
- "acme reports %s: %s", ptype, pdetail);
- }
- else {
- md_log_perror(MD_LOG_MARK, MD_LOG_WARNING, req->rv, req->p,
- "acme problem %s: %s", ptype, pdetail);
+
+ if (ptype) {
+ req->rv = problem_status_get(ptype);
+ pdetail = md_json_gets(problem, MD_KEY_DETAIL, NULL);
+
+ md_result_problem_set(req->result, req->rv, ptype, pdetail,
+ md_json_getj(problem, MD_KEY_SUBPROBLEMS, NULL));
+
+ if (APR_STATUS_IS_EAGAIN(req->rv)) {
+ md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, req->rv, req->p,
+ "acme reports %s: %s", ptype, pdetail);
+ }
+ else {
+ md_log_perror(MD_LOG_MARK, MD_LOG_WARNING, req->rv, req->p,
+ "acme problem %s: %s", ptype, pdetail);
+ }
+ return req->rv;
}
- return req->rv;
}
}