Commit Graph

246 Commits

Author SHA1 Message Date
Mahavir Jain
a8bf745f23 Merge branch 'feat/adding_different_strategy_to_perform_tls_using_dynamic_feature' into 'master'
Add configuration to control dynamic buffer strategy in mbedtls

Closes IDF-12591

See merge request espressif/esp-idf!39469
2025-06-12 09:52:35 +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
Ashish Sharma
2ef09a7952 fix(esp_tls): fix failing build with TLS1.3 only and dynamic buffer 2025-06-02 09:14:03 +08:00
Zhang Xiao Yan
97f904b6fb Merge branch 'docs/fix_some_typos' into 'master'
docs: Fix some typos

Closes DOC-10600, DOC-10605, DOC-10606, DOC-10607, DOC-10608, and DOC-10671

See merge request espressif/esp-idf!37977
2025-04-30 18:35:40 +08:00
Shen Meng Jing
62d4115e08 docs: Fix some typos 2025-04-30 18:35:39 +08:00
Mahavir Jain
ff555428d1 Merge branch 'feat/dynamic_buffer_tls1.3' into 'master'
feat(mbedtls): add support for dynamic buffer for TLS1.3

Closes IDFGH-14708, IDF-12469, IDF-9178, and IDF-1725

See merge request espressif/esp-idf!38258
2025-04-30 17:52:43 +08:00
Aditya Patwardhan
f6a7bcb54e fix(esp-tls): Fixed build issue in esp-tls related to IPV6 only config 2025-04-24 15:14:35 +05:30
Ashish Sharma
415e0f3c86 feat(mbedtls): add support for dynamic buffer for TLS1.3
Closes https://github.com/espressif/esp-idf/issues/15448
2025-04-24 12:05:36 +08:00
Ashish Sharma
0bad622a7a fix(esp_tls): use correct sockaddr struct size when calling connect()
Closes https://github.com/espressif/esp-idf/issues/15812
2025-04-23 13:23:44 +08:00
harshal.patil
e738ec5ccd fix(esp-tls): Fix build failure when CONFIG_MBEDTLS_SHA1_C is disabled 2025-04-21 13:38:29 +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
Mahavir Jain
21f59bd030 Merge branch 'feat/update_mbedtls_3.6.3' into 'master'
feat(component/mbedtls): update to upstream v3.6.3

Closes IDF-12730

See merge request espressif/esp-idf!38041
2025-04-01 18:38:12 +08:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Ashish Sharma
0291bee0ff feat(mbedtls): update to version 3.6.3 2025-03-28 13:03:12 +08:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Aditya Patwardhan
877057db3d Merge branch 'fix/fix_timeout_issue_in_https_server' into 'master'
fix(esp-tls): Fixed the server session create API

Closes IDFGH-14201

See merge request espressif/esp-idf!36519
2025-02-23 19:07:00 +08:00
Cristian Funes
bfa25448b7 change(secure-element): Removed dependency on esp32 to use secure element
Closes https://github.com/espressif/esp-idf/pull/14785
Closes https://github.com/espressif/esp-idf/issues/14761
2025-02-19 14:54:24 +05:30
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
Gao Xu
1e8a48db74 Merge branch 'feat/h21_enable_ci_build_test' into 'master'
feat(esp32h21): enable ESP32H21 ci build

Closes IDF-11561

See merge request espressif/esp-idf!36197
2025-02-07 14:10:54 +08:00
gaoxu
5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
harshal.patil
7d8211bf87 feat(mbedtls): Support both SHA block and DMA modes during runtime
Dynamically switch the SHA operation modes based on the buffer operating length
2025-02-04 16:49:30 +05:30
Alexey Lapshin
888b5f7e8d feat(newlib): add picolibc support 2024-12-02 21:35:56 +07:00
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
thetek42
d97e435af9 fix: make esp_tls_server_session_create async compatible 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
559e554178 Merge branch 'contrib/github_pr_14503' into 'master'
feat(esp-tls): add option to enable/disable the full set of OCSP checks for wolfSSL (GitHub PR)

Closes IDFGH-13619

See merge request espressif/esp-idf!33700
2024-09-23 16:57:24 +08:00
Frank Mertens
ba27281c3e change(esp-tls): add option to enable/disable the full set of OCSP checks for wolfSSL 2024-09-20 12:47:08 +02:00
Aditya Patwardhan
a261827ae0 fix(esp-tls): Remove unused config option from esp-wolfssl 2024-09-20 16:09:40 +05:30
Aditya Patwardhan
e957b50e50 fix(esp-tls): Reduce parameter check for esp_tls_conn_read
Previously the *data parameters of esp_tls_conn_read
    was required to be non-NULL after espressif/esp-idf!28358.
    This prevents users from using a functionality in esp_tls_conn_read
    where calling `esp_tls_conn_read(ctx, NULL, 0);` triggers the
    transfer of contents from tcp layer to mbedtls (ssl) layer.
    After this the user can read the contents from
    esp_tls_get_bytes_avail().
    This commit removes the additional NULL check on the data field
    to keep this functionality enabled.
