Skip to content

Commit

Permalink
Fix no-dtls and no-tls in combination
Browse files Browse the repository at this point in the history
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #21722)
  • Loading branch information
mattcaswell authored and t8m committed Aug 15, 2023
1 parent f7b2942 commit fb32f6e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/sslapitest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,8 @@ static int test_large_app_data(int tst)
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)
Expand All @@ -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 <DTLS1.2 which is in security
* level 0
Expand All @@ -1752,7 +1752,7 @@ static int execute_cleanse_plaintext(const SSL_METHOD *smeth,
"DEFAULT:@SECLEVEL=0")))
goto end;
}
#endif
# endif

if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
NULL, NULL)))
Expand Down Expand Up @@ -1819,6 +1819,10 @@ static int execute_cleanse_plaintext(const SSL_METHOD *smeth,

return testresult;
}
#endif /*
* !defined(OPENSSL_NO_TLS1_2) || !defined(OSSL_NO_USABLE_TLS1_3)
* || !defined(OPENSSL_NO_DTLS)
*/

static int test_cleanse_plaintext(void)
{
Expand Down

0 comments on commit fb32f6e

Please sign in to comment.