| 2267 | } |
| 2268 | |
| 2269 | apr_status_t ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p) |
| 2270 | { |
| 2271 | server_rec *s; |
| 2272 | SSLSrvConfigRec *sc; |
| 2273 | #ifndef HAVE_TLSEXT |
| 2274 | server_rec *ps; |
| 2275 | apr_hash_t *table; |
| 2276 | const char *key; |
| 2277 | apr_ssize_t klen; |
| 2278 | |
| 2279 | BOOL conflict = FALSE; |
| 2280 | #endif |
| 2281 | |
| 2282 | /* |
| 2283 | * Give out warnings when a server has HTTPS configured |
| 2284 | * for the HTTP port or vice versa |
| 2285 | */ |
| 2286 | for (s = base_server; s; s = s->next) { |
| 2287 | sc = mySrvConfig(s); |
| 2288 | |
| 2289 | if ((sc->enabled == SSL_ENABLED_TRUE) && (s->port == DEFAULT_HTTP_PORT)) { |
| 2290 | ap_log_error(APLOG_MARK, APLOG_WARNING, 0, |
| 2291 | base_server, APLOGNO(01915) |
| 2292 | "Init: (%s) You configured HTTPS(%d) " |
| 2293 | "on the standard HTTP(%d) port!", |
| 2294 | ssl_util_vhostid(p, s), |
| 2295 | DEFAULT_HTTPS_PORT, DEFAULT_HTTP_PORT); |
| 2296 | } |
| 2297 | |
| 2298 | if ((sc->enabled == SSL_ENABLED_FALSE) && (s->port == DEFAULT_HTTPS_PORT)) { |
| 2299 | ap_log_error(APLOG_MARK, APLOG_WARNING, 0, |
| 2300 | base_server, APLOGNO(01916) |
| 2301 | "Init: (%s) You configured HTTP(%d) " |
| 2302 | "on the standard HTTPS(%d) port!", |
| 2303 | ssl_util_vhostid(p, s), |
| 2304 | DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT); |
| 2305 | } |
| 2306 | } |
| 2307 | |
| 2308 | #ifndef HAVE_TLSEXT |
| 2309 | /* |
| 2310 | * Give out warnings when more than one SSL-aware virtual server uses the |
| 2311 | * same IP:port and an OpenSSL version without support for TLS extensions |
| 2312 | * (SNI in particular) is used. |
| 2313 | */ |
| 2314 | table = apr_hash_make(p); |
| 2315 | |
| 2316 | for (s = base_server; s; s = s->next) { |
| 2317 | char *addr; |
| 2318 | |
| 2319 | sc = mySrvConfig(s); |
| 2320 | |
| 2321 | if (!((sc->enabled == SSL_ENABLED_TRUE) && s->addrs)) { |
| 2322 | continue; |
| 2323 | } |
| 2324 | |
| 2325 | apr_sockaddr_ip_get(&addr, s->addrs->host_addr); |
| 2326 | key = apr_psprintf(p, "%s:%u", addr, s->addrs->host_port); |
no test coverage detected