Lines Matching refs:hostname
38 * Match a hostname against a wildcard pattern.
57 static int hostmatch(char *hostname, char *pattern)
67 /* normalize pattern and hostname by stripping off trailing dots */
68 size_t len = strlen(hostname);
69 if(hostname[len-1]=='.')
70 hostname[len-1]=0;
77 return Curl_raw_equal(pattern, hostname) ?
80 /* detect IP address as hostname and fail the match if so */
81 if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
84 else if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0)
98 return Curl_raw_equal(pattern, hostname) ?
101 hostname_label_end = strchr(hostname, '.');
107 label of the hostname is at least as large as the left-most label
109 if(hostname_label_end - hostname < pattern_label_end - pattern)
114 return Curl_raw_nequal(pattern, hostname, prefixlen) &&
120 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
126 !hostname || !*hostname) /* sanity check */
131 hostp = strdup(hostname);