You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2021/04/22 10:17:02 UTC
svn commit: r1889101 - /httpd/httpd/trunk/modules/md/mod_md.c
Author: icing
Date: Thu Apr 22 10:17:02 2021
New Revision: 1889101
URL: http://svn.apache.org/viewvc?rev=1889101&view=rev
Log:
mod_md: make sure its post-config hook runs before mod_watchdog. if
not, mod_watchdog thinks it has nothing to do, if no one else installs
any watchdog instance.
Modified:
httpd/httpd/trunk/modules/md/mod_md.c
Modified: httpd/httpd/trunk/modules/md/mod_md.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/mod_md.c?rev=1889101&r1=1889100&r2=1889101&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/mod_md.c (original)
+++ httpd/httpd/trunk/modules/md/mod_md.c Thu Apr 22 10:17:02 2021
@@ -993,7 +993,10 @@ static apr_status_t md_post_config_after
ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(10075) "no mds to supervise");
}
- if (!mc->ocsp || md_ocsp_count(mc->ocsp) == 0) goto leave;
+ if (!mc->ocsp || md_ocsp_count(mc->ocsp) == 0) {
+ ap_log_error( APLOG_MARK, APLOG_TRACE1, 0, s, "no ocsp to manage");
+ goto leave;
+ }
md_http_use_implementation(md_curl_get_impl(p));
rv = md_ocsp_start_watching(mc, s, p);
@@ -1463,6 +1466,7 @@ static void md_child_init(apr_pool_t *po
static void md_hooks(apr_pool_t *pool)
{
static const char *const mod_ssl[] = { "mod_ssl.c", "mod_tls.c", NULL};
+ static const char *const mod_wd[] = { "mod_watchdog.c", NULL};
/* Leave the ssl initialization to mod_ssl or friends. */
md_acme_init(pool, AP_SERVER_BASEVERSION, 0);
@@ -1473,7 +1477,7 @@ static void md_hooks(apr_pool_t *pool)
* Run again after mod_ssl is done.
*/
ap_hook_post_config(md_post_config_before_ssl, NULL, mod_ssl, APR_HOOK_MIDDLE);
- ap_hook_post_config(md_post_config_after_ssl, mod_ssl, NULL, APR_HOOK_LAST);
+ ap_hook_post_config(md_post_config_after_ssl, mod_ssl, mod_wd, APR_HOOK_LAST);
/* Run once after a child process has been created.
*/
@@ -1497,7 +1501,7 @@ static void md_hooks(apr_pool_t *pool)
ap_hook_ssl_add_cert_files(md_add_cert_files, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_ssl_add_fallback_cert_files(md_add_fallback_cert_files, NULL, NULL, APR_HOOK_MIDDLE);
-#if AP_MODULE_MAGIC_AT_LEAST(20201214, 4)
+#if AP_MODULE_MAGIC_AT_LEAST(20210420, 0)
ap_hook_ssl_ocsp_prime_hook(md_ocsp_prime_status, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_ssl_ocsp_get_resp_hook(md_ocsp_provide_status, NULL, NULL, APR_HOOK_MIDDLE);
#else