34723 Commits

Author SHA1 Message Date
Yi Wu
5c906f7fa0 compatible with PSA configs and test improvements
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-19 15:57:00 +01:00
Yi Wu
c734d57590 test fixes: CMake 3.10 not support cmake -S -B
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-14 17:23:24 +01:00
Yi Wu
166c69a921 CMake: make generated configs relocatable
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-14 16:20:27 +01:00
Yi Wu
030f872a9b tests: cmake coverage improve
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-14 15:28:29 +01:00
Yi Wu
1b5aabb7ff CMake: separate base config
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-14 15:08:42 +01:00
Yi Wu
346ece94cc CMake: support custom base configurations
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-06 16:21:07 +01:00
Yi Wu
bf92cc769c add component test
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-06 10:45:17 +01:00
Yi Wu
160096a0a3 Cmake: add support for config options
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-08-06 09:46:32 +01:00
Gilles Peskine
ce0384b999
Merge pull request #10814 from valeriosetti/remove-ecp-deps
Reduce dependencies on private `ecp.h` header
2026-08-04 13:43:26 +00:00
Valerio Setti
795e7e6fd4
Merge pull request #10791 from nvxbug/tls12-session-id-bounds
Reject out-of-bounds session ID length in ssl_tls12_session_load
2026-08-03 14:24:15 +00:00
Valerio Setti
c824263361 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:23:02 +02:00
David Horstmann
3bb3738679
Merge pull request #10820 from minosgalanakis/tools/fix-auto-generated-files
Fix generate_errors.pl
2026-07-20 09:55:59 +00:00
David Horstmann
12556bc2a2
Merge pull request #10804 from valeriosetti/improve-rsa-pubkey-import-err-code
pk: improve error code failure reporting when RSA public key parsing fails (1/2)
2026-07-15 11:09:33 +00:00
Valerio Setti
41dd79e72c 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-10 12:14:20 +02:00
Valerio Setti
b1c673471f 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-10 12:14:20 +02:00
Valerio Setti
d19ebc8c18 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-10 12:14:20 +02:00
Valerio Setti
f9dbbec325 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-10 12:14:20 +02:00
Valerio Setti
8a23cf2f14 library: replace mbedtls_ssl_get_tls_id_from_ecp_group_id
Instead of retrieving the TLS ID using 'mbedtls_ecp_group_id', which
creates a dependency on the (now tf-psa-crypto private) 'ecp.h' header,
use PSA info to get the same result. Therefore rename the function as
'mbedtls_ssl_get_tls_id_from_curve_info'.

