Commit Graph

3163 Commits

Author SHA1 Message Date
Yi Wu
800e7f7928 test: remove tfpsacrypto checks in 3.6 DESTDIR install test
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 17:06:39 +01:00
Yi Wu
3e8625c396 test: improve symlink checks
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
50d85c11c5 test: versioned symlink order fix
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
e7e329e70b test: reorder if-else structure
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
033e44b4c4 test: add debug output and fix for win config
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
a51dc8201c tests: fix DESTDIR install checks and add macOS compatibility
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
909ba26843 Test: add symlinks and dangling link check
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:39 +01:00
Yi Wu
c283582015 tests: add cmake DESTDIR install test
Signed-off-by: Yi Wu <yi.wu2@arm.com>
2026-04-20 11:07:16 +01:00
Gilles Peskine
4a62fdc25a Merge pull request #10677 from gilles-peskine-arm/analyze_outcomes-uncovered-3.6
Outcome analysis: rename IGNORED_TESTS to UNCOVERED_TESTS
2026-04-10 14:51:40 +00:00
Gilles Peskine
87eba69926 Merge pull request #10658 from gilles-peskine-arm/audit_validity_dates-move-to-framework-3.6-actually-remove-scripts
3.6 only: Move some scripts from mbedtls into the framework redux
2026-04-09 07:58:45 +00:00
Gilles Peskine
278dbecd97 Rename IGNORED_TESTS to UNCOVERED_TESTS
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-07 11:05:44 +02: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
Gilles Peskine
deba38fac0 Move some scripts from mbedtls into the framework
Move a bunch of files from `scripts` and `mbedtls/scripts` to the framework.
Most are not called from any scripts invoked by the CI, but a couple are.
A subsequent commit will adapt the scripts. None of these scripts are
referenced from other repositories except in documentation.

The following files will be removed, and added to `mbedtls-framework`:

* `scripts/ecp_comb_table.py`
* `scripts/massif_max.pl`
* `tests/scripts/audit-validity-dates.py` (moved to `scripts/`)
* `tests/scripts/gen_ctr_drbg.pl` (moved to `scripts/`)
* `tests/scripts/gen_gcm_decrypt.pl` (moved to `scripts/`)
* `tests/scripts/gen_gcm_encrypt.pl` (moved to `scripts/`)
* `tests/scripts/gen_pkcs1_v21_sign_verify.pl` (moved to `scripts/`)
* `tests/scripts/generate-afl-tests.sh` (moved to `scripts/`)
* `tests/scripts/generate_server9_bad_saltlen.py` (moved to `scripts/`)
* `tests/scripts/run-metatests.sh` (moved to `scripts/`)
* `tests/scripts/run_demos.py` (moved to `scripts/`)
* `tests/scripts/test_config_script.py` (moved to `scripts/`)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-25 21:42:43 +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
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
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
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
Ronald Cron
828e3817ac Merge pull request #10623 from ronald-cron-arm/dtls-client-hello-defragmentation-3.6
Backport 3.6: Add support for (D)TLS 1.2 client hello defragmentation
2026-03-10 14:46:41 +00:00
Gilles Peskine
8f8b70aff1 Merge remote-tracking branch 'mbedtls-3.6' into merge-3.6-restricted-20260309 2026-03-08 20:26:08 +01:00
Gilles Peskine
bfaa6a5c81 Allow dependencies on platform features in PSA tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-04 17:54:56 +01:00
Gilles Peskine
685a1ce6f4 Merge remote-tracking branch 'mbedtls-3.6' into merge-3.6-restricted-20260304 2026-03-04 14:39:06 +01:00
Gilles Peskine
a7de32a719 Disable Unix-like integration code in baremetal builds in all.sh
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-03 15:19:58 +01:00
Bence Szépkúti
1937efdd94 Merge pull request #10615 from gilles-peskine-arm/generate-psa_test_wrappers-3.6
Backport 3.6: generate psa test wrappers
2026-02-26 13:44:15 +00:00
Ronald Cron
6b529ff50d component_test_tls1_2_ccm_psk_dtls_psa: Enable MBEDTLS_HAVE_TIME
As done in component_test_tls1_2_ccm_psk_dtls_legacy
enable MBEDTLS_HAVE_TIME in
component_test_tls1_2_ccm_psk_dtls_psa.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-02-25 17:49:53 +01:00
Ronald Cron
f44b6545fe ssl-opt.sh: Add tests with CH fragmented with DTLS in default config
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-02-24 15:30:00 +01:00
Ronald Cron
0a8c35d273 ssl_server2.c: DTLS: Attempt to read the response to the close notification
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-02-24 15:30:00 +01:00
Gilles Peskine
d841a6a782 Generate psa_test_wrappers.{h,c} automatically
This is not only convenient, but now necessary, because if the content of
the generated files changes due to changes in Python files in the framework,
`all.sh check_generated_files` will fail in the framework CI.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-22 20:33:27 +01:00
Ronald Cron
373e08939f Add branch specific generate_tls_handshake_tests.py file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-02-17 10:10:34 +01:00
Valerio Setti
2b2f430fcd tests: scripts: adapt test_tf_psa_crypto_optimized_alignment to 3.6
Move from CMake to Make

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-01-28 00:18:09 +01:00
Valerio Setti
10193b37e3 tests: scripts: add new component to test alignment with GCC O3 optizations
This is meant to test a bug found on:
- Little endian platforms other than x86 or ARM (these have specific
  optimizations available);
