The new statem client tests added in comimt
c36a9b4 assume that if
OPENSSL_NO_DTLS is not defined, that we have DTLS support, but we have
this odd setup in which we can have DTLS enabled, but DTLS1_2 disabled,
in which case the needed support isn't present, and the test fails.
why we have it setup that way, I'm not sure, but we should only run the
dtls tests if both DTLS and DTLS1_2 support is available.
Fixes #31851
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Jul 6 09:42:44 2026
(Merged from https://github.com/openssl/openssl/pull/31582)
/* DTLS happy-path / cookie / random-reuse tests */
-#ifndef OPENSSL_NO_DTLS
+#if !defined(OPENSSL_NO_DTLS) && !defined(OPENSSL_NO_DTLS1_2)
static int test_construct_ch_dtls(void)
{
CH_CONFIG cfg = { 1, 0, 0, 0 };
#endif /* OPENSSL_NO_CACHED_FETCH */
#endif /* OSSL_NO_USABLE_TLS1_3 */
-#ifndef OPENSSL_NO_DTLS
+#if !defined(OPENSSL_NO_DTLS) && !defined(OPENSSL_NO_DTLS1_2)
ADD_TEST(test_construct_ch_dtls);
ADD_TEST(test_construct_ch_dtls_cookie);
ADD_TEST(test_construct_ch_dtls_client_random);