wolfSSL: Fix certificate commonName checking

wolfSSL_X509_NAME_get_index_by_NID() uses NID_* to identify the entry.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-04-18 16:45:42 +03:00
parent 94e0f39d97
commit 0d9be88551

View file

@ -701,8 +701,7 @@ static int tls_match_suffix_helper(WOLFSSL_X509 *cert, const char *match,
WOLFSSL_X509_NAME_ENTRY *e;
WOLFSSL_ASN1_STRING *cn;
i = wolfSSL_X509_NAME_get_index_by_NID(name, ASN_COMMON_NAME,
i);
i = wolfSSL_X509_NAME_get_index_by_NID(name, NID_commonName, i);
if (i == -1)
break;
e = wolfSSL_X509_NAME_get_entry(name, i);