XRootD
XrdTlsHostcheck.hh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CURL_HOST_MATCH   1
 
#define CURL_HOST_NOMATCH   0
 

Functions

int Curl_cert_hostcheck (const char *match_pattern, const char *hostname)
 

Macro Definition Documentation

◆ CURL_HOST_MATCH

#define CURL_HOST_MATCH   1

Definition at line 26 of file XrdTlsHostcheck.hh.

◆ CURL_HOST_NOMATCH

#define CURL_HOST_NOMATCH   0

Definition at line 25 of file XrdTlsHostcheck.hh.

Function Documentation

◆ Curl_cert_hostcheck()

int Curl_cert_hostcheck ( const char *  match_pattern,
const char *  hostname 
)

Definition at line 205 of file XrdTlsHostcheck.icc.

206 {
207  if(!match_pattern || !*match_pattern ||
208  !hostname || !*hostname) /* sanity check */
209  return 0;
210 
211  if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
212  return 1;
213 
214  if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH)
215  return 1;
216  return 0;
217 }
#define CURL_HOST_MATCH
static int Curl_raw_equal(const char *first, const char *second)
static int hostmatch(const char *hostname, const char *pattern)

References CURL_HOST_MATCH, Curl_raw_equal(), and hostmatch().

Referenced by matches_common_name(), and matches_subject_alternative_name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: