89 Commits

Author SHA1 Message Date
Ashish Sharma 25c0c9da24 fix(esp_tls): check tls connection finished before read/write operation 2026-04-09 14:09:31 +08:00
Aditya Patwardhan f96119db75 feat(esp-tls): Added support to register custom tls stack
* Removed the esp_tls_wolfssl layer from esp-tls
    * Migrated Error codes
2026-02-04 13:53:25 +05:30
Ashish Sharma cca2a54624 feat: migrates esp-tls to PSA APIs 2025-12-30 09:31:49 +05:30
0xFEEDC0DE64 5b56b00ac8 feat(esp_http_server): Allow the https server to request client certs optionally
Closes https://github.com/espressif/esp-idf/pull/17641
2025-10-27 14:19:17 +08:00
Ashish Sharma 62f852a93b feat(esp_tls): supports setting tls version and ciphersuite in server config
Closes https://github.com/espressif/esp-idf/issues/17660
2025-10-03 15:19:41 +08:00
Jared Pon 2b42a6aa2b fix(esp_tls_conn_new_sync): Fix esp_tls_conn_new_sync's doc to reflect its implementation
Closes https://github.com/espressif/esp-idf/pull/17652
Closes https://github.com/espressif/esp-idf/issues/17598
2025-09-30 10:02:20 +08:00
Ashish Sharma 08a4a2b506 docs(esp_tls): adds documentation regarding sni 2025-08-29 16:13:42 +08:00
Mahavir Jain 42914e01ee feat: remove some deprecated APIs from 6.0 release 2025-08-20 14:20:37 +05:30
nilesh.kale dedc9889de feat: added config member to store block number for hign part of ecdsa key 2025-08-11 16:01:10 +05:30
nilesh.kale 08e781c876 feat: added new config member to provide ecdsa curve type 2025-08-11 16:01:09 +05:30
nilesh.kale 68f06a94bd feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2
This commit adds testcases in crypto/hal and mbedtls testapps.
2025-08-11 16:01:01 +05:30
hrushikesh.bhosale 5928a87aa7 feat(mbedtls): Add configuration to control dynamic buffer strategy in mbedtls
Problem:
1. In low-memory scenarios, the dynamic buffer feature can fail due to memory fragmentation.
2. It requires a contiguous 16KB heap chunk, but continuous allocation and deallocation of
the RX buffer can lead to fragmentation.
3. If another component allocates memory between these operations, it can break up the
available 16KB block, causing allocation failure.

Solution:
1. Introduce configurable strategy for using dynamic buffers in TLS connections.
2. For example, convert RX buffers to static after the TLS handshake.
3. Allow users to select the strategy via a new field in the esp_http_client_cfg_t structure.
4. The strategy can be controlled independently for each TLS session.
2025-06-05 12:43:47 +05:30
Mahavir Jain 4f3e64331b Merge branch 'contrib/github_pr_14909' into 'master'
fix(esp-tls): Remove useless const from size paramter (GitHub PR)

Closes IDFGH-14099

See merge request espressif/esp-idf!36828
2025-04-07 16:48:32 +08:00
Aditya Patwardhan d31654da96 fix(esp-tls): Fixed the server session create API
Added the option to define tls_handshake_timeout value
    for the esp_tls_server_session_create API.
    At the moment, the API gets stuck infinitely if
    the handshake is blocked on recieving more data
    and the peer connection has closed due to some issue.

    Closes https://github.com/espressif/esp-idf/issues/14999
