From: Stefan Eissing Date: Tue, 8 Feb 2022 10:00:21 +0000 (+0000) Subject: *) mod_md: the status description in MDomain's JSON, exposed in the X-Git-Tag: 2.4.53-rc1-candidate~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7cefc5cf921e440f0ee6cbd1c3a9b764cb77609;p=thirdparty%2Fapache%2Fhttpd.git *) mod_md: the status description in MDomain's JSON, exposed in the md-status handler (if configure) did sometimes not carry the correct message when certificates needed renew. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1897849 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/mod_md_status_memory.txt b/changes-entries/mod_md_status_memory.txt new file mode 100644 index 00000000000..2ebd10ff891 --- /dev/null +++ b/changes-entries/mod_md_status_memory.txt @@ -0,0 +1,4 @@ + *) mod_md: the status description in MDomain's JSON, exposed in the + md-status handler (if configure) did sometimes not carry the correct + message when certificates needed renew. + [Stefan Eissing] diff --git a/modules/md/md_reg.c b/modules/md/md_reg.c index 0fe6fff3056..4fba9c7ae45 100644 --- a/modules/md/md_reg.c +++ b/modules/md/md_reg.c @@ -208,7 +208,12 @@ static apr_status_t state_init(md_reg_t *reg, apr_pool_t *p, md_t *md) if (md->renew_window == NULL) md->renew_window = reg->renew_window; if (md->warn_window == NULL) md->warn_window = reg->warn_window; - + + if (md->domains && md->domains->pool != p) { + md_log_perror(MD_LOG_MARK, MD_LOG_ERR, 0, p, + "md{%s}: state_init called with foreign pool", md->name); + } + for (i = 0; i < md_cert_count(md); ++i) { spec = md_pkeys_spec_get(md->pks, i); md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, rv, p, @@ -902,7 +907,7 @@ apr_status_t md_reg_sync_finish(md_reg_t *reg, md_t *md, apr_pool_t *p, apr_pool md->ca_proto = MD_PROTO_ACME; } - rv = state_init(reg, ptemp, md); + rv = state_init(reg, p, md); if (APR_SUCCESS != rv) goto leave; md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, rv, ptemp, "loading md %s", md->name);