]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfSSL: Fix altSubjectName handling
authorSean Parkinson <sean@wolfssl.com>
Thu, 29 Mar 2018 04:55:55 +0000 (14:55 +1000)
committerJouni Malinen <j@w1.fi>
Wed, 2 May 2018 10:32:51 +0000 (13:32 +0300)
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
src/crypto/tls_wolfssl.c

index df7516b8eb4831da6cfad49bee81565a299d03a1..89c4c4d4fa5b0d9dcfce39282d7792e6871507df 100644 (file)
@@ -563,10 +563,6 @@ static int tls_connection_private_key(void *tls_ctx,
 }
 
 
-#define GEN_EMAIL      1
-#define GEN_DNS                ALT_NAMES_OID
-#define GEN_URI                6
-
 static int tls_match_alt_subject_component(WOLFSSL_X509 *cert, int type,
                                           const char *value, size_t len)
 {
@@ -879,19 +875,16 @@ static void wolfssl_tls_cert_event(struct tls_connection *conn,
                if (num_alt_subject == TLS_MAX_ALT_SUBJECT)
                        break;
                gen = wolfSSL_sk_value((void *) ext, i);
-#if 0
                if (gen->type != GEN_EMAIL &&
                    gen->type != GEN_DNS &&
                    gen->type != GEN_URI)
                        continue;
-#endif
 
                pos = os_malloc(10 + os_strlen((char *) gen->obj) + 1);
                if (!pos)
                        break;
                alt_subject[num_alt_subject++] = pos;
 
-#if 0
                switch (gen->type) {
                case GEN_EMAIL:
                        os_memcpy(pos, "EMAIL:", 6);
@@ -906,10 +899,6 @@ static void wolfssl_tls_cert_event(struct tls_connection *conn,
                        pos += 4;
                        break;
                }
-#else
-               os_memcpy(pos, "DNS:", 4);
-               pos += 4;
-#endif
 
                os_memcpy(pos, gen->obj, os_strlen((char *)gen->obj));
                pos += os_strlen((char *)gen->obj);