34759 Commits

Author SHA1 Message Date
Ben Taylor
7de85af87f Add ChangeLog for transform resource leak
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
(cherry picked from commit 5b4be7edaffe86553b4875f80c78c3befe4ae618)
2026-10-21 08:27:44 +01:00
Ben Taylor
14b15fcabf Add fix for transform setup resource leak
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
(cherry picked from commit 0ad86e77b2e73100aa65f5148ea865a12caa87f0)
2026-10-21 08:27:41 +01:00
Ben Taylor
49fe7fc873 Add test for tansform setup resource leak
This is a manual backport, not a direct cherry-pick, because the target test header differs. The regression case is placed in the 4.1 suite without unrelated development tests.

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>

(cherry picked from commit 95e95268a4c26608612f34f2bb76ff1dfa9ded0a)
2026-10-21 08:27:38 +01:00
Gilles Peskine
0970a715f1
Merge pull request #10963 from davidhorstmann-arm/fix-check-config-rsa-pss-4.1
[Backport 4.1] Fix incorrect check in `check_config.h`
2026-09-22 12:43:25 +00:00
David Horstmann
480a9bfb09 Fix incorrect check in check_config.h
OAEP is for RSA encryption and therefore is not the correct check when
we want to test for signatures with PSS.

Additionally, we can use RSA PSS when we only have public key support
(not key pairs) so check for PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY (which is
auto-enabled when we have key pairs enabled anyway).

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2026-09-22 11:20:07 +01:00
Valerio Setti
67e43044c1
Merge pull request #10960 from valeriosetti/improve-depends-py-4.1
[4.1] scripts: depends-py: add the possibility to provide a fully custom build-and-test command
2026-09-21 15:04:35 +00:00
Valerio Setti
3c1b87e387 scripts: depends-py: fix pylint complains
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-09-21 11:37:10 +02:00
Valerio Setti
dff951822a scripts: depends-py: add the possibility to provide a fully custom build-and-test command
This is useful for debugging purposes because, for example, the user
only want to build a specific suite and/or only run it instead of
building and testing everything for all the jobs.
For this scope the custom command can be a bash script that's executed
instead of 'make' + 'make test'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-09-21 11:37:10 +02:00
David Horstmann
5471f382e5
Merge pull request #10812 from davidhorstmann-arm/2026-07-update-python-dependencies-4.1
[Backport 4.1] Update Python docs dependencies
2026-09-09 17:18:43 +00:00
David Horstmann
0b46f15a07 Update Python packages for docs
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2026-09-09 14:48:28 +01:00
Gilles Peskine
3f1ce37679
Merge pull request #10948 from gilles-peskine-arm/update-submodule-20261008-4.1
Backport 4.1: Update framework with check-python-files fix
2026-09-09 14:40:57 +02:00
Gilles Peskine
c2f44402f8 Update framework with check-python-files fix
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-09-09 11:27:10 +02:00
David Horstmann
56e1c4058e
Merge pull request #10944 from ronald-cron-arm/cve_id_issue_1618-4.1
4.1: Add CVE-2026-73096 ID in ChangeLog
2026-09-03 11:02:32 +00:00
David Horstmann
b4e7dd432c
Merge pull request #10940 from HelloOO7/mbedtls-4.1
Backport 4.1: Restore __cplusplus guard absent from oid.h
2026-09-03 10:30:17 +00:00
minosgalanakis
150d1ea6f0
Merge pull request #10935 from gilles-peskine-arm/cmake-config-4.1
Backport 4.1: Cmake custom compile-time config support
2026-09-02 15:16:25 +00:00
HelloOO7
3416cba59b Add missing __cplusplus guard to oid.h
Signed-off-by: HelloOO7 <cendarehor@gmail.com>
2026-09-02 13:59:12 +02:00
Ronald Cron
cbc8c55b0c Add CVE ID
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-09-02 09:36:33 +02:00
Gilles Peskine
7ce654d532
Merge pull request #10938 from gilles-peskine-arm/threading-1.0-alt-build-mbedtls
Backport 4.1: Remove unused test headers
2026-09-01 11:00:13 +02:00
Valerio Setti
87e8d096b1
Merge pull request #10681 from gilles-peskine-arm/all.sh-silence-support-failures-4.0
Backport 4.1: Silence support failures in all.sh
2026-08-31 16:07:19 +00:00
Yi Wu
9671dd208c Update tf-psa-crypto with CMake config improvements
Signed-off-by: Yi Wu <yi.wu2@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-08-27 21:19:14 +02:00
Yi Wu
af4e77afd4 improve test coverage
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 21:19:14 +02:00
Yi Wu
79e39ed09e CMake: restore FILEPATH from STING for base
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
d110a4c5ad CMake: combine Mbed TLS and PSA transformations
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
ef31cfb509 compatible with PSA configs and test improvements
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
abd4caa18d test fixes: CMake 3.10 not support cmake -S -B
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
52d8e85a7e CMake: make generated configs relocatable
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
aa92ab7b41 tests: cmake coverage improve
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
231807ff87 CMake: separate base config
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
c744bdc7fe CMake: support custom base configurations
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
b387391623 add component test
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Yi Wu
3008501bf1 Cmake: add support for config options
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-27 12:34:42 +02:00
Valerio Setti
eee512afe1
Merge pull request #10923 from yiwu0b11/strcmp_for_md_programs_example-4.1
[Backport 4.1] Replace mbedtls_md_info_from_string() with strcmp()
2026-08-14 10:19:10 +00:00
Valerio Setti
532e8ff382
Merge pull request #10922 from valeriosetti/issue10694-backport
[1.1] tests: scripts: remove _reference test components
2026-08-13 14:53:22 +00:00
Valerio Setti
76db1b6c71
Merge pull request #10832 from yiwu0b11/ref-for-drivers-4.1
[Backport 4.1] Check test dependencies against crypto internal macros
2026-08-13 09:56:15 +00:00
Yi Wu
c869effbe9 fix guards and keep SHA
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-13 10:04:47 +01:00
Yi Wu
727f5d8368 Replace mbedtls_md_info_from_string() with strcmp()
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-13 10:04:47 +01:00
Valerio Setti
9e43a472ae tests: remove duplicate component_test_psa_crypto_config_accel_hash
Following recent removal for '_reference' and '_use_psa' functions we
ended up having 2 very similar test components named
'component_test_psa_crypto_config_accel_hash', one using 'default'
configuration and the other one using the 'full' one.

