Conversation
ESP-IDF removed the CONFIG_ESP_TLS_SERVER Kconfig option starting with v5.3; server support is always available under mbedTLS. The `esp_idf_esp_tls_server` cfg is therefore never emitted on current IDF, which silently compiled out all server-side TLS support: ServerConfig, negotiate_server, and related helpers. Keep `esp_idf_esp_tls_server` for IDF ≤ 5.2 (where the option still exists and defaults to off), and also enable the APIs on IDF ≥ 5.3 when using mbedTLS (`esp_idf_version_at_least_5_3_0` + `esp_idf_esp_tls_using_mbedtls`).
Expose negotiate_server_init/continue and tls_handshake_timeout_ms so callers can progress handshakes on a non-blocking socket without blocking their event loop.
esp_tls_server_session_init/continue_async and esp_tls_cfg_server::tls_handshake_timeout_ms were added in ESP-IDF 5.5.1. Compiling them under the broader ≥5.3 server gate broke CI on v5.3.4 and v5.4.3. Keep blocking ServerConfig/negotiate_server on the ≥5.3 dual gate; require 5.5.1 + mbedTLS for the async helpers, timeout field, and tls_server example.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo fmtcommand to ensure that all changed code is formatted correctly.cargo clippycommand to ensure that all changed code passes latest Clippy nightly lints.CHANGELOG.mdin the proper section.Pull Request Details 📖
Description
This is #667 with all the review feedback applied.
Most important two highlights / evolution from #667:
asyncinfrastructure (EspAsyncTls::negotiate_server); the "old style" non-blocking IO with the POSIXselectprimitive is still supported, but de-emphasizedtls_server_asyncexample demonstrates theasyncapproach now (and is renamed appropriately)Testing
With a browser and with the new
tls_server_asyncexample.