- GCC versions from 10 to 14.2 (below and above are fine);
- Optimization level "-O3" (lower levels are fine).

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2026-01-28 00:07:44 +01:00
Janos Follath
be0cef43ea Add ASan to test_sw_inet_pton
Signed-off-by: Janos Follath <janos.follath@arm.com>
2025-10-13 14:11:26 +01:00
Gilles Peskine
334dfa8799 Merge remote-tracking branch '3.6' into restricted-3.6-merge-public-20250916
Conflicts:

* `framework`: update submodule to the merge of `main` and `main-restricted`.
2025-09-16 16:16:53 +02:00
Manuel Pégourié-Gonnard
3e59e0ae08 Merge pull request #1411 from mpg/bypass-wrappers
[3.6] Bypass GCD/modinv wrappers when possible
2025-09-11 12:25:23 +02:00
Gilles Peskine
c2e9dac28f Expand on why and how we bypass the quiet wrapper
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-29 13:23:33 +02:00
Manuel Pégourié-Gonnard
f35d30799c ECP: use CT modinv
A function that was previously called in multiple places is now called
only once, hence more susceptible to being inlined, hence the test fix.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-08-14 09:18:52 +02:00
Gilles Peskine
b4b1920f7a We now run some tests with MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND
Addresses https://github.com/Mbed-TLS/mbedtls/issues/9586 .

This is not a fully satisfactory resolution, because we don't run every
constant-flow test with Valgrind in PR jobs, only a small subset. We should
improve the coverage/resource balance.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-08 17:17:04 +02:00
Gilles Peskine
beb53af31f Expand the ignore patterns for test_full_block_cipher_psa_dispatch
Some tests from `test_suite_cipher.constant_time.data` follow the same
pattern as `test_suite_cipher.aes.data` and so have the same coverage
discrepancy.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-08 15:15:07 +02:00
Gilles Peskine
4eba1cc364 Improve outcome reporting of additional valgrind_cf testing
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-08 15:15:07 +02:00
Gilles Peskine
580d1f4954 Do dedicated constant-time testing in a few more configurations
Do constant-time testing in a couple of configurations that give some
interesting coverage;

* In a configuration that's close to the default: `test_aes_only_128_bit_keys`.
  Having only 128-bit AES keys doesn't reduce the interesting scope much
  (except that it doesn't test 192-bit and 256-bit AES, but since that
  configuration uses hardware AES, we don't care about that part).
* when PSA buffer copying is not done, i.e. when
  `MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS` is enabled. This will be very
  relevant for the upcoming PSA constant-time tests.

Use Valgrind, since some of the interesting tests require constant-time AES,
which for us means AESNI or AESCE, which MSan doesn't support.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-08 15:14:47 +02:00
Gilles Peskine
fd305341fc Test that make lib can build generated files even when GEN_FILES is off
Test that `make lib GEN_FILES=` does build the generated files if they're
missing. Also, test that this only requires the expected commands: `$(CC)`,
`$(AR)`, `$(PERL)` and `$(PYTHON)`. For Python (and Perl), we don't test for
reliance on unexpected third-party packages: that would be desirable, but
out of scope of this commit.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:19:18 +02:00
Gilles Peskine
618307046a Also test make clean in library
Don't test `make clean` at the toplevel, that would be too much work (we'd
need to support `$(RM)` in all makefiles, and arrange for `find` as well for
`clean_more_on_top`).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:15:27 +02:00
Gilles Peskine
14a3c5cf53 Test make lib with GEN_FILES off
Test that `make lib GEN_FILES=` works in a minimal environment (just `${CC}`
and `${AR}`). We promise that in `README.md`.

Non-regression test for #10335.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:10:57 +02:00
Ronald Cron
a329f398e4 Merge pull request #10210 from gilles-peskine-arm/nv-seed-only-3.6
3.6 only: Test a build with entropy only from NV seed
2025-07-02 07:50:45 +00:00
Felix Conway
ea26c23ac5 Turn Wunterminated-string-initialization back into an error
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-06-23 14:13:36 +01:00
Gilles Peskine
361799acbe typo
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-06 14:52:06 +02:00
Gilles Peskine
bd6fb46ff6 Add a build with NV seed as the only entropy source
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-06 10:18:36 +02:00
Gilles Peskine
582b6fbad3 We do support builds where NV seed is the only entropy source
We want to support builds where there are no platform entropy
sources (`MBEDTLS_NO_PLATFORM_ENTROPY` enabled), and no custom entropy
sources (`MBEDTLS_ENTROPY_HARDWARE_ALT` disabled), but
`mbedtls_entropy_init()` sets up a working entropy without needing to add
sources manually with `mbedtls_entropy_add_source()`
(`MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES` disabled) thanks to a nonvolatile seed
file injected outside the library's control (`MBEDTLS_ENTROPY_NV_SEED`
enabled).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-06 10:18:33 +02:00
Gilles Peskine
f4ebf807e6 Test with GCC 15 with sloppy union initialization
This is a non-regression test for
https://github.com/Mbed-TLS/mbedtls/issues/9814

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 18:51:57 +02:00