12826 Commits

Author SHA1 Message Date
Ben Taylor
fbaf177f2d Fix style issues
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-18 13:04:13 +01:00
Ben Taylor
55536a07c9 Remove redundant function from pkcs7_parse_reuse
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-18 13:04:13 +01:00
Ben Taylor
b1a4b07509 Add fix for stale pointer after mbedtls_pkcs7_free
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-18 13:04:13 +01:00
Gilles Peskine
1f5b89077c
Merge pull request #1655 from bjwtaylor/ECDHE-PSK-integer-overflow-restricted-4.1
Backport Ecdhe psk integer overflow restricted fix to  4.1
2026-06-16 11:49:57 +02:00
Minos Galanakis
e1896dbfd8 Merge remote-tracking branch 'public/mbedtls-4.1' into public-sync/mbedtls-4.1-14062026
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-14 19:36:52 +01:00
Ben Taylor
4afd1c1685 Add in tests for ECDHE-PSK integer overflow
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
(cherry picked from commit c567299ee6bade9547a97d3ad1dcd5f3bd98ea6f)
2026-06-10 14:34:10 +01:00
Minos Galanakis
2e2087d246 test_suite_ssl: Added MBEDTLS_DEBUG_C guards to logs
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-20 15:01:43 +01:00
Minos Galanakis
c4461967af test_suite_ssl: Restructured reject_hrr_selecting_unoffered_group
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-20 15:01:21 +01:00
Minos Galanakis
d3931632fa test_suite_ssl: Renamed hrr_reject_selecting_unoffered_group
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-20 15:01:00 +01:00
minosgalanakis
e862725edd
Merge pull request #10709 from yiwu0b11/remove_unused_ffdh_code-4.1
Backport 4.1: tests: remove remaining FFDH code in compat.sh
2026-05-13 16:49:07 +00:00
Minos Galanakis
be84be5d9a test_suite_ssl: doc fixes
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-13 11:45:44 +01:00
Minos Galanakis
2c164902ea Adjusted dependecies for hrr_reject_unadvertised_group
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-12 15:02:05 +01:00
Minos Galanakis
bac133ffcb test_suite_ssl: Introduced hrr_reject_unadvertised_group
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-05-12 15:02:05 +01:00
Gilles Peskine
4f149ffc02 Update comment
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-05-08 18:00:45 +02:00
Gilles Peskine
c7b1c86e6b Prefer to load tf_psa_crypto_test_case_info from project_knowledge
Try to load the list of tests that TF-PSA-Crypto wants us to ignore in three
ways, depending on the age of the tf-psa-crypto submodule:

* Modern: import `tf_psa_crypto_test_case_info` as an ordinary module,
  expected to be found in `tf-psa-crypto/scripts/project_knowledge`.
* First location, quickly superseded: load
  `tf-psa-crypto/tests/scripts/tf_psa_crypto_test_case_info.py`,
  in a hackish way because we don't want to put that directory on the
  load path.
* Oldest: there is no `tf_psa_crypto_test_case_info.py`. Use a hard-coded
  list.

Once all the TF-PSA-Crypto branches we care about (e.g. pull requests
in progress) are updated with
`tf-psa-crypto/scripts/project_knowledge/tf_psa_crypto_test_case_info.py`,
we can drop the backward compatibilty hacks and simply
`import tf_psa_crypto_test_case_info` unconditionally and use
`tf_psa_crypto_test_case_info.INTERNAL_TEST_CASES` unconditionally.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-05-08 18:00:45 +02:00
Gilles Peskine
da2b5d6f42 Add tf-psa-crypto/scripts/project_knowledge to Python load path
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-05-08 18:00:45 +02:00
Gilles Peskine
ded271a8c4
Merge pull request #10696 from yiwu0b11/destdir_install_env_support-4.1
Backport 4.1: Support DESTDIR for install and add build-system test
2026-04-29 14:37:40 +00:00
Valerio Setti
377cbb2055 tests: depends.py: extend pkalgs including PSA_WANT_ALG_RSA_PKCS1V15_SIGN
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-04-22 17:17:41 +02:00
Valerio Setti
9d4447fdc5 tests: depends.py: fix reverse dependency for RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-04-22 17:17:41 +02:00
Yi Wu
c7b630ffa1 tests: remove remaining FFDH code in compat.sh
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-21 10:33:54 +01:00
Yi Wu
7c63e641e3 test: improve symlink checks
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
6c63f39eeb test: versioned symlink order fix
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
5bddf62a69 test: reorder if-else structure
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
9d88e0b200 test: add debug output and fix for win config
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
ee0f8cbc11 tests: fix DESTDIR install checks and add macOS compatibility
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
291fb02523 Test: add symlinks and dangling link check
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Yi Wu
897daf3ea1 Support DESTDIR for install and add build-system test
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 10:48:29 +01:00
Ronald Cron
f9990f3289
Merge pull request #10704 from Maokaman1/fix/tls12-rsa-pss-sigalgs-4.1
Backport 4.1: ssl: accept TLS 1.2 rsa_pss_rsae signature algorithms
2026-04-20 08:03:21 +00:00
Viktor Sokolovskiy
5fc28f4016 ssl: accept TLS 1.2 rsa_pss_rsae in client SKE
Fix a TLS 1.2 client regression that caused valid ServerKeyExchange signatures using rsa_pss_rsae_* to be rejected.

