diff -Naur a/modules/md/md_curl.c b/modules/md/md_curl.c --- a/modules/md/md_curl.c 2021-07-12 10:04:51.000000000 +0200 +++ b/modules/md/md_curl.c 2021-09-19 19:14:35.987795057 +0200 @@ -491,7 +491,7 @@ else if (APR_STATUS_IS_ENOENT(rv)) { md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, p, "multi_perform[%d reqs]: no more requests", requests->nelts); - if (!running) { + if (!requests->nelts) { goto leave; } break; @@ -524,13 +524,13 @@ } /* process status messages, e.g. that a request is done */ - while (1) { + while (running < requests->nelts) { curlmsg = curl_multi_info_read(curlm, &msgcount); if (!curlmsg) break; if (curlmsg->msg == CURLMSG_DONE) { req = find_curl_request(requests, curlmsg->easy_handle); if (req) { - md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, p, + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, 0, p, "multi_perform[%d reqs]: req[%d] done", requests->nelts, req->id); update_status(req); @@ -546,7 +546,6 @@ } } } - assert(running == requests->nelts); }; leave: diff -Naur a/modules/md/md_ocsp.c b/modules/md/md_ocsp.c --- a/modules/md/md_ocsp.c 2021-07-12 10:04:51.000000000 +0200 +++ b/modules/md/md_ocsp.c 2021-09-19 19:14:35.987795057 +0200 @@ -339,7 +339,7 @@ rv = md_cert_get_ocsp_responder_url(&ostat->responder_url, reg->p, cert); if (APR_SUCCESS != rv) { md_log_perror(MD_LOG_MARK, MD_LOG_ERR, rv, reg->p, - "md[%s]: certificate with serial %s has not OCSP responder URL", + "md[%s]: certificate with serial %s has no OCSP responder URL", name, md_cert_get_serial_number(cert, reg->p)); goto cleanup; } @@ -609,7 +609,11 @@ if (NULL == (ocsp_resp = d2i_OCSP_RESPONSE(NULL, (const unsigned char**)&der.data, (long)der.len))) { rv = APR_EINVAL; - md_result_set(update->result, rv, "response body does not parse as OCSP response"); + + md_result_set(update->result, rv, + apr_psprintf(req->pool, "req[%d] response body does not parse as " + "OCSP response, status=%d, body brigade length=%ld", + resp->req->id, resp->status, (long)der.len)); md_result_log(update->result, MD_LOG_DEBUG); goto cleanup; } @@ -635,7 +639,7 @@ * to accept it. */ switch ((n = OCSP_check_nonce(ostat->ocsp_req, basic_resp))) { case 1: - md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, 0, req->pool, + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "req[%d]: OCSP respoonse nonce does match", req->id); break; case 0: @@ -645,7 +649,7 @@ goto cleanup; case -1: - md_log_perror(MD_LOG_MARK, MD_LOG_TRACE1, 0, req->pool, + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "req[%d]: OCSP respoonse did not return the nonce", req->id); break; default: @@ -832,6 +836,9 @@ md_http_set_on_status_cb(req, ostat_on_req_status, update); md_http_set_on_response_cb(req, ostat_on_resp, update); rv = APR_SUCCESS; + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, 0, req->pool, + "scheduling OCSP request for %s, %d request in flight", + ostat->md_name, in_flight); } } cleanup: diff -Naur a/modules/md/md_reg.c b/modules/md/md_reg.c --- a/modules/md/md_reg.c 2021-05-12 12:14:42.000000000 +0200 +++ b/modules/md/md_reg.c 2021-09-19 19:14:35.988795057 +0200 @@ -549,7 +549,11 @@ rv = md_pubcert_load(reg->store, group, md->name, spec, &certs, p); } if (APR_SUCCESS != rv) goto leave; - + if (certs->nelts == 0) { + rv = APR_ENOENT; + goto leave; + } + pubcert = apr_pcalloc(p, sizeof(*pubcert)); pubcert->certs = certs; cert = APR_ARRAY_IDX(certs, 0, const md_cert_t *); diff -Naur a/modules/md/md_store_fs.c b/modules/md/md_store_fs.c --- a/modules/md/md_store_fs.c 2021-07-12 10:04:51.000000000 +0200 +++ b/modules/md/md_store_fs.c 2021-09-19 19:14:35.988795057 +0200 @@ -508,19 +508,21 @@ rv = md_util_is_dir(*pdir, p); if (APR_STATUS_IS_ENOENT(rv)) { - md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, rv, p, "not a directory, creating %s", *pdir); + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, p, "not a directory, creating %s", *pdir); rv = apr_dir_make_recursive(*pdir, perms->dir, p); if (APR_SUCCESS != rv) goto cleanup; dispatch(s_fs, MD_S_FS_EV_CREATED, group, *pdir, APR_DIR, p); } rv = apr_file_perms_set(*pdir, perms->dir); - md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, rv, p, "mk_group_dir %s perm set", *pdir); + md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, p, "mk_group_dir %s perm set", *pdir); if (APR_STATUS_IS_ENOTIMPL(rv)) { rv = APR_SUCCESS; } cleanup: - md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, rv, p, "mk_group_dir %d %s", group, name); + if (APR_SUCCESS != rv) { + md_log_perror(MD_LOG_MARK, MD_LOG_ERR, rv, p, "mk_group_dir %d %s", group, name); + } return rv; }