From 3aa63896ae7a745fc50fa9cfa0bef0adb74462f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=ADaz?= Date: Fri, 27 Feb 2026 15:07:01 -0600 Subject: [PATCH] mbedtls: guard TLS 1.3 + session tickets usage inside ifdef If TLS 1.3 is not supported, the call to `mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets()` fails during compilation: ``` curl-8.18.0/lib/vtls/mbedtls.c: In function 'mbed_connect_step1': curl-8.18.0/lib/vtls/mbedtls.c:809:3: error: implicit declaration of function 'mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets' [-Werror=implicit-function-declaration] mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets(&backend->config, ^ curl-8.18.0/lib/vtls/mbedtls.c:809:3: warning: nested extern declaration of 'mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets' [-Wnested-externs] ``` Protect this call inside the `#ifdef` block by making sure that support for TLS 1.3 is defined. Closes #20789 --- lib/vtls/mbedtls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index f37dc81944..ce9f3ac6bb 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -814,6 +814,7 @@ static CURLcode mbed_configure_ssl(struct Curl_cfilter *cf, #endif #if defined(MBEDTLS_SSL_SESSION_TICKETS) && \ + defined(MBEDTLS_SSL_PROTO_TLS1_3) && \ MBEDTLS_VERSION_NUMBER >= 0x03060100 && \ MBEDTLS_VERSION_NUMBER < 0x04000000 /* New in mbedTLS 3.6.1, need to enable, default is now disabled. 4.0.0