From 6f6f413312934e5ab8250741e2535293e1d7b237 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 22 Jul 2022 11:12:52 +0100 Subject: Fix no-dtls1_2 dtlstest.c needs some adjusting to handle no-dtls1_2 since commit 7bf2e4d7f0c banned DTLSv1 at the default security level - causing the test to fail. Reviewed-by: Tomas Mraz Reviewed-by: Todd Short Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/18848) (cherry picked from commit a6843e6ae8ae0551aae8555783f06dab7951f112) --- test/dtlstest.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/dtlstest.c') diff --git a/test/dtlstest.c b/test/dtlstest.c index 35c616cabd..e32b03b454 100644 --- a/test/dtlstest.c +++ b/test/dtlstest.c @@ -425,6 +425,12 @@ static int test_just_finished(void) &sctx, NULL, cert, privkey))) return 0; +#ifdef OPENSSL_NO_DTLS1_2 + /* DTLSv1 is not allowed at the default security level */ + if (!TEST_true(SSL_CTX_set_cipher_list(sctx, "DEFAULT:@SECLEVEL=0"))) + goto end; +#endif + serverssl = SSL_new(sctx); rbio = BIO_new(BIO_s_mem()); wbio = BIO_new(BIO_s_mem()); -- cgit v1.2.3