| 738 | } |
| 739 | |
| 740 | static 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 | |
| 762 | static 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) |
no test coverage detected