Lines Matching +defs:match +defs:end

628 static int tls_match_alt_subject(WOLFSSL_X509 *cert, const char *match)
631 const char *pos, *end;
634 pos = match;
647 "TLS: Invalid altSubjectName match '%s'",
651 end = os_strchr(pos, ';');
652 while (end) {
653 if (os_strncmp(end + 1, "EMAIL:", 6) == 0 ||
654 os_strncmp(end + 1, "DNS:", 4) == 0 ||
655 os_strncmp(end + 1, "URI:", 4) == 0)
657 end = os_strchr(end + 1, ';');
659 if (end)
660 len = end - pos;
665 pos = end + 1;
666 } while (end);
672 static int domain_suffix_match(const char *val, size_t len, const char *match,
689 if (os_strncasecmp(val + len - match_len, match, match_len) != 0)
690 return 0; /* no match */
693 return 1; /* exact match */
696 return 1; /* full label match completes suffix match */
698 wpa_printf(MSG_DEBUG, "TLS: Reject due to incomplete label match");
703 static int tls_match_suffix_helper(WOLFSSL_X509 *cert, const char *match,
714 full ? "" : "suffix ", match);
728 wolfSSL_ASN1_STRING_length(gen->d.ia5), match,
731 full ? "Match" : "Suffix match");
761 match, match_len, full) == 1) {
763 full ? "Match" : "Suffix match");
774 static int tls_match_suffix(WOLFSSL_X509 *cert, const char *match, int full)
778 /* Process each match alternative separately until a match is found */
779 while ((token = cstr_token(match, ";", &last))) {
983 char *match, *altmatch, *suffix_match, *domain_match;
1013 match = conn->subject_match;
1085 if (depth == 0 && match && os_strstr(buf, match) == NULL) {
1087 "TLS: Subject '%s' did not match with '%s'",
1088 buf, match);
1096 "TLS: altSubjectName match '%s' not found",
1105 "TLS: Domain suffix match '%s' not found",
1113 wpa_printf(MSG_WARNING, "TLS: Domain match '%s' not found",
1213 "wolfSSL: Checking only server certificate match");
1300 wpa_printf(MSG_INFO, "Error setting subject match");
1866 char buf[128], *pos, *end;
1875 end = pos + sizeof(buf);
1905 ret = os_snprintf(pos, end - pos, ":%s", suite);
1906 if (os_snprintf_error(end - pos, ret))