]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfSSL: Fix certificate commonName checking
authorJouni Malinen <j@w1.fi>
Mon, 18 Apr 2022 13:45:42 +0000 (16:45 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 18 Apr 2022 13:45:42 +0000 (16:45 +0300)
wolfSSL_X509_NAME_get_index_by_NID() uses NID_* to identify the entry.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/tls_wolfssl.c

index fd12f71d2fa0174b8069fcb1af40fdd56b4bb693..18116652c8b3408a5f3c4e08cfacca11b1d5f32c 100644 (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);