2025-02-18 14:46:33 +05:30
Aditya Patwardhan f9d64d4db8 feat(esp-tls): Update support for asynchronous server session create
Closes https://github.com/espressif/esp-idf/pull/14493
2024-11-29 17:04:31 +05:30
David Cermak 7801d118d4 fix(esp_tls): PSK available in headers only if enabled in Kconfig 2024-11-21 11:36:16 +01:00
0xFEEDC0DE64 4bbff34ac2 fix(esp-tls): Remove useless const from size paramter 2024-11-19 18:21:18 +01:00
David Cermak 7ef2379549 feat(esp_tls): Add support for PSK authentication on server side 2024-11-18 13:47:29 +01:00
Mahavir Jain 01f50ee7f5 refactor: migrate atecc608a_ecdsa example to crypto authlib repository
- ESP32-WROOM-32SE has been discontinued and marked as NRND
- This change removes all references to ESP32-WROOM-32SE from IDF
- The example has been migrated to esp-cryptoauthlib repository and it
  can be used through the component manager
  (https://components.espressif.com/components/espressif/esp-cryptoauthlib)
2023-12-22 09:11:41 +05:30
Aditya Patwardhan 56879510a5 fix(esp_https_server): Fix a breaking change
HTTPD_SSL_CONFIG_DEFAULT used to be a MACRO and hence used to return
    a const pointer. With a recent change it started not returning a
    const variable. This change reverts the function to its MACRO form.
    Updated the https_server example to use static declration
2023-12-11 08:05:10 +05:30
Aditya Patwardhan 5ce93aa257 fix(esp_tls): Refactor esp-tls to remove ESP_TLS_SERVER config option 2023-10-26 09:30:13 +00:00
Harshit Malpani 27681a5073 fix(esp-tls): Use TLS 1.2 and TLS 1.3 simultaneously
This commit fixes the issue with TLS 1.2 connection when TLS 1.3 is
enabled in config.
2023-10-23 16:23:10 +05:30
Harshit Malpani 692e1a9e61 feat: ECDSA peripheral while performing http connection with mutual auth 2023-09-08 12:22:41 +05:30
Laukik Hase 3565a9ba89 fix(esp-tls): Add explicit inclusion of header mbedtls/x509_crt.h
- Closes https://github.com/espressif/esp-idf/issues/11761
2023-07-03 14:24:38 +05:30
yuanjianmin f74447103f esp-tls: Add config and api to set and get ciphersuites list 2023-04-27 19:22:27 +08:00
Aditya Patwardhan 2dd280f126 esp-tls: Added getter/setter function for the conn_state.
* Added the setter function to set the connection sockfd value
Closes https://github.com/espressif/esp-idf/issues/10871
2023-04-13 20:03:50 +05:30
Mahavir Jain 8d90249829 Merge branch 'contrib/github_pr_10967' into 'master'
[esp-tls] Add addr_family option to esp_tls_cfg_t (GitHub PR)

Closes IDFGH-9620

See merge request espressif/esp-idf!22892
2023-03-24 18:02:31 +08:00
Mark H. Spatz 0abd1cb51f [esp-tls] Add addr_family option to esp_tls_cfg_t 2023-03-12 17:41:30 -04:00
Aditya Patwardhan 0d20f8816f esp-tls: Fix build issue when esp-tls server session tickets have been enabled.
Closes https://github.com/espressif/esp-idf/issues/10765
2023-02-24 04:45:23 +00:00
Aditya Patwardhan 8ad4de7991 esp-tls: Add changes to the Cert selection callback PR. 2022-11-03 07:17:05 +00:00
Akos Vandra e9e3dc7904 esp-tls: Add support for the CERTIFICATE SELECTION HOOK. The hook has access to required information so that the application can make a more informed decision on which certificate to serve (such as alpn value, server certificate type, etc.)
Closes https://github.com/espressif/esp-idf/pull/9833

Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
2022-11-03 07:17:05 +00:00
Aditya Patwardhan 8785d1687c esp_tls.h: Add note regarding default timeout_ms value 2022-06-21 16:33:52 +05:30
Li Jingyi 6d58008119 esp-tls: add api to free client session
Free session with mbedtls api to avoid mem-leak
2022-05-23 16:28:40 +08:00
Aditya Patwardhan aa9de02259 esp_tls.h: Clean up included header files. 2022-05-11 07:09:34 +00:00
Aditya Patwardhan 788c9ddf8d esp_tls: Added getter function for esp_tls ssl ctx. 2022-05-11 07:09:34 +00:00
Aditya Patwardhan 434e74ff73 esp_tls: Make esp_tls_t as private structure. 2022-05-11 07:09:34 +00:00
Laukik Hase 864c59c091 esp_tls: Remove deprecated API
- Removed deprecated esp_tls_conn_new() viz. duplicated by
  esp_tls_conn_new_sync()
- Removed deprecated esp_tls_conn_delete()
- Marked esp_tls_conn_http_new() as deprecated, added alternative
  esp_tls_conn_http_new_sync() (similar to esp_tls_conn_http_new_async())
2022-04-20 12:18:25 +05:30
Aditya Patwardhan 4c58685c00 esp_https_server: Enable secure element support.
Closes https://github.com/espressif/esp-idf/issues/8286
2022-03-27 14:35:25 +05:30
Aditya Patwardhan f31d8dd295 mbedtls: Remove certs.c and certs.h from port directory 2022-03-15 17:16:07 +05:30
Mahavir Jain c26500cd5a esp-tls: mark esp_tls_conn_delete API as deprecated
It is recommended to use `esp_tls_conn_destroy` API instead
2022-01-04 15:40:07 +05:30
Mahavir Jain 8b4c0e71a9 Merge branch 'feature/mbedtls_session_ticket_support' into 'master'
Feature/mbedtls session ticket support

Closes IDFGH-5288 and IDF-3242

See merge request espressif/esp-idf!14496
2021-09-17 09:59:02 +00:00
Aditya Patwardhan b4e4b9f20d Added support for client session tickets in esp-tls (with mbedtls)
* client session tickets for individual tls connections are supported
* reorganize the esp-tls error codes.
* Update esp_err_to_name.c
* Fix styling
2021-09-15 22:19:04 +05:30
Daniel Bahrdt 7e886ca9ed Implement server session ticket support with mbedtls
Closes https://github.com/espressif/esp-idf/pull/7048

Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
2021-09-15 22:19:04 +05:30
Aditya Patwardhan c6c2ea975f Fix esp_mbedtls_write API
Fix esp_wolfssl_write API
Closes https://github.com/espressif/esp-idf/issues/7461
2021-09-15 21:40:54 +05:30
Jan Brudny 967e057906 esp-tls, esp_http_client and esp_http_server: update copyright notice 2021-05-31 20:06:09 +08:00
David Cermak f68d7d7023 esp_tls: Renamed public API to indicate the Plain TCP connection
Also added parameter checks if used from as a public API
and updated the `is_plein_tcp` description that it's possible to connect
directly using plain tcp transport with the new API.
2021-05-25 10:55:50 +02:00
David Cermak f249ddd9ae esp_transport: Use tcp_connect from esp_tls for plain TCP
so we don't have to allocate esp_tls structure (~2KB) to save heap when using plain TCP connection

Closes https://github.com/espressif/esp-idf/issues/6940
2021-05-25 07:04:02 +02:00
yuanjm c62cbd1254 transport: Support bind socket to specified interface in transport and esp-tls 2021-03-10 02:19:29 +00:00
David Cermak 6b318fe583 esp_tls: Updated connection method to use non-blocking connect
For better control over connection timeouts
To be in line with former tcp_transport, as esp-tls is not used for
plain tcp transports
2021-02-16 09:00:43 +01:00
David Cermak 2c28ffffee tcp_transport/esp_tls: Use common TCP transport to reduce code duplication
For high level review of the changes.
2021-02-16 09:00:43 +01:00