From 0d9be8855167a1b638bf42d2dc03b03f34004d0c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 18 Apr 2022 16:45:42 +0300 Subject: [PATCH] wolfSSL: Fix certificate commonName checking wolfSSL_X509_NAME_get_index_by_NID() uses NID_* to identify the entry. Signed-off-by: Jouni Malinen --- src/crypto/tls_wolfssl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/crypto/tls_wolfssl.c b/src/crypto/tls_wolfssl.c index fd12f71d2..18116652c 100644 --- a/src/crypto/tls_wolfssl.c +++ b/src/crypto/tls_wolfssl.c @@ -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);