From fb32f6ea42e6916ff88cc44cf5de6e63ba596aca Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 11 Aug 2023 09:41:57 +0100 Subject: [PATCH] Fix no-dtls and no-tls in combination Reviewed-by: Hugo Landau Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21722) --- test/sslapitest.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/sslapitest.c b/test/sslapitest.c index f29f1289c98..b50929eddbe 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1712,6 +1712,8 @@ end: return testresult; } +#if !defined(OPENSSL_NO_TLS1_2) || !defined(OSSL_NO_USABLE_TLS1_3) \ + || !defined(OPENSSL_NO_DTLS) static int execute_cleanse_plaintext(const SSL_METHOD *smeth, const SSL_METHOD *cmeth, int min_version, int max_version) @@ -1734,15 +1736,13 @@ static int execute_cleanse_plaintext(const SSL_METHOD *smeth, privkey))) goto end; -#ifdef OPENSSL_NO_DTLS1_2 - if (smeth == DTLS_server_method()) { # ifdef OPENSSL_NO_DTLS1_2 + if (smeth == DTLS_server_method()) { /* Not supported in the FIPS provider */ if (is_fips) { testresult = 1; goto end; }; -# endif /* * Default sigalgs are SHA1 based in