Commit Graph

1191 Commits

Author SHA1 Message Date
Fu Hanxi
ddb9fd017c ci: apply idf-ci 1.x 2026-09-03 20:24:50 +02:00
Aditya Patwardhan
6d7d89378c fix(esp-tls): Use runtime assignment for static key config length in examples
Linker symbol differences (prvtkey_pem_end - prvtkey_pem_start) are not
compile-time constants and cannot be used in static initializers.

(cherry picked from commit 4196734d1a)
2026-07-09 11:17:02 +05:30
Aditya Patwardhan
d93ab71681 feat(esp-tls): Add unified private key interface via esp_key_config_t
Add ESP_KEY_SOURCE_BUFFER and ESP_KEY_SOURCE_PSA key sources so all
hardware backends (DS, ECDSA, secure element) are accessed via PSA
key IDs through a single esp_tls_cfg_t.client_key field.

(cherry picked from commit 36090b7161)
2026-07-09 11:14:11 +05:30
Hrushikesh Bhosale
725e0b612d fix(esp_http_server): merge release/v6.0 to resolve backport conflict
Merge branch 'release/v6.0' into backport-48352-resolve to resolve a
conflict in esp_httpd_priv.h between this backport's sdkconfig.h
include and the ctrl-socket semaphore's freertos/semphr.h include.
2026-07-02 11:41:38 +05:30
Jiang Jiang Jian
1331f17ad1 Merge branch 'feat/adds_ds_qemu_test_v6.0' into 'release/v6.0'
feat: adds mutual auth example (v6.0)

See merge request espressif/esp-idf!49341
2026-06-29 15:38:21 +08:00
Mahavir Jain
4163417ff1 Merge branch 'feat/support_rom_psa_mbedtls_v6.0' into 'release/v6.0'
feat(mbedtls): enable ESP32-C2(Rev2.0) ROM mbedTLS crypto for PSA (v6.0)

See merge request espressif/esp-idf!48843
2026-06-29 11:22:33 +05:30
Mahavir Jain
a4a2a4a5cb Merge branch 'fix_https_request_rom_impl_ci_failure_v6.0' into 'release/v6.0'
fix(examples): make https_request rom_impl CI test resilient to transient external server failures (backport v6.0)

See merge request espressif/esp-idf!48418
2026-06-29 11:18:51 +05:30
Mahavir Jain
7292d67dd6 Merge branch 'feat/restful_server_upgrade_vite_version_v6.0' into 'release/v6.0'
feat(http_server/restful_server): Upgraded Vite version (v6.0)

See merge request espressif/esp-idf!49415
2026-06-29 11:17:58 +05:30
Ashish Sharma
0f11ac0623 feat(esp_http_client_mutual_auth): add mutual TLS example
Closes https://github.com/espressif/esp-idf/issues/18393
2026-06-25 10:41:00 +08:00
Hrushikesh Bhosale
542ae64088 feat(http_server/restful_server): Upgraded Vite version
- Bumped up the Vite version to 7.3.2
2026-06-09 11:24:40 +05:30
Ashish Sharma
8554f060cc fix(http_request): shifts to HTTP/1.1 in example pytest 2026-06-03 11:31:27 +08:00
Jimmy Wennlund
6036ec961d feat(esp_http_server): Make HTTP(S)_SERVER_EVENT events optional
Make it possible to disable http(s) server events. This improves
performance of the server, as http server creates events on every signle
read or write to the socket.
2026-05-27 11:58:58 +05:30
Hrushikesh Bhosale
579769ad28 fix(examples): make https_request rom_impl test resilient to transient external server errors
The rom_impl variant of the https_request example test connects to an
external server, which requires a valid system time for TLS certificate
validation. In CI, SNTP time sync can be unreachable, causing transient
failures. Write the host timestamp into the DUT's NVS partition (via the
existing write_time_to_nvs helper) before running the test, so the
firmware can set its clock without depending on external NTP servers.
2026-05-27 11:56:53 +05:30
Jiang Guang Ming
6eb7f181a2 feat(mbedtls): enable ROM mbedTLS pytest with esp32c2 rev2.0 2026-05-25 10:07:47 +08:00
Jiang Jiang Jian
0f06a3c7e7 Merge branch 'fix_https_request_ci_failure_v6.0' into 'release/v6.0'
fix(https_request): write host time to NVS to eliminate SNTP dependency in CI (backport v6.0)

See merge request espressif/esp-idf!48415
2026-05-15 14:11:29 +08:00
Jiang Jiang Jian
ecfe107ae5 Merge branch 'fix/x509_bundle_replace_unreliable_url_v6.0' into 'release/v6.0'
fix(examples): replace unreliable external URL in https_x509_bundle example (backport v6.0)