2024-08-23 12:08:42 +05:30
wanlei
3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
Alexey Lapshin
ed6e497c6f feat(build): add COMPILER_STATIC_ANALYZER option 2024-06-18 14:25:37 +08:00
Frank Mertens
7a1239457e change(esp-tls): make wolfSSL backend send SNI and enable OCSP
Almost all sites these days are virtually hosted and hence
SNI (server name indicator TLS extension) should be enabled by
default.

In addition this change enables OCSP (online server status protocol)
support for esp-tls clients using the wolfSSL backend.
The 3 code lines enable OCSP stabling v1.
By default this feature is disabled.
(I will send another PR on esp-wolfssl repository to allow to
enable it easily.)
2024-05-30 21:02:12 +08:00
Frank Mertens
7e1e3df43c fix(esp-tls): make the wolfSSL backend send entire client certificate chains
This change makes the wolfSSL backend sent the complete TLS client certificate
chain. This align the wolfSSL backend with the behavior of the mbedTLS backend.
Some servers need the intermediate certificates to verify a client certificate.
If the provided PEM file contains only a single certificate this change has no effect
and the behavior will be as before.
This impacts higher level APIs to function as someone would expect.
E.g.: esp_websocket_client_config_t.client_cert: when passing here a pem
file containing 2 certificates (the CA's and the client's) it would be
expected that both are transmitted during TLS handshake.
2024-05-30 21:02:12 +08:00
Sudeep Mohanty
41a8521774 fix(esp-tls): Fix compilation for linux target on macos
This commit fixes compilation errors for the esp-tls component for the
linux target on a MacOS system.
2024-05-13 10:13:54 +02:00
Aditya Patwardhan
132892c101 fix(esp-tls): Use 64 bit variable for time instead of 32 bit
Use appropriate API available on respective platform for obtaining
    time
    Closes https://github.com/espressif/esp-idf/issues/13593
2024-05-02 18:34:29 +05:30
Harshit Malpani
aece182482 fix: Fix error logging formatting bug for nano formatting
Closes https://github.com/espressif/esp-idf/issues/13604
2024-04-23 00:02:46 +05:30
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Jakob Hasse
f482a9153a Merge branch 'fix/add_libbsd_string_h' into 'master'
refactor(linux): Unified libbsd handling

See merge request espressif/esp-idf!29457
2024-03-21 10:11:25 +08:00
harshal.patil
bc899d0bad ci(esp-tls): Fix test-specific leak for ESP32-P4 2024-03-13 15:22:07 +05:30
Jakob Hasse
4d629be602 refactor(linux): Unified libbsd handling
* Users can now use libbsd string.h and sys/cdefs.h functionality
  (e.g., strlcpy, containerof) on Linux by just including
  string.h or sys/cdefs.h. In other words, the includes are the same
  on the Linux target as well as on chips targets (ESP32, etc.).
* libbsd linking is done by the linux component (belongs to common
  components) now instead of handling it separately in each component
2024-03-08 12:26:54 +08:00
Marius Vikhammer
ffd62352de Merge branch 'ci/test_limit_main_cleanup' into 'master'
ci(test_apps): limit dependencies for misc test_apps

See merge request espressif/esp-idf!29088
2024-02-21 09:26:25 +08:00
Marius Vikhammer
1f7c666701 ci(test_apps): limit dependencies for misc test_apps
Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.
2024-02-18 16:01:58 +08:00
Harshit Malpani
9274e3e620 fix(esp-tls): capture errors in error handle 2024-02-14 14:36:14 +05:30
Aditya Patwardhan
4d8436b90c fix(esp_tls): Fixed input argument checks for public APIs 2024-01-29 01:24:41 +08:00
Aditya Patwardhan
e2d5b323ca fix(esp_tls): Fixed client key parsing for ECC key
Client key parsing for ECC keys was failing as the
    RNG supplied to the key parsing API was uninitialized.
    This commit fixes that behaviour
2024-01-23 13:40:57 +08: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
Ivan Grokhotkov
8bf23e5372 fix(esp-tls): fix build for IDF_TARGET=linux on macOS 2023-12-19 13:28:59 +01:00
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