Skip to content

Commit 2616fe3

Browse files
committed
Better guards around tests
1 parent d088fee commit 2616fe3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/api.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,7 +2054,8 @@ static int test_wolfSSL_CTX_set_cipher_list_bytes(void)
20542054

20552055
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && \
20562056
!defined(WOLFSSL_NO_TLS12) && \
2057-
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER))
2057+
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER)) && \
2058+
((!defined(NO_RSA) && defined(HAVE_ECC)) || !defined(NO_ERROR_STRINGS))
20582059
/* Helper function to check if TLS 1.3 suites exist in the suites list */
20592060
static int suites_has_tls13(const byte* suites, word16 suiteSz)
20602061
{
@@ -2087,7 +2088,7 @@ static int test_wolfSSL_set_cipher_list_tls12_keeps_tls13(void)
20872088
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && \
20882089
!defined(WOLFSSL_NO_TLS12) && \
20892090
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER)) && \
2090-
defined(HAVE_ECC)
2091+
defined(HAVE_ECC) && !defined(NO_RSA)
20912092
WOLFSSL_CTX* ctx = NULL;
20922093
WOLFSSL* ssl = NULL;
20932094

@@ -2121,7 +2122,8 @@ static int test_wolfSSL_set_cipher_list_tls13_keeps_tls12(void)
21212122
EXPECT_DECLS;
21222123
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && \
21232124
!defined(WOLFSSL_NO_TLS12) && \
2124-
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER))
2125+
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER)) && \
2126+
!defined(NO_ERROR_STRINGS)
21252127
WOLFSSL_CTX* ctx = NULL;
21262128
WOLFSSL* ssl = NULL;
21272129

@@ -2156,7 +2158,7 @@ static int test_wolfSSL_set_cipher_list_tls12_with_version(void)
21562158
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && \
21572159
!defined(WOLFSSL_NO_TLS12) && \
21582160
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER)) && \
2159-
defined(HAVE_ECC)
2161+
defined(HAVE_ECC) && !defined(NO_RSA)
21602162
WOLFSSL_CTX* ctx = NULL;
21612163
WOLFSSL* ssl = NULL;
21622164

@@ -2195,7 +2197,8 @@ static int test_wolfSSL_set_cipher_list_tls13_with_version(void)
21952197
EXPECT_DECLS;
21962198
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && \
21972199
!defined(WOLFSSL_NO_TLS12) && \
2198-
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER))
2200+
(!defined(NO_WOLFSSL_CLIENT) || !defined(NO_WOLFSSL_SERVER)) && \
2201+
!defined(NO_ERROR_STRINGS)
21992202
WOLFSSL_CTX* ctx = NULL;
22002203
WOLFSSL* ssl = NULL;
22012204

0 commit comments

Comments
 (0)