MCPcopy Create free account
hub / github.com/apache/httpd / check_invalid_duplicates

Function check_invalid_duplicates

modules/md/mod_md.c:740–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738}
739
740static apr_status_t check_invalid_duplicates(server_rec *base_server)
741{
742 server_rec *s;
743 md_srv_conf_t *sc;
744
745 ap_log_error( APLOG_MARK, APLOG_TRACE1, 0, base_server,
746 "checking duplicate ssl assignments");
747 for (s = base_server; s; s = s->next) {
748 sc = md_config_get(s);
749 if (!sc || !sc->assigned) continue;
750
751 if (sc->assigned->nelts > 1 && sc->is_ssl) {
752 /* duplicate assignment to SSL VirtualHost, not allowed */
753 ap_log_error(APLOG_MARK, APLOG_ERR, 0, base_server, APLOGNO(10042)
754 "conflict: %d MDs match to SSL VirtualHost %s, there can at most be one.",
755 (int)sc->assigned->nelts, s->server_hostname);
756 return APR_EINVAL;
757 }
758 }
759 return APR_SUCCESS;
760}
761
762static apr_status_t check_usage(md_mod_conf_t *mc, md_t *md, server_rec *base_server,
763 apr_pool_t *p, apr_pool_t *ptemp)

Callers 1

md_post_config_after_sslFunction · 0.85

Calls 2

md_config_getFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected