Commit Graph

428 Commits

Author SHA1 Message Date
Sachin Parekh
aa4437d3d3
mbedtls: Override ecp_mul_restartable_internal
ECDSA verification uses ecp_mul_restartable_internal instead
of the public API mbedtls_ecp_mul_restartable
2022-08-24 11:59:35 +05:30
Laukik Hase
9b290e3668
mbedtls/port: Fix dynamic buffers feature for v3.2.1
Co-authored-by: Li Jingyi <lijingyi@espressif.com>
2022-08-24 11:59:34 +05:30
Laukik Hase
157fc22ef4
mbedtls: Update to v3.2.1
- Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.2.1
- Closes https://github.com/espressif/esp-idf/issues/8787
2022-08-24 11:59:34 +05:30
Aditya Patwardhan
2f4a28af46
esp_rsa_sign_alt: Fix esp_init_ds_data_ctx API to not modify user defined data when it is given directory from flash 2022-08-22 15:04:32 +05:30
Mahavir Jain
6c2c05e8a0 Merge branch 'feature/esp_cryptoauthlib_from_manager' into 'master'
Push out esp-cryptoauthlib to component manager

See merge request espressif/esp-idf!19208
2022-08-16 17:01:53 +08:00
Roland Dobai
bab3830797 Tools: Fix flake8 version 5 warnings 2022-08-12 08:13:13 +00:00
Mahavir Jain
203830e12b
esp-cryptoautlib: remove submodule and use from IDF component manager 2022-08-12 11:24:02 +05:30
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Darian Leung
781d06af73 esp_hw_support: Remove compare_set.h API
This function removes the following legacy atomic CAS functions:

From compare_set.h (file removed):
- compare_and_set_native()
- compare_and_set_extram()

From portmacro.h
- uxPortCompareSet()
- uxPortCompareSetExtram()

Users should call esp_cpu_compare_and_set() instead as this function hides the details
of atomic CAS on internal and external RAM addresses.

Due to the removal of compare_set.h, some missing header includes are also fixed in this commit.
2022-07-22 00:06:06 +08:00
Mahavir Jain
15039f367d Merge branch 'update/update_certs_bundle' into 'master'
Update esp_crt_bundle certificates

See merge request espressif/esp-idf!19132
2022-07-21 06:14:41 +08:00
Espressif BOT
72fe927e85 Update esp_crt_bundle certificates 2022-07-20 10:00:11 +08:00
Mahavir Jain
a94c74c26b
mbedtls: remove dependency on driver component
- keep `esp_pm` dependency conditional in mbedtls
- refactor `bt` cmakelist to keep dependencies as private

Related: IDF-1265
2022-07-18 21:10:51 +05:30
Marius Vikhammer
61691e332f RSA: only run generate key test if we have MPI HW support
Test would take too long and time out on C2.
2022-06-28 09:39:43 +08:00
Zim Kalinowski
974151bd31 Merge branch 'feature/freertos-smp-rsa-timeouts' into 'master'
freertos: adjust rsa test timeouts for SMP

Closes IDF-5253

See merge request espressif/esp-idf!18585
2022-06-23 21:27:36 +08:00
Mahavir Jain
dd24639215 Merge branch 'esp32h2/enable_ecc_accelerator' into 'master'
esp32h2: Enable ECC accelerator

Closes IDF-3397

See merge request espressif/esp-idf!18647
2022-06-23 20:06:26 +08:00
Sachin Parekh
6cfc9c365f esp32h2: Enable ECC accelerator 2022-06-23 12:59:13 +05:30
Marius Vikhammer
7e60e07a0a Merge branch 'feature/esp8684_sha' into 'master'
mbedtls: enable hw support for SHA on C2

Closes IDF-3830 and IDF-5141

See merge request espressif/esp-idf!18531
2022-06-23 14:18:49 +08:00
Zim Kalinowski
dc8b1406cc freertos: adjust rsa test timeouts for SMP 2022-06-23 07:26:00 +02:00
Marius Vikhammer
f4c79687f8 SHA: added hardware support for SHA on C2. 2022-06-23 11:01:16 +08:00
Laukik Hase
fbeac8d43c
ci: Enable custom certificate bundle test for ESP32-S3
- Increase leakage limit for `test performance RSA key operations`
  UT by 64 bytes
2022-06-21 14:18:23 +05:30
Laukik Hase
ff44ff8050
mbedtls: Acquire lock before enabling MPI (RSA) hardware
- For ESP32-S3
2022-06-21 10:48:17 +05:30
Mahavir Jain
fc43533859
mbedtls: enable all tests except SHA for ESP32-C2 2022-06-10 15:08:06 +05:30
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
28ac0b12fb
mbedtls: Remove deprecated options from mbedtls/esp_config.h
- Removed options related to RC4 ciphersuite, SSL3 and TLS1
  (as per mbedtls v3.1.0)
2022-05-28 10:21:06 +05:30
Marius Vikhammer
cf1b222cac build system: removed target component
After refactoring the target components (e.g. esp32) no longer contained any real functionality.
What remained in these components have been moved elsewhere and the component itself deleted from the
build system.
2022-05-24 09:12:59 +08:00
Li Jingyi
c88af419a3 mbedtls: fix ssl server crash when enable mbedtls dynamic buffer
Not free keycert until MBEDTLS_SSL_CLIENT_KEY_EXCHANGE for rsa key exchange methods, because keycert will be used to parse client key exchange.
2022-05-20 11:21:48 +00:00
Darian Leung
7c02bde904 esp_system: Update task watchdog unit tests and example
This commit does the following:

- Update existing unit tests that use the TWDT to call the new
  esp_task_wdt_init() API
- Add a set of dedicate TWDT unit tests
- Updates the TWDT example
2022-05-13 18:01:28 +08:00
Li Jingyi
fa3cbf9162 fix(mbedtls): fix ssl server memory leak when enable mbedtls dynamic buffer function 2022-05-09 13:56:20 +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
Espressif BOT
4a56352f56 Update esp_crt_bundle certificates 2022-04-27 11:26:58 +00:00
Ivan Grokhotkov
708e99497b
global: add dependency on esp_timer component and include esp_timer.h
Some components were including esp_timer.h without declaring a
dependency on esp_timer component. This used to work due to a
transitive public dependency on esp_timer from freertos component.
Add explicit dependencies where needed.
Also some source files were using esp_timer functions without
including the header file. This used to work because esp_timer.h was
included from freertos port header file. This commit adds esp_timer.h
includes where needed.
2022-04-25 18:39:23 +02:00
Mahavir Jain
85e73b9871 Merge branch 'bugfix/mbedtls_arguments' into 'master'
mbedtls: fix argument types and take care overflow warnings

Closes GCC-239

See merge request espressif/esp-idf!17847
2022-04-22 11:59:26 +08:00
Anton Maklakov
434bd5e52e mbedtls: suppress -Wstringop-overflow 2022-04-21 13:33:32 +07:00
Anton Maklakov
4a7f36a52a mbedtls: fix argument types to match mbedtls/shaXXX.h 2022-04-21 12:30:49 +07:00
Aditya Patwardhan
1b4cc4c9f2 test_rsa.c: remove 'use_blinding' variable.
The "mbedtls_rsa_private" has made f_rng function mandatory for the
    operation.
    Also updated the MAX_PERFORMANCE values with offset added with blinding
    Added the SOC_CCOMP_TIMER_SUPPORTED Check
2022-04-20 01:07:01 +00:00
Armando
c4bcf1117c esp_hw_support: move soc_memory_types.h helper functions into esp_hw_support 2022-04-08 11:46:10 +08:00
Mahavir Jain
b3d3f74a67 esp_crt_bundle: Fix build problems if MBEDTLS_CERTIFICATE_BUNDLE is disabled
Exclude source and include file from build list if certificate bundle feature
is disabled.

Closes https://github.com/espressif/esp-idf/issues/8714
Closes IDFGH-7106
2022-04-06 05:10:43 +00:00
Aditya Patwardhan
c27c6916a7 esp_crt_bundle: Add bounds checking for the "esp_crt_bundle_set" API.
Closes https://github.com/espressif/esp-idf/issues/8397
2022-03-31 13:11:11 +05:30
Espressif BOT
f51da7dded
Update esp_crt_bundle certificates 2022-03-25 10:48:34 +05:30
Mahavir Jain
3af2d15216 mbedtls: Fix build failures for ESP32-C2 with hardware SHA
Clean support for SHA peripheral will appear with IDF-3830
2022-03-22 02:06:30 +00:00
Mahavir Jain
f7fc3e2d88 esp_hw_support: cleanup crypto lock APIs for ESP32-C2 2022-03-22 02:06:30 +00:00
Mahavir Jain
0621a6f513 mbedtls: use soc capability macros in build CMakeLists 2022-03-22 02:06:30 +00:00
Mahavir Jain
36377b9cc3 mbedtls: use SOC capability macros instead of target names 2022-03-22 02:06:30 +00:00
Mahavir Jain
5f646b1d43 mbedtls: move locally managed root certificates to separate file
Purpose:
This will allow for easily automating periodic updates to
"cacrt_all.pem" file.

Note:
For now newly created "cacrt_local.pem" contains single "DST Root CA X3"
which we are keeping to manage compatibility with endpoints like
"howsmyssl.com". Please note this Root CA is expired and is not part of
Mozilla’s NSS root certificate store.
2022-03-21 22:39:24 +05:30
Laukik Hase
52170fba7f esp_crt_bundle: Fix build error
- When `esp_crt_bundle.h` is included before any config,
  a build error (`esp_err_t` not defined) is observed

Closes https://github.com/espressif/esp-idf/issues/8606
2022-03-21 09:05:06 +00:00
Mahavir Jain
93987e6b79 Merge branch 'fix/remove_test_cert_files_from_mbedtls_port_directory' into 'master'
mbedtls: Remove certs.c and certs.h from port directory

Closes IDF-4709

See merge request espressif/esp-idf!17485
2022-03-18 16:47:53 +08:00
Aditya Patwardhan
f31d8dd295 mbedtls: Remove certs.c and certs.h from port directory 2022-03-15 17:16:07 +05:30
Laukik Hase
1c65ab5307
mbedtls: Add config for MBEDTLS_PLATFORM_TIME_ALT 2022-03-14 09:42:33 +05:30
Aditya Patwardhan
bfc2fd9d5d Merge branch 'bugfix/mbedtls_tls1_3' into 'master'
mbedtls: Disable `MBEDTLS_DYNAMIC_BUFFER` when TLS 1.3 is enabled

See merge request espressif/esp-idf!17415
2022-03-12 16:24:14 +08:00
Armando (Dou Yiwen)
6ed3ffbbf1 Merge branch 'refactor/remove_redundant_rom_cache_dependency' into 'master'
cache: remove redundant rom cache dependency in bootloader

Closes IDF-4523

See merge request espressif/esp-idf!17077
2022-03-12 10:11:39 +08:00