Commit Graph

145 Commits

Author SHA1 Message Date
harshal.patil
c97d3aed45
fix(mbedtls/aes-gcm): Fix null pointer derefernce coverity reports
- Also fixed a tcp_transport report
2024-03-13 11:42:03 +05:30
Marius Vikhammer
bab0fa8a03 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-21 09:34:29 +08: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
Chen Yudong
2e11919f70 fix(ci): change build-test-rules files folder 2023-09-20 19:17:06 +08:00
Harshit Malpani
692e1a9e61
feat: ECDSA peripheral while performing http connection with mutual auth 2023-09-08 12:22:41 +05:30
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
KonstantinKondrashov
e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00
David Cermak
b2af4d9689 lwip/linux: Add lwip support for networking component under linux
linux/lwip: Wrap some IO posix functions
* to workaourd the FreeRTOS EINTR issue (when building without lwip)
* to correctly choose the sub-system based on fd (when building with
lwip) -- passing control to either linux/system or to lwip
This commit also addapts tapio-if to provide DHCP client by default and
configurable settings for static IP
2023-05-05 05:03:39 +00:00
Marius Vikhammer
bca026455c ci: remove redundent ci configs for chip support and network components
CI would build psram config test apps even for target with no psram.
2023-04-26 09:54:29 +08:00
Euripedes Rocha
6007142628 ci: Migrate unit test for tcp_transport to unit test app 2023-04-11 08:36:24 +00:00
Euripedes Rocha
d6db90a3cd [tcp_transport] - Adds Socks4 proxy transport
- Basic implementation of Socks4 protocol.
- Introduce basic host testing.
2023-03-27 14:46:40 +02:00
Steinbart Andreas (HAU-EDS)
9def9b6a03 [ws_transport] - Added esp_transport_ws_get_upgrade_request_status API 2023-02-16 12:19:40 +00:00
yuanjianmin
fecf4768f0 tcp_transport: Add authorization header for websocket client 2023-02-02 17:35:44 +08:00
Harshit Malpani
0635dc36c1
tcp_transport: Update tcp_transport to support linux build 2023-01-04 11:17:29 +05:30
Euripedes Rocha
88844e1504 tcp_transport: Adjust test task priorities.
Raise the listener task priority to be higher than runner task priority.
2022-12-05 07:02:28 +00:00
David Cermak
dc1f6b3aef tcp_transport: Fix error propagation on tcp_read() 2022-11-02 18:43:57 +01:00
Rocha Euripedes
8dff5bbf69 Merge branch 'bugfix/wrong_ws_mask_check' into 'master'
[tcp_transport] Bugfix: Remove unecessary mask_key check

See merge request espressif/esp-idf!20366
2022-10-05 21:47:42 +08:00
Euripedes Rocha
456d6a5d17 [tcp_transport] - Change log level on socket reading timeout
- Log level set to VERBOSE to reduce noise on debug.
2022-09-30 09:59:08 +02:00
Euripedes Rocha
56a54afae9 [tcp_transport] Bugfix: Remove unecessary mask_key check
- In the processing of WS payload the check for a valid mask_key was
  made by checking for a valid address. The address is always valid and
  the test is meaningless.
- Mask key is initialized in the process of header reading and set to 0
  in case of mask not set.
2022-09-27 11:00:37 +02:00
Euripedes Rocha
736424c366 [MQTT] Simplifies MQTT CMakeLists file
- Uses mocks from tools instead of creating them.
- Move host based definition to test code.
2022-09-19 09:11:15 +00:00
Aditya Patwardhan
ce32183749 tcp_transport: Add support of setting the common name fot the TLS
context
2022-09-13 05:31:43 +00:00
David Čermák
1890501ac9 Merge branch 'unit_test_for_C2_tcp_transport' into 'master'
Re-enable unit test for C2 tcp_transport

Closes IDF-5144

