Lines Matching refs:hostname
41 * Match a hostname against a wildcard pattern.
60 static int hostmatch(char *hostname, char *pattern)
70 /* normalize pattern and hostname by stripping off trailing dots */
71 size_t len = strlen(hostname);
72 if(hostname[len-1]=='.')
73 hostname[len-1]=0;
80 return Curl_raw_equal(pattern, hostname) ?
83 /* detect IP address as hostname and fail the match if so */
84 if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
87 else if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0)
101 return Curl_raw_equal(pattern, hostname) ?
104 hostname_label_end = strchr(hostname, '.');
110 label of the hostname is at least as large as the left-most label
112 if(hostname_label_end - hostname < pattern_label_end - pattern)
117 return Curl_raw_nequal(pattern, hostname, prefixlen) &&
123 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
129 !hostname || !*hostname) /* sanity check */
134 hostp = strdup(hostname);