Install this module into the apache2 infrastructure. */
| 1553 | /* Install this module into the apache2 infrastructure. |
| 1554 | */ |
| 1555 | static void md_hooks(apr_pool_t *pool) |
| 1556 | { |
| 1557 | static const char *const mod_ssl[] = { "mod_ssl.c", "mod_tls.c", NULL}; |
| 1558 | static const char *const mod_wd[] = { "mod_watchdog.c", NULL}; |
| 1559 | |
| 1560 | /* Leave the ssl initialization to mod_ssl or friends. */ |
| 1561 | md_acme_init(pool, AP_SERVER_BASEVERSION, 0); |
| 1562 | |
| 1563 | ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks"); |
| 1564 | |
| 1565 | /* Run once after configuration is set, before mod_ssl. |
| 1566 | * Run again after mod_ssl is done. |
| 1567 | */ |
| 1568 | ap_hook_post_config(md_post_config_before_ssl, NULL, mod_ssl, APR_HOOK_FIRST); |
| 1569 | ap_hook_post_config(md_post_config_after_ssl, mod_ssl, mod_wd, APR_HOOK_LAST); |
| 1570 | |
| 1571 | /* Run once after a child process has been created. |
| 1572 | */ |
| 1573 | ap_hook_child_init(md_child_init, NULL, mod_ssl, APR_HOOK_MIDDLE); |
| 1574 | |
| 1575 | /* answer challenges *very* early, before any configured authentication may strike */ |
| 1576 | ap_hook_post_read_request(md_require_https_maybe, mod_ssl, NULL, APR_HOOK_MIDDLE); |
| 1577 | ap_hook_post_read_request(md_http_challenge_pr, NULL, NULL, APR_HOOK_MIDDLE); |
| 1578 | |
| 1579 | ap_hook_protocol_propose(md_protocol_propose, NULL, NULL, APR_HOOK_MIDDLE); |
| 1580 | ap_hook_protocol_switch(md_protocol_switch, NULL, NULL, APR_HOOK_MIDDLE); |
| 1581 | ap_hook_protocol_get(md_protocol_get, NULL, NULL, APR_HOOK_MIDDLE); |
| 1582 | |
| 1583 | /* Status request handlers and contributors */ |
| 1584 | ap_hook_post_read_request(md_http_cert_status, NULL, mod_ssl, APR_HOOK_MIDDLE); |
| 1585 | APR_OPTIONAL_HOOK(ap, status_hook, md_domains_status_hook, NULL, NULL, APR_HOOK_MIDDLE); |
| 1586 | APR_OPTIONAL_HOOK(ap, status_hook, md_ocsp_status_hook, NULL, NULL, APR_HOOK_MIDDLE); |
| 1587 | ap_hook_handler(md_status_handler, NULL, NULL, APR_HOOK_MIDDLE); |
| 1588 | |
| 1589 | ap_hook_ssl_answer_challenge(md_answer_challenge, NULL, NULL, APR_HOOK_MIDDLE); |
| 1590 | ap_hook_ssl_add_cert_files(md_add_cert_files, NULL, NULL, APR_HOOK_MIDDLE); |
| 1591 | ap_hook_ssl_add_fallback_cert_files(md_add_fallback_cert_files, NULL, NULL, APR_HOOK_MIDDLE); |
| 1592 | |
| 1593 | #if AP_MODULE_MAGIC_AT_LEAST(20120211, 105) |
| 1594 | ap_hook_ssl_ocsp_prime_hook(md_ocsp_prime_status, NULL, NULL, APR_HOOK_MIDDLE); |
| 1595 | ap_hook_ssl_ocsp_get_resp_hook(md_ocsp_provide_status, NULL, NULL, APR_HOOK_MIDDLE); |
| 1596 | #else |
| 1597 | #error "This version of mod_md requires Apache httpd 2.4.48 or newer." |
| 1598 | #endif /* AP_MODULE_MAGIC_AT_LEAST() */ |
| 1599 | } |
| 1600 |
nothing calls this directly
no test coverage detected