From: Jouni Malinen Date: Mon, 18 Apr 2022 13:45:42 +0000 (+0300) Subject: wolfSSL: Fix certificate commonName checking X-Git-Tag: hostap_2_11~2024 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d9be8855167a1b638bf42d2dc03b03f34004d0c;p=thirdparty%2Fhostap.git wolfSSL: Fix certificate commonName checking wolfSSL_X509_NAME_get_index_by_NID() uses NID_* to identify the entry. Signed-off-by: Jouni Malinen --- 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);