Lines Matching full:hostname
50 static bool pmatch(const char *hostname, size_t hostlen, in pmatch() argument
55 return strncasecompare(hostname, pattern, hostlen); in pmatch()
59 * Match a hostname against a wildcard pattern.
77 static bool hostmatch(const char *hostname, in hostmatch() argument
85 /* normalize pattern and hostname by stripping off trailing dots */ in hostmatch()
87 if(hostname[hostlen-1]=='.') in hostmatch()
94 return pmatch(hostname, hostlen, pattern, patternlen); in hostmatch()
96 /* detect IP address as hostname and fail the match if so */ in hostmatch()
97 if(Curl_host_is_ipnum(hostname)) in hostmatch()
106 return pmatch(hostname, hostlen, pattern, patternlen); in hostmatch()
108 hostname_label_end = memchr(hostname, '.', hostlen); in hostmatch()
112 size_t skiphost = hostname_label_end - hostname; in hostmatch()
119 label of the hostname is at least as large as the left-most label in hostmatch()
121 if(hostname_label_end - hostname < pattern_label_end - pattern) in hostmatch()
126 return strncasecompare(pattern, hostname, prefixlen) && in hostmatch()
135 const char *hostname, size_t hostlen) in Curl_cert_hostcheck() argument
137 if(match && *match && hostname && *hostname) in Curl_cert_hostcheck()
138 return hostmatch(hostname, hostlen, match, matchlen); in Curl_cert_hostcheck()