From 84a5bb67f29c8234ac835ef406fe98175d44065a Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 26 Jan 2023 14:56:50 -0600 Subject: [PATCH] tests/api.c: in test_tls13_apis(), conditionalize expected return value of wolfSSL_CTX_set_max_early_data() on WOLFSSL_ERROR_CODE_OPENSSL (only affects !OPENSSL_EXTRA paths). --- tests/api.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/api.c b/tests/api.c index d88fe04fd..441d89673 100644 --- a/tests/api.c +++ b/tests/api.c @@ -50956,7 +50956,11 @@ static int test_tls13_apis(void) #endif #endif #ifndef OPENSSL_EXTRA +#ifdef WOLFSSL_ERROR_CODE_OPENSSL + AssertIntEQ(wolfSSL_CTX_set_max_early_data(serverCtx, 32), WOLFSSL_SUCCESS); +#else AssertIntEQ(wolfSSL_CTX_set_max_early_data(serverCtx, 32), 0); +#endif AssertIntEQ(wolfSSL_CTX_get_max_early_data(serverCtx), 32); #else AssertIntEQ(SSL_CTX_set_max_early_data(serverCtx, 32), 1); @@ -50973,7 +50977,11 @@ static int test_tls13_apis(void) #endif #ifndef NO_WOLFSSL_CLIENT #ifndef OPENSSL_EXTRA +#ifdef WOLFSSL_ERROR_CODE_OPENSSL + AssertIntEQ(wolfSSL_set_max_early_data(clientSsl, 17), WOLFSSL_SUCCESS); +#else AssertIntEQ(wolfSSL_set_max_early_data(clientSsl, 17), 0); +#endif AssertIntEQ(wolfSSL_get_max_early_data(clientSsl), 17); #else AssertIntEQ(SSL_set_max_early_data(clientSsl, 17), WOLFSSL_SUCCESS); @@ -50991,7 +50999,11 @@ static int test_tls13_apis(void) #endif #endif #ifndef OPENSSL_EXTRA +#ifdef WOLFSSL_ERROR_CODE_OPENSSL + AssertIntEQ(wolfSSL_set_max_early_data(serverSsl, 16), WOLFSSL_SUCCESS); +#else AssertIntEQ(wolfSSL_set_max_early_data(serverSsl, 16), 0); +#endif AssertIntEQ(wolfSSL_get_max_early_data(serverSsl), 16); #else AssertIntEQ(SSL_set_max_early_data(serverSsl, 16), 1);