This new function has basically the opposite behavior than
'mbedtls_ssl_get_psa_curve_info_from_tls_id'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-10 12:14:20 +02:00
Valerio Setti
cac52a43c9 library: replace mbedtls_ssl_get_ecp_group_id_from_tls_id
All the usages of 'mbedtls_ssl_get_ecp_group_id_from_tls_id' basically
reduce to checking if a specific TLS ID is supported or not. Therefore
the function is replaced with 'mbedtls_ssl_is_tls_id_supported'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-10 12:14:19 +02:00
Minos Galanakis
32ae7d92d6 Fix generate_errors.pl
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-07-09 15:20:32 +01:00
Naveed
852c6bee29 Force sentinel session ID length in serialized-load test
Signed-off-by: Naveed <naveed@bugqore.com>
2026-07-09 13:16:14 +05:30
Naveed
c099994dca Reject out-of-bounds session ID length in ssl_tls12_session_load
Signed-off-by: Naveed <naveed@bugqore.com>
2026-07-09 13:07:44 +05:30
Ronald Cron
9e9eb069d6
Merge pull request #10817 from Mbed-TLS/mbedtls-4.2.0_mergeback
Mbedtls 4.2.0 mergeback
2026-07-08 13:16:51 +00:00
Minos Galanakis
bacdd16661 Updated framework
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-07-08 10:44:21 +01:00
Minos Galanakis
53aaf3215b Updated tf-psa-crypto submodule
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-07-08 10:43:26 +01:00
Valerio Setti
a5b83aea58 tests: x509parse: add temporary fallback mechanism for PK error codes
Add a temporary fallback mechanism in 'x509parse_crt' while crypto#827
is merged.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-07 22:56:30 +02:00
Minos Galanakis
970ccc59b0 Merge tag 'mbedtls-4.2.0' into mbedtls-4.2.0_mergeback
Mbed TLS 4.2.0

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-07-07 16:51:57 +01:00
Valerio Setti
8607628249 tests: x509parse: adjust some PK related error codes
After crypto#827 some PK error codes changed from
MBEDTLS_ERR_PK_INVALID_PUBKEY to MBEDTLS_ERR_PK_INVALID_ALG.
This commit adjusts failing test cases.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-07-02 14:05:15 +02:00
Minos Galanakis
ece41aa84d ChangeLog: Removed CVE-ID
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
mbedtls-4.2.0 v4.2.0
2026-07-01 12:00:14 +01:00
Valerio Setti
47e9e61020
Merge pull request #10656 from bjwtaylor/unused-variable-ret
Fix variable set but not used warning
2026-07-01 08:26:29 +00:00
Minos Galanakis
b4ee2d4277 Update BRANCHES.md
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:16:27 +01:00
Minos Galanakis
c1cc0ed3ed ChangeLog: Removed todo placeholder for CVE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:16:27 +01:00
Minos Galanakis
7f64d9609b Changelog: Added reference to tf-psa-crypto update
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:16:27 +01:00
Minos Galanakis
f3c2896076 Assemble ChangeLog
./framework/scripts/assemble_changelog.py

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:12:41 +01:00
Minos Galanakis
b11a07f274 Bump version --version 4.2.0
./scripts/bump_version.sh --version 4.2.0

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:12:41 +01:00
Minos Galanakis
97a9420455 Updated tf-psa-crypto submodule
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-29 18:12:41 +01:00
Minos Galanakis
d156cf4c02 Merge remote-tracking branch 'development-restricted' into mbedtls-4.2.0.rc 2026-06-26 22:23:37 +01:00
Ronald Cron
41a8bdf109
Merge pull request #1619 from valeriosetti/issue1585
[development] Stale DTLS- SRTP negotiation state after session_reset() (ARM-RZ7EMQAA)
2026-06-26 12:17:06 +02:00
Ronald Cron
3bb1c69f7e
Merge pull request #1685 from minosgalanakis/security/mlfbyt4c_tls13_policy_bypass_changelog
Add Attribution CVE mbedtls:development-restricted
2026-06-25 15:54:46 +02:00
Ronald Cron
05e0dfbe99
Merge pull request #10786 from minosgalanakis/mbedtls-release-sync
Mbedtls 4.2.0 release sync
2026-06-25 12:16:45 +00:00
Minos Galanakis
66e3648745 Updated tf-psa-crypto pointer
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-25 00:50:42 +01:00
Minos Galanakis
0aaa58b438 Updated framework pointer
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-25 00:50:26 +01:00
Gilles Peskine
1a4f04b0c4
Merge pull request #10788 from bensze01/readthedocs
Upgrade readthedocs builder to Ubuntu 26.04
2026-06-24 18:18:42 +00:00
Gilles Peskine
9baa16385d
Merge pull request #1652 from ronald-cron-arm/hsm-do-not-span-key-change
Hsm do not span key change
2026-06-24 19:22:01 +02:00
Bence Szépkúti
98413e8b70 Upgrade readthedocs builder to Ubuntu 26.04
The 20.04 runner is no longer supported.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2026-06-24 16:43:16 +02:00
Ronald Cron
b188f399f9 Check ServerHello record boundary alignment only in TLS 1.3 case
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-06-24 15:51:33 +02:00
Ronald Cron
74b9ab2008 tls13_fetch_handshake_msg(): Remove require_record_boundary parameter
Deduce it from the handshake message type

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-06-24 15:51:33 +02:00
Ronald Cron
e08cea612f tls13_record_boundary_alignement: Append empty hs msg
Append an empty handshake message to expand
the record instead of just a zero byte.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-06-24 15:51:33 +02:00
Ronald Cron
1a58c59470 Various improvements of tls13_(drop_early_data|record_boundary_alignment)()
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-06-24 15:51:33 +02:00
Ronald Cron
6c557a70f6 tls13: Rework mbedtls_ssl_tls13_fetch_handshake_msg()
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-06-24 15:51:33 +02:00