mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
RFC 8398: EAI comparison
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9654)
This commit is contained in:
parent
69d9245996
commit
90c9319d47
@ -878,8 +878,22 @@ static int do_x509_check(X509 *x, const char *chk, size_t chklen,
|
||||
ASN1_STRING *cstr;
|
||||
|
||||
gen = sk_GENERAL_NAME_value(gens, i);
|
||||
if (gen->type != check_type)
|
||||
continue;
|
||||
if ((gen->type == GEN_OTHERNAME) && (check_type == GEN_EMAIL)) {
|
||||
if (OBJ_obj2nid(gen->d.otherName->type_id) ==
|
||||
NID_id_on_SmtpUTF8Mailbox) {
|
||||
san_present = 1;
|
||||
cstr = gen->d.otherName->value->value.utf8string;
|
||||
|
||||
/* Positive on success, negative on error! */
|
||||
if ((rv = do_check_string(cstr, 0, equal, flags,
|
||||
chk, chklen, peername)) != 0)
|
||||
break;
|
||||
} else
|
||||
continue;
|
||||
} else {
|
||||
if ((gen->type != check_type) && (gen->type != GEN_OTHERNAME))
|
||||
continue;
|
||||
}
|
||||
san_present = 1;
|
||||
if (check_type == GEN_EMAIL)
|
||||
cstr = gen->d.rfc822Name;
|
||||
|
Loading…
Reference in New Issue
Block a user