From b2e661562557568aef263e880b80c6a441f0c385 Mon Sep 17 00:00:00 2001 From: Hannes Tschofenig Date: Wed, 23 Nov 2022 10:53:44 +0100 Subject: [PATCH] Added deprecated warning in check_config.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warns about the removal of the legacy DTLS Connection ID feature in a future version of Mbed TLS. Signed-off-by: Hannes Tschofenig Signed-off-by: Manuel Pégourié-Gonnard --- include/mbedtls/check_config.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 519c2b1ffc..6bfb9faa55 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -908,6 +908,13 @@ #error "MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT defined, but not all prerequsites" #endif +#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT) && MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT != 0 +#if defined(MBEDTLS_DEPRECATED_REMOVED) +#error "MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT is deprecated and will be removed in a future version of Mbed TLS" +#elif defined(MBEDTLS_DEPRECATED_WARNING) +#warning "MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT is deprecated and will be removed in a future version of Mbed TLS" +#endif +#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT && MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT != 0 */ #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_2)