diff --git a/tests/api.c b/tests/api.c index 126f43851ce..acf6c2a87ad 100644 --- a/tests/api.c +++ b/tests/api.c @@ -5533,6 +5533,9 @@ static int test_wolfSSL_clear_chain_certs(void) return EXPECT_RESULT(); } +/* Guarded exactly as its only caller below is: the caller drives a full + * client/server handshake, so without the client this hook has no user and + * -Werror=unused-function rejects the build. */ #if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) && defined(OPENSSL_EXTRA) && \ defined(KEEP_OUR_CERT) && !defined(NO_RSA) && !defined(NO_TLS) && \ !defined(NO_WOLFSSL_SERVER) && !defined(NO_WOLFSSL_CLIENT) && \ diff --git a/tests/api/test_tls_msgtype.c b/tests/api/test_tls_msgtype.c index 6371063ac0f..74cfd86f3e0 100644 --- a/tests/api/test_tls_msgtype.c +++ b/tests/api/test_tls_msgtype.c @@ -1191,7 +1191,7 @@ int test_tls_msgtype_connection_id(void) { EXPECT_DECLS; #if defined(WOLFSSL_DTLS_CID) && !defined(NO_WOLFSSL_CLIENT) && !defined(NO_TLS) && \ - defined(HAVE_TLS_EXTENSIONS) + defined(HAVE_TLS_EXTENSIONS) && defined(WOLFSSL_TLS13) WOLFSSL_CTX* ctx = NULL; WOLFSSL* ssl = NULL; byte buf[8]; diff --git a/tests/api/test_tls_parse.c b/tests/api/test_tls_parse.c index 084b23931cc..e8e1a85431e 100644 --- a/tests/api/test_tls_parse.c +++ b/tests/api/test_tls_parse.c @@ -1153,6 +1153,7 @@ int test_TLSX_SecureRenegotiation_parse(void) /* Client side response direction: *input == 2*TLS_FINISHED_SZ, but the * declared extension length disagrees with it -- length is the * second, independent half of that check. */ +#ifndef NO_WOLFSSL_CLIENT ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method()); ExpectNotNull(ctx); ssl = NULL; @@ -1183,6 +1184,7 @@ int test_TLSX_SecureRenegotiation_parse(void) } wolfSSL_free(ssl); wolfSSL_CTX_free(ctx); +#endif #endif return EXPECT_RESULT(); }