See merge request espressif/esp-idf!19150
2022-08-18 13:50:17 +08:00
AndriiFilippov
5433abebfa Re-enable unit test for C2 tcp_transport 2022-08-16 08:45:20 +00:00
AndriiFilippov
0013ad5bb9 Replaced logging tags with lower case in tcp_transport component to unite all tags under common structure. 2022-08-16 08:38:57 +00:00
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Euripedes Rocha
5778a7c726 [tcp_transport] Fix initialition of transport
- Foundation was initialized only for SSL.
- Removed base from list.
- Changed SSL and TCP initialition.
- Clean of state data structures.
2022-07-14 12:29:58 +00:00
Zim Kalinowski
ce098ecea8 Merge branch 'feature/freertos-smp-adjust-performance-thresholds' into 'master'
freertos: adjust freertos smp performance thresholds

See merge request espressif/esp-idf!18389
2022-06-15 17:23:00 +08:00
Zim Kalinowski
56f2c86dd4 freertos: adjust performance test thresholds for SMP 2022-06-09 09:25:40 +02:00
Li Jingyi
21d65931fc tcp_transport: add websocket dynamic buffer feature
Free websocket transport buffer when connection succeed to save peak heap cost about WS_BUFFER_SIZE.
2022-06-08 19:13:25 +00:00
morris
aa3ddbc3c6 Merge branch 'test/enable_c2_target_tests' into 'master'
ci: enable target tests for ESP32-C2

Closes IDF-4989

See merge request espressif/esp-idf!18182
2022-06-03 16:41:24 +08:00
David Čermák
46e599c56d Merge branch 'feature/lwip_rework_patches' into 'master'
lw-IP: Reworked patches

Closes IDFGH-6197

See merge request espressif/esp-idf!17388
2022-06-03 15:26:55 +08:00
Michael (XIAO Xufeng)
6a8aed12ee ci: partially enable ut tests for esp32c2
Disabled test cases are tracked in:

 IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131

- test_fatfs: IDF-5136

- test_pm: IDF-5053

- test_cache_mmu: IDF-5138

- test_partitions: IDF-5137

- test_vfs: IDF-5139

- test_freertos: IDF-5140

- test_wpa_supplicant: IDF-5046

- test_mbedtls: IDF-5141

- test_pthread: IDF-5142

- test_protocomm: IDF-5143

- test_lightsleep: IDF-5053

- test_taskwdt: IDF-5055

- test_tcp_transport: IDF-5144

- test_app_update: IDF-5145

- test_timer: IDF-5052

- test_spi: IDF-5146

- test_rtc_clk: IDF-5060

- test_heap: IDF-5167

ci: fixed issues for tests of libgcc, ets_timer, newlib

test_pm: support on C2
2022-06-02 14:23:35 +08:00
Laukik Hase
cc7c67ad4e
tcp_transport: Fix error propogation
- Made tcp_transport_errors codes public to indicate
  TCP connection issues not covered in socket's errno
- Added API to translate tcp_transport_error codes
  to esp_err_t codes for TCP Transport

Co-authored-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2022-05-31 15:04:21 +05:30
David Cermak
e909cd5219 tcp_transport/test: Fix localhost interface name
Per lwip spec it's two letter's name plus index, i.e. "lo0"
(the reason "lo" was accepted before was bug in lwip)
2022-05-18 17:10:42 +02:00
Aditya Patwardhan
aa9de02259 esp_tls.h: Clean up included header files. 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
Ivan Grokhotkov
47659be5b8
build system: remove lwip from common requirements
lwip was added to common requirements list to provide "sys/socket.h"
header to all components without additional requirements specified.

However, lwip pulls in a lot of dependencies on other components.
This commit removes lwip from common requirements to reduce the number
of components in G1-only apps.

To compensate for this removal, the following changes are made:
- newlib (which is a common requirement) has a public dependency on
  lwip if lwip is present in the build. This ensures that sys/socket.h
  is available as long as lwip component is included into the build.
