Skip to content

mbedtls: Guard TLS 1.3 + session tickets usage inside ifdef - #20789

Closed
DanielDiazOrion wants to merge 1 commit into
curl:masterfrom
DanielDiazOrion:mbedtls-no-tls13
Closed

DanielDiazOrion wants to merge 1 commit into
curl:masterfrom
DanielDiazOrion:mbedtls-no-tls13

Conversation

@DanielDiazOrion

Copy link
Copy Markdown
Contributor

If TLS 1.3 is not supported, the call to mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets() will fail 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.

If TLS 1.3 is not supported, the call to
`mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets()`
will fail 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.

Signed-off-by: Daniel Díaz <daniel.diaz@sonos.com>
@github-actions github-actions Bot added the TLS label Mar 2, 2026
@vszakats vszakats added the build label Mar 2, 2026
@vszakats vszakats closed this in 3aa6389 Mar 2, 2026
@vszakats

vszakats commented Mar 2, 2026

Copy link
Copy Markdown
Member

Thank you @DanielDiazOrion, merged now!

outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
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 curl#20789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants