diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-11-08 22:37:53 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-11-08 22:37:53 +0100 |
commit | 0af1a9d270b982fda4bc62d72d9c1063a6d6f875 (patch) | |
tree | 6c1d8afb1fceb0a95ab0390be2f06d1d9d33a80b /lib/hostcheck.c | |
parent | 1394cad30fcac7eb21adb9158dfcfab10e9f53d4 (diff) | |
download | curl-0af1a9d270b982fda4bc62d72d9c1063a6d6f875.tar.gz |
hostcheck: only build for the actual users
and make local function static
Diffstat (limited to 'lib/hostcheck.c')
-rw-r--r-- | lib/hostcheck.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/hostcheck.c b/lib/hostcheck.c index c8c4ac30c..8affce044 100644 --- a/lib/hostcheck.c +++ b/lib/hostcheck.c @@ -22,6 +22,9 @@ #include "setup.h" +#if defined(USE_SSLEAY) || defined(USE_AXTLS) +/* these two backends use functions from this file */ + #include "hostcheck.h" #include "rawstr.h" @@ -34,7 +37,7 @@ * http://tools.ietf.org/html/rfc6125#section-6.4.3 */ -int Curl_hostmatch(const char *hostname, const char *pattern) +static int hostmatch(const char *hostname, const char *pattern) { const char *pattern_label_end, *pattern_wildcard, *hostname_label_end; int wildcard_enabled; @@ -85,7 +88,9 @@ int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ return 1; - if(Curl_hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) + if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) return 1; return 0; } + +#endif /* SSLEAY or AXTLS */ |