@@ -49,6 +49,7 @@ struct acme_problem_status_t {
4949};
5050
5151static acme_problem_status_t Problems [] = {
52+ { "acme:error:agreementRequired" , APR_EGENERAL , 1 },
5253 { "acme:error:badCSR" , APR_EINVAL , 1 },
5354 { "acme:error:badNonce" , APR_EAGAIN , 0 },
5455 { "acme:error:badSignatureAlgorithm" , APR_EINVAL , 1 },
@@ -61,7 +62,7 @@ static acme_problem_status_t Problems[] = {
6162 { "acme:error:serverInternal" , APR_EGENERAL , 0 },
6263 { "acme:error:unauthorized" , APR_EACCES , 0 },
6364 { "acme:error:unsupportedIdentifier" , APR_BADARG , 1 },
64- { "acme:error:userActionRequired" , APR_EAGAIN , 0 },
65+ { "acme:error:userActionRequired" , APR_EGENERAL , 1 },
6566 { "acme:error:badRevocationReason" , APR_EINVAL , 1 },
6667 { "acme:error:caa" , APR_EGENERAL , 0 },
6768 { "acme:error:dns" , APR_EGENERAL , 0 },
@@ -182,22 +183,24 @@ static apr_status_t inspect_problem(md_acme_req_t *req, const md_http_response_t
182183
183184 req -> resp_json = problem ;
184185 ptype = md_json_gets (problem , MD_KEY_TYPE , NULL );
185- pdetail = md_json_gets (problem , MD_KEY_DETAIL , NULL );
186- req -> rv = problem_status_get (ptype );
187- md_result_problem_set (req -> result , req -> rv , ptype , pdetail ,
188- md_json_getj (problem , MD_KEY_SUBPROBLEMS , NULL ));
189-
190-
191-
192- if (APR_STATUS_IS_EAGAIN (req -> rv )) {
193- md_log_perror (MD_LOG_MARK , MD_LOG_DEBUG , req -> rv , req -> p ,
194- "acme reports %s: %s" , ptype , pdetail );
195- }
196- else {
197- md_log_perror (MD_LOG_MARK , MD_LOG_WARNING , req -> rv , req -> p ,
198- "acme problem %s: %s" , ptype , pdetail );
186+
187+ if (ptype ) {
188+ req -> rv = problem_status_get (ptype );
189+ pdetail = md_json_gets (problem , MD_KEY_DETAIL , NULL );
190+
191+ md_result_problem_set (req -> result , req -> rv , ptype , pdetail ,
192+ md_json_getj (problem , MD_KEY_SUBPROBLEMS , NULL ));
193+
194+ if (APR_STATUS_IS_EAGAIN (req -> rv )) {
195+ md_log_perror (MD_LOG_MARK , MD_LOG_DEBUG , req -> rv , req -> p ,
196+ "acme reports %s: %s" , ptype , pdetail );
197+ }
198+ else {
199+ md_log_perror (MD_LOG_MARK , MD_LOG_WARNING , req -> rv , req -> p ,
200+ "acme problem %s: %s" , ptype , pdetail );
201+ }
202+ return req -> rv ;
199203 }
200- return req -> rv ;
201204 }
202205 }
203206
0 commit comments