See merge request espressif/esp-idf!47718
2026-05-15 13:59:15 +08:00
hrushikesh.bhosale
6036d714ba ci(pre-commit): convert .format() to f-string for ruff UP032
Apply ruff's UP032 auto-fix on examples/protocols/https_x509_bundle/pytest_https_x509_bundle.py
to make the file pass CI's check_pre_commit job.
2026-05-13 11:36:56 +05:30
muhaidong
636b285772 fix(wifi): add ESP_WIFI_MAX_CONN_NUM-aligned ranges for soft-AP max STA Kconfig 2026-05-12 19:22:54 +08:00
hrushikesh.bhosale
7e43e5e4a4 fix(https_request): write host time to NVS to eliminate SNTP dependency in CI
Replace erase_nvs + SNTP time sync with direct NVS timestamp injection
from the pytest host. This eliminates CI flakiness caused by NTP servers
being unreachable from the CI lab network.

Changes:
- Add write_time_to_nvs() helper that generates an NVS partition image
  with the current host timestamp and flashes it to the DUT before each
  test. The firmware reads this via the existing update_time_from_nvs()
  path and skips SNTP entirely.
- Remove @pytest.mark.parametrize('erase_nvs', ['y']) from all 4
  Ethernet-based tests since NVS is now written with valid data.
2026-05-12 10:43:15 +05:30
Ashish Sharma
1d0cdd5602 fix(https_server): fixes failing example build for linux target 2026-05-10 19:29:25 +08:00
Hrushikesh Bhosale
99131e7f41 fix(https_x509_bundle): replace unreliable external URL in https_x509_bundle example
Replace howsmyssl.com with letsencrypt.org in the https_x509_bundle
example. howsmyssl.com is a third-party server that is frequently
unreachable from CI, causing flaky test failures. letsencrypt.org
chains to the same ISRG Root X1 CA, so the custom certificate bundle
validation coverage is identical.

Since letsencrypt.org was already present in the full bundle URL list,
remove the duplicate entry and reduce MAX_URLS from 9 to 8. All 6
unique root CAs in the stress test are still covered.

For the QEMU stress test, increase per-connection timeout from 30s to
60s and final completion timeout from 60s to 180s. QEMU emulated
network is 3-5x slower than real hardware for TLS handshakes.

(cherry picked from commit d6596eff3a)
(squashed with commit 995c0f129e)
2026-05-08 13:34:02 +05:30
Aditya Patwardhan
b723799c4e Merge branch 'fix/http_server_async_handler_connection_retry_v6.0' into 'release/v6.0'
fix(http_server/async_handler): Fix http_server async handler tests (backport v6.0)

See merge request espressif/esp-idf!47723
2026-05-08 13:33:34 +05:30
Aditya Patwardhan
e1aa234ce4 Merge branch 'fix/ws_echo_server_uri_registration_race_v6.0' into 'release/v6.0'
fix(http_server/ws_echo_server): Fix ws_echo_server test URI registration race condition (backport v6.0)

See merge request espressif/esp-idf!47725
2026-05-08 13:32:47 +05:30
Mahavir Jain
8e68af5c03 Merge branch 'fix/enforce_tls_version_https_request_example_v6.0' into 'release/v6.0'
fix(https_request): enforce tls version for supported ciphersuite example (v6.0)

See merge request espressif/esp-idf!48017
2026-04-29 14:45:20 +05:30
Euripedes Rocha
e65a084dd3 Merge branch 'fix/eth_init_component_v6.0' into 'release/v6.0'
fix(eth/examples): fixed ethernet_init dependency to v1.3.0 (v6.0)

See merge request espressif/esp-idf!47127
2026-04-28 08:54:08 +02:00
Ashish Sharma
9798c62856 fix(https_request): enforce tls version for supported ciphersuite example 2026-04-28 14:28:37 +08:00
Ondrej Kosta
f676162f46 fix(eth/examples): fixed ethernet_init dependency to v1.3.0 2026-04-27 15:53:06 +02:00
Hrushikesh Bhosale
002133e449 fix(http_server/ws_echo_server): Fix ws_echo_server test URI registration race condition
The WebSocket echo server tests connect immediately after seeing
'Starting server on port:' in the device log, but URI handlers
(/ws, /auth) are registered asynchronously after the server starts,
taking 40-660ms depending on config and CI load.

This causes two failures:
1. WebSocket handshake returns 404 Not Found because the URI
   handler is not registered yet when the client connects.
2. WebSocket echo returns wrong data because the server is in a
   partially initialized state.

Wait for 'Returned from app_main()' before connecting, which
guarantees all URI handlers are registered. Add connection retry
with WebSocketBadStatusException handling to WsClient.

Extract _wait_for_server_ready() helper to deduplicate the WiFi
credential input and server readiness logic.

(cherry picked from commit 7a50e3ab04)
2026-04-17 14:44:42 +05:30
Hrushikesh Bhosale
e8360dd844 fix(http_server/async_handler): Fix http_server async handler tests
The async handler CI tests fail intermittently because the TCP
connection from the pytest host to the ESP32 HTTP server times out
or gets refused.