Let's keep the 'full' configuration version and get rid of the 'default'
case.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-08-12 16:30:20 +02:00
Valerio Setti
f48fe5ebe2 tests: configuration-crypto: remove ssl-opt.sh and compat.sh testing from accel components
'ssl-opt.sh' and 'compat.sh' in accel components were mostly useful back
when the accelerated components were to be compared against the reference
ones to ensure proper test coverage. Now that the reference components
have been removed it doesn't make sense to keep 'ssl-opt.sh' and
'compat.sh' around because they take a lot of simulation time for almost
no benefit. From TLS point of view we can rely on normal 'test_suite_'
testing to be sure that the crypto mechanism works as expected.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-08-12 16:30:20 +02:00
Valerio Setti
8cda0b83c9 tests: configuration-crypto: remove mentions to USE_PSA_CRYPTO
Nowadays USE_PSA_CRYPTO is always enabled and there is no way to disable
it. It doesn't give more information to know that we're setting that
build symbol. Remove that.

While at this remove also '_use_psa' from some test component still using
it in the name for the same reason.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-08-12 16:30:20 +02:00
Valerio Setti
0b1f37e040 tests: configuration-crypto: fix comments still referencing reference components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-08-12 16:30:20 +02:00
Valerio Setti
67d0925d1e tests: scripts: remove _reference test components
These were useful in the 3.6 days when 'analyze_outcomes.py' was used to
check that driver acceleration was providing the same coverage as the
reference legacy modules. Since this check has recently been removed
from 'analyze_outcomes.py' all the '_reference' component can be
removed as they are just wasting CI time.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-08-12 16:30:20 +02:00
Gilles Peskine
798b0b9f2d
Merge pull request #10847 from valeriosetti/remove-ecp-deps-backport4.1
[4.1] Reduce dependencies on private `ecp.h` header
2026-08-04 13:43:23 +00:00
Valerio Setti
be621858b9
Merge pull request #10854 from nvxbug/tls12-session-id-bounds-4.1
Backport 4.1: Reject out-of-bounds session ID length in ssl_tls12_session_load
2026-08-03 15:24:18 +00:00
Naveed
84f571eafb Force sentinel session ID length in serialized-load test
Signed-off-by: Naveed <naveed@bugqore.com>
2026-08-03 13:44:23 +05:30
Naveed
1933e828d0 Reject out-of-bounds session ID length in ssl_tls12_session_load
Signed-off-by: Naveed <naveed@bugqore.com>
2026-08-03 13:44:23 +05:30
Valerio Setti
a48935588a library: ssl_tls: replace wrong usage of mbedtls_pk_get_type with mbedtls_pk_get_key_type
The intent on these lines was to get 'psa_key_type_t' for which
'mbedtls_pk_get_key_type' should clearly be used, not
'mbedtls_pk_get_type'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-30 10:52:36 +02:00
Valerio Setti
b368a7a1b9 library: ssl: remove usage of MBEDTLS_ECP_DP_MAX
MBEDTLS_ECP_DP_MAX is defined in 'ecp.h' which is a tf-psa-crypto private
header. Instead of relying on that value define a new function named
'mbedtls_ssl_get_supported_tls_id_count' which returns the number of
entries in 'tls_id_match_table'.
Rationale: it does not have too much sense to allocate an array for TLS
IDs which is larger than the list of supported TLS IDs in the current
build.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-30 10:52:36 +02:00
Valerio Setti
f3e424057f tests: ssl_helpers: update TEST_AVAILABLE_ECC and TEST_UNAVAILABLE_ECC
Align to recent changes in TLS group ID related functions:
- 'mbedtls_ssl_get_ecp_group_id_from_tls_id' renamed to
  'mbedtls_ssl_is_tls_id_supported'.
- 'mbedtls_ssl_get_tls_id_from_ecp_group_id' renamed to
  'mbedtls_ssl_get_tls_id_from_ecp_group_id'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-30 10:52:36 +02:00
Valerio Setti
aee1caf749 library: ssl: remove mbedtls_ecp_group_id field from mbedtls_ecp_group_id
This field is now completely useless.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-30 10:52:36 +02:00
Valerio Setti
512e6bbc69 library: ssl: remove mbedtls_ssl_check_curve
Its main functionality was to get a TLS ID from 'mbedtls_ecp_group_id' and
then call 'mbedtls_ssl_check_curve_tls_id'. The same can be achieved
with public PK functions and 'mbedtls_ssl_get_tls_id_from_curve_info',
then calling into 'mbedtls_ssl_check_curve_tls_id' as before.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-30 10:52:36 +02:00