Lines Matching refs:pattern
568 typedef int (*equal_fn)(const unsigned char *pattern, size_t pattern_len,
572 /* Skip pattern prefix to match "wildcard" subject */
577 const unsigned char *pattern = *p;
582 * pattern is longer, compare just an equal-length suffix with the
589 while (pattern_len > subject_len && *pattern)
592 *pattern == '.')
594 ++pattern;
601 *p = pattern;
607 static int equal_nocase(const unsigned char *pattern, size_t pattern_len,
611 skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
616 unsigned char l = *pattern;
618 /* The pattern must not contain NUL characters. */
630 ++pattern;
638 static int equal_case(const unsigned char *pattern, size_t pattern_len,
642 skip_prefix(&pattern, &pattern_len, subject, subject_len, flags);
645 return !memcmp(pattern, subject, pattern_len);
753 * At most one wildcard per pattern.
826 static int equal_wildcard(const unsigned char *pattern, size_t pattern_len,
833 * Subject names starting with '.' can only match a wildcard pattern
834 * via a subject sub-domain pattern suffix match.
837 star = valid_star(pattern, pattern_len, flags);
839 return equal_nocase(pattern, pattern_len,
841 return wildcard_match(pattern, star - pattern,
842 star + 1, (pattern + pattern_len) - star - 1,
904 /* Implicit client-side DNS sub-domain pattern */