Commit Graph

12120 Commits

Author SHA1 Message Date
Minos Galanakis
629898bbba Revert "Added generated files"
This reverts commit 0bebf8b8c7.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-31 15:37:10 +01:00
Minos Galanakis
2d3fdb6608 Merge tag 'mbedtls-3.6.6' into mbedtls-3.6.6_mergeback
Mbed TLS mbedtls-3.6.6

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-31 15:36:51 +01:00
Minos Galanakis
0bebf8b8c7 Added generated files
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 22:03:13 +00:00
Minos Galanakis
3cfe12bf11 Bump version
./scripts/bump_version.sh --version 3.6.6

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 21:48:57 +00:00
Ronald Cron
953c584eec Remove debug leftover
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 14:28:17 +01:00
Ronald Cron
3a3d1d3dcd Improve comments
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 14:28:17 +01:00
Ronald Cron
42dec1f97c 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 14:28:17 +01:00
Ronald Cron
ed156d0699 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 14:28:17 +01:00
Ronald Cron
7fabb42524 Introduce ssl_buffering_shift_slots
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-23 19:18:26 +01:00
Ronald Cron
36d75df56b Revert "ssl_server2.c: DTLS: Attempt to read the response to the close notification"
This reverts commit 0a8c35d273.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-23 19:18:26 +01:00
Ronald Cron
707c8c34ec Merge remote-tracking branch 'mbedtls-restricted/mbedtls-3.6-release-sync' into 'mbedtls-restricted/mbedtls-3.6-restricted' 2026-03-23 12:08:25 +01:00
Bence Szépkúti
8530b5e708 Merge pull request #1504 from gilles-peskine-arm/psa-rng-fork-3.6
Backport 3.6: PSA RNG fork protection
2026-03-19 17:26:52 +01:00
Gilles Peskine
f3c1f8dd70 Update paths after moving some scripts to the framework
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-19 13:20:36 +01:00
Gilles Peskine
c7d600f21f Align some scripts with development
The changes made between 3.6 and 4.0+ are useless but harmless in 3.6.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-19 13:19:31 +01:00
Gilles Peskine
f6118b40e1 Merge pull request #1492 from minosgalanakis/bugfix/ccm_finish_boundary_check_3.6
Bugfix/ccm finish boundary check 3.6
2026-03-17 21:57:28 +01:00
Ronald Cron
c1cd21d854 Merge pull request #1510 from yanesca/1445_fix_signature_algorithm_injection-backport
Fix signature algorithm injection [3.6 Backport]
2026-03-17 17:09:51 +01:00
Bence Szépkúti
444d0ac2c1 Merge pull request #10443 from davidhorstmann-arm/verify-result-default-failure-3.6
[Backport 3.6] Hardening: Make `mbedtls_ssl_get_verify_result()` default to failure
2026-03-17 12:14:48 +00:00
Minos Galanakis
73c6d6d3e9 test_suite_ccm: Added error.h
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-17 11:42:42 +00:00
Janos Follath
562326e491 send_invalid_sig_alg: use driver friendly guards
The compile time guards were too restrictive, excluding builds with
drivers, updating them will allow driver tests to run as well.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-17 09:09:20 +00:00
Gilles Peskine
ce8a71c071 Test the PSA RNG after fork()
Assert that two forked children have distinct RNG states, and also that the
state is distinct from their parent.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-16 17:50:06 +01:00
Bence Szépkúti
c5f0f738ed Merge pull request #1497 from gilles-peskine-arm/psa-rng-reseed-3.6
Backport 3.6: API to reseed the PSA RNG
2026-03-16 13:53:53 +01:00
Janos Follath
52cf5d884e Fix send_invalid_sig_alg() test
This commit fixes two problems:
1. In 3.6 the SSL unit test framework ignores option.cipher, we need to
   enforce it manually
2. In 3.6 we still have RSA key exchange and we need to condition the
   RSA test on the presence of ECDHE_RSA key exchange modes as well

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:39:01 +00:00
Janos Follath
c07cc0e36b Fix a typo and an oversight
DEBUG_C supposed to have been removed from the test dependencies, still
being there is an oversight. Removing it was the sole purpose of
3e58109fbd.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:39:01 +00:00
Janos Follath
d91902c9d6 send_invalid_sig_alg: reduce debug dependency
Run as much of the test as we can even in the abscence of
MBEDTLS_DEBUG_C.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:39:01 +00:00
Janos Follath
51ea7aca6f Fix dependencies
The unit test framework always loads the client key as well, which
requires a different curve and a hash than the server key.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:39:01 +00:00
Janos Follath
03a9c87895 send_invalid_sig_alg: add baseline test
Add a test case with a successful handshake for each test case that
causes the desired handshake failure, with minimal differences between
the two.

