mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
modify check domain test
void code for unused variable warning do not run check_domain_name test if ssl_verify_none has been set
This commit is contained in:
@@ -16336,7 +16336,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
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"));
|
||||
if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) {
|
||||
#ifndef WOLFSSL_ALLOW_NO_CN_IN_SAN
|
||||
/* Per RFC 5280 section 4.2.1.6, "Whenever such identities
|
||||
@@ -43019,7 +43019,7 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
|
||||
/* TODO: ensure other errors aren't masked by this error */
|
||||
}
|
||||
#endif
|
||||
|
||||
(void)code;
|
||||
CFRelease(error);
|
||||
}
|
||||
else {
|
||||
|
16
tests/api.c
16
tests/api.c
@@ -8070,6 +8070,7 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
|
||||
test_ctx.s_cb.return_code = EXPECT_FAILURE_CODEPOINT_ID;
|
||||
|
||||
ExpectIntEQ(test_ssl_memio_setup(&test_ctx), TEST_SUCCESS);
|
||||
WOLFSSL_MSG("DONE WITH THE FEKIN SETUP");
|
||||
ExpectIntEQ(test_ssl_memio_do_handshake(&test_ctx, 10, NULL), TEST_SUCCESS);
|
||||
|
||||
if (client_on_handshake != NULL) {
|
||||
@@ -8114,6 +8115,7 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
|
||||
int test_wolfSSL_client_server_nofail_memio(test_ssl_cbf* client_cb,
|
||||
test_ssl_cbf* server_cb, cbType client_on_handshake)
|
||||
{
|
||||
WOLFSSL_MSG("EHE ANOTHER EXTENSION >:(");
|
||||
return (test_wolfSSL_client_server_nofail_memio_ex(client_cb, server_cb,
|
||||
client_on_handshake, NULL));
|
||||
}
|
||||
@@ -32798,18 +32800,8 @@ static int test_wolfSSL_check_domain(void)
|
||||
}
|
||||
|
||||
#endif /* OPENSSL_EXTRA && HAVE_SSL_MEMIO_TESTS_DEPENDENCIES */
|
||||
#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && \
|
||||
defined(WOLFSSL_SYS_CA_CERTS)
|
||||
#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && !defined(OPENSSL_COMPATIBLE_DEFAULTS)
|
||||
static const char* dn = NULL;
|
||||
static int test_wolfSSL_check_domain_basic_client_ctx(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
EXPECT_DECLS;
|
||||
|
||||
ExpectIntEQ(wolfSSL_CTX_load_system_CA_certs(ctx), WOLFSSL_SUCCESS);
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER, NULL);
|
||||
|
||||
return EXPECT_RESULT();
|
||||
}
|
||||
static int test_wolfSSL_check_domain_basic_client_ssl(WOLFSSL* ssl)
|
||||
{
|
||||
EXPECT_DECLS;
|
||||
@@ -32827,8 +32819,6 @@ static int test_wolfSSL_check_domain_basic(void)
|
||||
XMEMSET(&func_cb_client, 0, sizeof(func_cb_client));
|
||||
XMEMSET(&func_cb_server, 0, sizeof(func_cb_server));
|
||||
|
||||
func_cb_client.ctx_ready = &test_wolfSSL_check_domain_basic_client_ctx;
|
||||
|
||||
dn = "invalid.com";
|
||||
func_cb_client.ssl_ready = &test_wolfSSL_check_domain_basic_client_ssl;
|
||||
|
||||
|
Reference in New Issue
Block a user