Add a _connect_with_retry() helper that retries the TCP connection
up to 3 times with a 2-second delay between attempts, catching
TimeoutError, ConnectionRefusedError, and OSError.

Extract common server startup waiting into _wait_for_server_ready()
which includes a 2-second stabilization delay after the server
registers its URI handlers before tests begin sending requests.

(cherry picked from commit a665e7410c)
2026-04-17 14:42:15 +05:30
Ashish Sharma
ec72b956d2 feat(esp_https_server): adds support for user callback on handshake failure
Closes https://github.com/espressif/esp-idf/issues/18053
2026-04-12 18:37:23 +08:00
Marius Vikhammer
e741963f13 Merge branch 'ci/common-components-release-v6.0' into 'release/v6.0'
ci: update build-test-rules to use common_components (v6.0)

See merge request espressif/esp-idf!45547
2026-03-23 09:31:28 +08:00
igor.udot
e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Ashish Sharma
2eb3c1375f feat(http_server): adds example to test server pong response 2026-03-20 15:10:52 +08:00
Jiang Jiang Jian
c9daea6b54 Merge branch 'feat/improve_ws_server_handshake_handling_v6.0' into 'release/v6.0'
feat(http_server): improve websocket server handling (v6.0)

See merge request espressif/esp-idf!46247
2026-03-20 10:38:23 +08:00
Fu Hanxi
98e407ec45 Merge branch 'ci/improve-tests_v6.0' into 'release/v6.0'
tests: change wifi tests expect timeout to 60 (v6.0)

See merge request espressif/esp-idf!46545
2026-03-20 00:57:25 +01:00
Aditya Patwardhan
931888f3c3 Merge branch 'fix/fix_dynamic_buffer_with_tls1_3_v6.0' into 'release/v6.0'
fix: fixes failing dynamic buffer tests (v6.0)

See merge request espressif/esp-idf!46430
2026-03-19 20:21:58 +05:30
Aditya Patwardhan
305b04da81 Merge branch 'feat/adds_option_to_save_response_headers_v6.0' into 'release/v6.0'
feat(esp_http_client): adds support to save response headers (v6.0)

See merge request espressif/esp-idf!45509
2026-03-19 19:44:27 +05:30
Ashish Sharma
d96e33375c fix: removes deprecated http_crypto sources 2026-03-17 10:45:32 +08:00
Ashish Sharma
79fe9ff741 fix: fixes failing dynamic buffer tests 2026-03-17 10:45:32 +08:00
Fu Hanxi
84d80dd37d tests: change wifi tests expect timeout to 60
- wifi_router
- wifi_ap
- wifi_high_traffic
2026-03-12 15:59:26 +08:00
Mahavir Jain
fb2ebf0c6a Merge branch 'bugfix/esp_local_ctrl_arg_check_v6.0' into 'release/v6.0'
fix(esp_local_ctrl): validate payload_case matches msg_type in command dispatcher (v6.0)

See merge request espressif/esp-idf!45924
2026-03-04 13:09:56 +05:30
Ashish Sharma
222d470312 feat(http_server): improve websocket server handling
1. Adds post handshake callback
2. Removes requirement to handle HTTP_GET message in websocket handler

Closes https://github.com/espressif/esp-idf/issues/18215
2026-03-04 14:00:12 +08:00
hrushikesh.bhosale
8c357f8d7a fix(https_request): Fixed CI failure for https_request example
- Enabled chachapoly ciphersuite from menuconfig, required for
howmyssl URL
2026-03-02 10:58:08 +05:30
Mahavir Jain
439026e5ea docs(protocomm): recommend using security2 scheme for production purpose 2026-02-17 11:46:11 +05:30
Ashish Sharma
c8f1fa86a2 feat(esp_http_client): adds support to save response headers
Closes https://github.com/espressif/esp-idf/issues/17695
2026-02-03 14:40:08 +08:00
hrushikesh.bhosale
760f04392f fix(esp_http_client): Fixed the esp_http_client example test
Expected the negative value for the async req content len
2026-01-27 17:21:19 +05:30
hrushikesh.bhosale
d5cfcc0e0d fix(esp_http_client): Fixed the example pytest
Pytest was expect the positive content length for async req
2026-01-27 17:03:15 +05:30
harshal.patil
3c4dadff0b fix(mbedtls): Support partial hardware AES-GCM and s/w fallback for non-AES ciphers
- Support software-fallback for unsupported hardware AES lengths
2026-01-09 13:55:51 +05:30
Ondrej Kosta
2f5e9cd9b4 fix(ci): re-enabled ESP32P4 tests on different HW vers 2025-12-22 14:43:57 +01:00
Ashish Sharma
b02538834c fix: resolves MR comments 2025-12-20 23:02:25 +08:00