The reason is to have more assurance that the handshake is failing for
the desired reason (as opposed to not having done something correctly in
the test code).

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:59 +00:00
Janos Follath
4d2027b271 Fix test case dependency
Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:21 +00:00
Janos Follath
0ab0d7c170 Fix typos
Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:21 +00:00
Janos Follath
2b696cd84f Fix some compile time guards
Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:21 +00:00
Janos Follath
cd0b3f34b6 send_invalid_sig_alg: check logs
There are other issues that can fail with the same error code. Make sure
that the handshake fails exactly the way we want it to fail by analysing
the client logs.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:21 +00:00
Janos Follath
b34279950d Use API function to set sig_alg config in test
Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:21 +00:00
Janos Follath
3549b6f4a8 Fix the MBEDTLS_TEST_HAS_ADDITIONAL_HASH macro
It should require a hash that is configured in TLS 1.2 SSL contexts by
default.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:20 +00:00
Janos Follath
27c0aa0b3e sig_algs: Add non-regression test
Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:38:17 +00:00
Janos Follath
94116eddb8 Fix mbedtls_test_free_handshake_options
We usually follow the pattern that a zero-initialised struct is safe to
free. This wasn't the case here.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:37:49 +00:00
Janos Follath
a51506b3f0 Fix root cert prerequisites
This root certificate uses SECP-384 and if we don't have it in the
build, the parsing already fails even if we don't try to use it, there
is no reason to have it in the build without the SECP-384.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2026-03-16 12:37:49 +00:00
Minos Galanakis
ebe26fd095 test_suite_psa_crypto: Fixed a typo in documentation
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-16 11:54:39 +00:00
David Horstmann
611f3fb072 Configure the RNG in 3.6 testcase
In Mbed TLS 3.6 we still need to manually configure the RNG for TLS. Add
this to the testcase for default verify_result.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2026-03-16 11:15:01 +00:00
Manuel Pégourié-Gonnard
0d48c34169 Merge pull request #1490 from ronald-cron-arm/tls12-2nd-client-hello-3.6
Backport 3.6: Fix TLS 1.2 client hello after HRR
2026-03-16 10:58:44 +01:00
Gilles Peskine
900b7dc5ac Test that the compile-time and run-time entropy source counts match
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-15 19:52:16 +01:00
Manuel Pégourié-Gonnard
2d0aa97f81 Merge pull request #1501 from mpg/restricted-ffdh-peerkey-checks
[Backport 3.6] FFDH peer key checks
2026-03-13 12:44:30 +01:00
Manuel Pégourié-Gonnard
01b04ab723 Merge pull request #1489 from davidhorstmann-arm/fix-psa-ffdh-buffer-overflow-3.6
[Backport 3.6] Fix buffer overflow in FFDH public key export
2026-03-13 09:56:43 +01:00
Manuel Pégourié-Gonnard
e24f1e5c2c Merge pull request #10609 from mpg/pk-psa-large-stack-buffers
[3.6] PK: avoid large stack buffers in "to/from PSA" functions
2026-03-13 08:53:48 +00:00
Minos Galanakis
fa284db5a1 test_suite_psa_crypto: Updated multipart tests
- Added checks for calling `finish()`, `verify()` after
  `set_len()` without calling `update()` & `update_ad()`

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-12 16:23:24 +00:00
Minos Galanakis
5311a6e220 Updated mbedtls_ccm_finish_boundary to handle zero len tags
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-12 12:00:23 +00:00
Minos Galanakis
66d57b0d7b test_suite_psa_crypto: Updated multipart tests
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-12 11:09:31 +00:00
Minos Galanakis
e96de33867 psa_core: Added a retval in psa_aead_final_checks()
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-11 10:30:57 +00:00
Minos Galanakis
0004fe7e96 test_suite_ccm: Updated input arguments
Key and iv are now test function internal arguments.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-11 10:30:56 +00:00
Minos Galanakis
27069c6be6 test_suite_ccm.function: Fixed typo in docs
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-10 22:04:27 +00:00
Minos Galanakis
f447b0264a test_suite_psa_crypto: Extended aead_multipart_state_test(2)
This patch adds psa_aead_decrypt_setup() & psa_aead_finish()
path to the multipart_state_testing.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-10 22:04:27 +00:00
Ronald Cron
668e677faf tls13_hrr_then_tls12_second_client_hello: Improve client and server state checks
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-10 19:26:14 +01:00