Changeset 3c6645b in mod_gnutls
- Timestamp:
- Nov 2, 2018, 7:57:02 AM (4 years ago)
- Branches:
- asyncio, debian/master, master, proxy-ticket
- Children:
- 6d8c00c
- Parents:
- 96e2ea8
- git-author:
- Fiona Klute <fiona.klute@…> (11/02/18 07:46:09)
- git-committer:
- Fiona Klute <fiona.klute@…> (11/02/18 07:57:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r96e2ea8 r3c6645b 875 875 int check_server_aliases(vhost_cb_rec *x, server_rec * s, mgs_srvconf_rec *tsc) 876 876 { 877 878 879 880 881 882 883 884 885 886 887 888 889 890 877 apr_array_header_t *names; 878 int rv = 0; 879 char ** name; 880 881 /* Check ServerName First! */ 882 if(apr_strnatcasecmp(x->sni_name, s->server_hostname) == 0) { 883 // We have a match, save this server configuration 884 x->sc = tsc; 885 rv = 1; 886 /* Check any ServerAlias directives */ 887 } else if(s->names->nelts) { 888 names = s->names; 889 name = (char **)names->elts; 890 for (int i = 0; i < names->nelts; ++i) 891 891 { 892 893 894 895 896 897 898 899 900 901 902 903 892 if (!name[i]) { continue; } 893 if (apr_strnatcasecmp(x->sni_name, name[i]) == 0) { 894 // We have a match, save this server configuration 895 x->sc = tsc; 896 rv = 1; 897 } 898 } 899 /* Wild any ServerAlias Directives */ 900 } else if(s->wild_names->nelts) { 901 names = s->wild_names; 902 name = (char **)names->elts; 903 for (int i = 0; i < names->nelts; ++i) 904 904 { 905 906 907 908 909 910 911 912 913 914 915 916 905 if (!name[i]) { continue; } 906 if(apr_fnmatch(name[i], x->sni_name , 907 APR_FNM_CASE_BLIND| 908 APR_FNM_PERIOD| 909 APR_FNM_PATHNAME| 910 APR_FNM_NOESCAPE) == APR_SUCCESS) { 911 x->sc = tsc; 912 rv = 1; 913 } 914 } 915 } 916 return rv; 917 917 } 918 918
Note: See TracChangeset
for help on using the changeset viewer.