Skip to content

Commit 79b6e62

Browse files
committed
modify check domain test
void code for unused variable warning do not run check_domain_name test if ssl_verify_none has been set
1 parent 7c44f14 commit 79b6e62

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

src/internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16336,7 +16336,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1633616336
}
1633716337
#endif
1633816338

16339-
16339+
WOLFSSL_MSG_EX("checking for ability to match names verifyNone = %d and domainname is null? %s", ssl->options.verifyNone, ((ssl->buffers.domainName.buffer == NULL) ? "yes" : "no"));
1634016340
if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) {
1634116341
#ifndef WOLFSSL_ALLOW_NO_CN_IN_SAN
1634216342
/* Per RFC 5280 section 4.2.1.6, "Whenever such identities
@@ -43019,7 +43019,7 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
4301943019
/* TODO: ensure other errors aren't masked by this error */
4302043020
}
4302143021
#endif
43022-
43022+
(void)code;
4302343023
CFRelease(error);
4302443024
}
4302543025
else {

tests/api.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8070,6 +8070,7 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
80708070
test_ctx.s_cb.return_code = EXPECT_FAILURE_CODEPOINT_ID;
80718071

80728072
ExpectIntEQ(test_ssl_memio_setup(&test_ctx), TEST_SUCCESS);
8073+
WOLFSSL_MSG("DONE WITH THE FEKIN SETUP");
80738074
ExpectIntEQ(test_ssl_memio_do_handshake(&test_ctx, 10, NULL), TEST_SUCCESS);
80748075

80758076
if (client_on_handshake != NULL) {
@@ -8114,6 +8115,7 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
81148115
int test_wolfSSL_client_server_nofail_memio(test_ssl_cbf* client_cb,
81158116
test_ssl_cbf* server_cb, cbType client_on_handshake)
81168117
{
8118+
WOLFSSL_MSG("EHE ANOTHER EXTENSION >:(");
81178119
return (test_wolfSSL_client_server_nofail_memio_ex(client_cb, server_cb,
81188120
client_on_handshake, NULL));
81198121
}
@@ -32798,18 +32800,8 @@ static int test_wolfSSL_check_domain(void)
3279832800
}
3279932801

3280032802
#endif /* OPENSSL_EXTRA && HAVE_SSL_MEMIO_TESTS_DEPENDENCIES */
32801-
#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && \
32802-
defined(WOLFSSL_SYS_CA_CERTS)
32803+
#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && !defined(OPENSSL_COMPATIBLE_DEFAULTS)
3280332804
static const char* dn = NULL;
32804-
static int test_wolfSSL_check_domain_basic_client_ctx(WOLFSSL_CTX* ctx)
32805-
{
32806-
EXPECT_DECLS;
32807-
32808-
ExpectIntEQ(wolfSSL_CTX_load_system_CA_certs(ctx), WOLFSSL_SUCCESS);
32809-
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER, NULL);
32810-
32811-
return EXPECT_RESULT();
32812-
}
3281332805
static int test_wolfSSL_check_domain_basic_client_ssl(WOLFSSL* ssl)
3281432806
{
3281532807
EXPECT_DECLS;
@@ -32827,8 +32819,6 @@ static int test_wolfSSL_check_domain_basic(void)
3282732819
XMEMSET(&func_cb_client, 0, sizeof(func_cb_client));
3282832820
XMEMSET(&func_cb_server, 0, sizeof(func_cb_server));
3282932821

32830-
func_cb_client.ctx_ready = &test_wolfSSL_check_domain_basic_client_ctx;
32831-
3283232822
dn = "invalid.com";
3283332823
func_cb_client.ssl_ready = &test_wolfSSL_check_domain_basic_client_ssl;
3283432824

0 commit comments

Comments
 (0)