- lwip is now a public requirement of esp-tls since esp_tls.h includes
  sys/socket.h header.
- lwip is now a public requirement o esp_http_client because
  sys/socket.h is included from esp_http_client.h
- lwip is now a private requirement of esp_wifi for "smartconfig_ack"
- lwip is now a private requirement of mqtt for socket functions
- lwip is now a public requirement of tcp_transport because
  esp_transport_tcp.h includes sys/socket.h header.
- mbedtls checks if lwip component is present in the build. If yes,
  net_sockets.c is added to the build, along with the dependency on
  lwip. Previously lwip was a public requirement of mbedtls
  unconditionally.

system/g1_components test app is updated to reflect the changes

Default public dependencies of a component before and after this
change, except common requirements:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
- vfs (public dependency of lwip)
- esp_wifi (public dependency of lwip)
- esp_event (public dependency of esp_wifi)
- esp_netif (public dependency of esp_event)
- esp_eth (public dependency of esp_netif)
- esp_phy (public dependency of esp_wifi)

After:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)

Altogether, the following components have been always added as
public requirements to all other components, and are not added now
([breaking-change]):

- lwip
- vfs
- esp_wifi
- esp_event
- esp_netif
- esp_eth
- esp_phy

Application components now need to explicitly declare dependencies on
these components.
2022-05-02 20:47:17 +02:00
Euripedes Rocha
f2c77bb70f tcp_transport: Fix documentation for connect functions
Documentation was incorrectly point that we return the socket number.
 The function returns an integer related to the status of the connection.

Closes https://github.com/espressif/esp-idf/issues/8416
2022-04-19 14:18:05 +00:00
David Čermák
a7c1112ca4 Merge branch 'feature/ws_client_support_cont_frames' into 'master'
transport_ws: Parse and expose frame fin flag

Closes IDFGH-6767 and IDFGH-6737

See merge request espressif/esp-idf!17748
2022-04-14 23:18:12 +08:00
MacDue
1ca3a4fbe3 transport_ws: Parse and expose frame fin flag
Note: esp_websocket_client still needs patching to expose this
2022-04-12 11:31:51 +01:00
songruojing
bdb5b11b39 unit test: move unit-test_app test_utils_task_delete API to be a utils API (unity_utils_task_delete) in unity component 2022-03-30 15:11:08 +08:00
Mahavir Jain
e97b034b3e transport_ssl: use return value from close for non-TLS case
Also fix copyright header for this file
2022-02-07 17:17:16 +05:30
Dániel Buga
2ffa82a397 Set success when closing socket
Closes https://github.com/espressif/esp-idf/pull/8337
Closes IDFGH-6709
2022-02-07 17:16:36 +05:30
xutao
e794786c74 tcp_transport: fix tcp transport execption pointer 2022-01-19 13:44:20 +01:00
Euripedes Rocha
ae8eeaade9 tcp_transport: Fix Websocket transport initialization
In case of a failure in alocation of WS transport handle, parent leaks.
2021-12-06 14:28:30 -03:00
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Axel Lin
9d07e89f13 tcp_transport: Fix NULL pointer dereference in esp_transport_esp_tls_create
Add missing NULL checking to prevent NULL pointer dereference if calloc failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
2021-09-08 11:04:08 +08:00
liuhan
37e08d38a4 tls: Modify tls optimize both mbedtls and wolfssl 2021-06-28 10:22:24 +08:00
David Čermák
b1981204f3 Merge branch 'bugfix/tcp_transport_cleanup_tls_ctx' into 'master'
tcp_transport: Fix to cleanup esp-tls context on close

See merge request espressif/esp-idf!14076
2021-06-24 04:24:15 +00:00
liuhan
8b02c9026a transport: Add CONFI_WS_TRANSPORT for optimize the code size 2021-06-22 10:51:04 +08:00