From 9d3e477b6318912272ed62d7a4f473e66b8f97b3 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 20 Dec 2024 17:24:13 -0600 Subject: [PATCH] src/ssl.c: gate wolfSSL_dtls_set_pending_peer() on !defined(WOLFSSL_NO_SOCK), not just defined(WOLFSSL_DTLS_CID). tests/api.c: in test_dtls12_basic_connection_id(), omit chacha20 suites if defined(HAVE_FIPS), and fix gate on DHE-PSK-NULL-SHA256. --- src/ssl.c | 4 ++-- tests/api.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 816aeee8e2..12c5388f4b 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1935,7 +1935,7 @@ int wolfSSL_dtls_set_peer(WOLFSSL* ssl, void* peer, unsigned int peerSz) #endif } -#ifdef WOLFSSL_DTLS_CID +#if defined(WOLFSSL_DTLS_CID) && !defined(WOLFSSL_NO_SOCK) int wolfSSL_dtls_set_pending_peer(WOLFSSL* ssl, void* peer, unsigned int peerSz) { #ifdef WOLFSSL_DTLS @@ -1981,7 +1981,7 @@ int wolfSSL_dtls_set_pending_peer(WOLFSSL* ssl, void* peer, unsigned int peerSz) return WOLFSSL_NOT_IMPLEMENTED; #endif } -#endif +#endif /* WOLFSSL_DTLS_CID && !WOLFSSL_NO_SOCK */ int wolfSSL_dtls_get_peer(WOLFSSL* ssl, void* peer, unsigned int* peerSz) { diff --git a/tests/api.c b/tests/api.c index d897c2ec9b..0596e990a1 100644 --- a/tests/api.c +++ b/tests/api.c @@ -98531,7 +98531,7 @@ static int test_dtls12_basic_connection_id(void) #endif /* WOLFSSL_AES_128 && WOLFSSL_STATIC_RSA */ #endif /* NO_SHA256 */ #endif /* NO_RSA */ -#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305) +#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305) && !defined(HAVE_FIPS) "DHE-RSA-CHACHA20-POLY1305", "DHE-RSA-CHACHA20-POLY1305-OLD", "ECDHE-RSA-CHACHA20-POLY1305", @@ -98540,7 +98540,7 @@ static int test_dtls12_basic_connection_id(void) #ifndef NO_PSK "DHE-PSK-AES128-CBC-SHA256", "DHE-PSK-AES256-GCM-SHA384", -#ifndef HAVE_NULL_CIPHER +#ifdef HAVE_NULL_CIPHER "DHE-PSK-NULL-SHA256", #endif "DHE-PSK-AES128-CCM",