Changeset b7098b2 in mod_gnutls for src/gnutls_hooks.c
- Timestamp:
- Sep 25, 2011, 11:57:38 PM (9 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, msva, proxy-ticket, upstream
- Children:
- 0cfcbf3
- Parents:
- 8581fac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r8581fac rb7098b2 605 605 for (s = ap_server_conf; s; s = s->next) { 606 606 607 tsc = 608 (mgs_srvconf_rec *) 609 ap_get_module_config(s->module_config, &gnutls_module); 610 if (tsc->enabled != GNUTLS_ENABLED_TRUE) { 611 continue; 612 } 607 tsc = (mgs_srvconf_rec *) ap_get_module_config(s->module_config, 608 &gnutls_module); 609 610 if (tsc->enabled != GNUTLS_ENABLED_TRUE) { continue; } 613 611 #if MOD_GNUTLS_DEBUG 614 612 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, … … 621 619 (unsigned int) s->next, (unsigned int) tsc); 622 620 #endif 623 /* The CN can contain a * -- this will match those too. */ 624 if (ap_strcasecmp_match(sni_name, tsc->cert_cn) == 0) { 625 #if MOD_GNUTLS_DEBUG 626 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, 627 ctxt->c->base_server, 628 "GnuTLS: Virtual Host: " 629 "'%s' == '%s'", tsc->cert_cn, 630 sni_name); 631 #endif 632 return tsc; 633 } 634 } 621 /* Check ServerName First! */ 622 if(!apr_strnatcasecmp(sni_name, s->server_hostname)) { 623 return tsc; 624 } else if(s->names) { 625 /* ServerAlias Directives */ 626 names = s->names; 627 char **name = (char **)names->elts; 628 for (i = 0; i < names->nelts; ++i) { 629 if (!name[i]) { continue; } 630 if (!apr_strnatcasecmp(sni_name, name[i])) { 631 return tsc; } 632 } 633 } else if(s->wild_names) { 634 /* Wild ServerAlias Directives */ 635 names = s->wild_names; 636 char **name = (char **)names->elts; 637 for (i = 0; i < names->nelts; ++i) { 638 if (!name[i]) { continue; } 639 if (!ap_strcasecmp_match(sni_name, name[i])) { 640 return tsc; } 641 } 642 } /* End Wild Names*/ 643 } /* End For Loop */ 635 644 #endif 636 645 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.