Allow rsa_pss_rsae_* in the TLS 1.2 client ServerKeyExchange parse path when the algorithm is supported and was offered by the client. Add OpenSSL and GnuTLS interoperability coverage for TLS 1.2 servers that force rsa_pss_rsae_sha256.

Fixes #10668.

Signed-off-by: Viktor Sokolovskiy <maokaman@gmail.com>
2026-04-17 19:16:20 +03:00
Gilles Peskine
a4144255f1 Documentation improvements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
eeb2e3379f INTERNAL_TEST_CASES moved to a separate data-only module
This way, when Mbed TLS's `analyze_outcomes.py` loads the python module from
TF-PSA-Crypto (because it needs to know the value of `INTERNAL_TEST_CASES`),
there's no risk that the subproject and the superproject will have different
requirements on auxiliary modules such as `mbedtls_framework.outcome_analysis`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
824b4cde5a Add copyright line
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
7f78af02c4 Move test currently covered by crypto from uncovered list to ignored list
If we can't read `INTERNAL_TEST_CASES` from
`tf-psa-crypto/tests/scripts/analyze_outcomes.py` because the script doesn't
exist, hard-code the legacy value of that information.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
ef7ff7e7fd Ignore test cases that TF-PSA-Crypto tells us to ignore
If the `tf-psa-crypto` submodule has `tests/scripts/analyze_outcomes.py`,
require it to define a global variable `INTERNAL_TEST_CASES`. Those test
cases will be ignored in Mbed TLS's coverage analysis.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
f1d880203c Move _has_word_re to the framework
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Gilles Peskine
3233f2523c Rename IGNORED_TESTS to UNCOVERED_TESTS
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 14:43:46 +02:00
Minos Galanakis
6804c92d7d Merge tag 'mbedtls-4.1.0' into mbedtls-4.1.0_mergeback
Mbed TLS 4.1.0

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-31 15:35:49 +01:00
Minos Galanakis
e89565f92a Bump version
./scripts/bump_version.sh --version 4.1.0 \
  --so-crypto 18 --so-tls 23 --so-x509 9

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 22:34:28 +00:00
Minos Galanakis
308e7fb232 Merge remote-tracking branch 'restricted/development-restricted' into mbedtls-4.1.0.rc3
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 22:18:31 +00:00
Ronald Cron
7a8fbc2100 Remove debug leftover
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 08:45:24 +01:00
Ronald Cron
1141cd0fb6 Improve comments
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 08:45:24 +01:00
Ronald Cron
fbe388dc28 ssl-opt.sh: Fix log checks in some "DTLS reassembly" tests
In DTLS reassembly tests, the server may receive a close_notify alert at the
end of a test. In this case, the Mbed TLS server logs an error, so these tests
should not check for the absence of the string "error" in the server logs.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 08:45:24 +01:00
Ronald Cron
f285018fa3 Disable "DTLS proxy: 3d, (openssl|gnutls) client, fragmentation" tests
The tests fail intermittently on the CI with a frequency that
significantly impacts CI throughput.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 08:45:22 +01:00
Ronald Cron
16c5dd99b3 Introduce ssl_buffering_shift_slots
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 08:44:16 +01:00
Ronald Cron
ade56554a6 Revert "ssl_server2.c: DTLS: Attempt to read the response to the close notification"
This reverts commit 2e9b9681e60ff52d69a3a68b4c7be0bcbab9191b.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-24 18:38:37 +01:00
Gilles Peskine
aa40ca90d9 Move check_committed_generated_files to its own component
This will probably help when a framework change causes the content of these
files to change. See https://github.com/Mbed-TLS/mbedtls-test/issues/252

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-23 15:38:32 +01:00
Gilles Peskine
61cf7bdc90 Add Python requirements from framework/util
Any `all.sh` component that runs a script that requires a more recent
version of Python must have a `support_xxx` function that checks for the
requisite Python version or package. At this time, there is no such
requirement yet in the mbedtls repository.

The directory `framework/util` is not yet checked by `pylint` or `mypy`,
because we use older versions of these tools that don't work well with
modern Python versions.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-23 15:38:28 +01:00
Gilles Peskine
260992c0f4 check_committed_generated_files.py: use the new generate_files_helper module
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-23 15:37:45 +01:00
Gilles Peskine
4a21496d6f Prepare to generalize check_option_lists.py
We're going to have more committed generated files.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-23 15:37:45 +01:00
Gilles Peskine
7f4fe3943d
Merge pull request #10624 from gilles-peskine-arm/audit_validity_dates-move-to-framework
Move some scripts to the framework
2026-03-19 12:19:00 +00:00