Dave Rodgman
99fa0d08d3
Create quiet wrappers for make and cmake
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-02-29 14:09:58 +00:00
Gilles Peskine
36e6bd6926
Merge pull request #8811 from gilles-peskine-arm/pk_import_into_psa-backports-2.28
...
Backport 2.28: bugs fixed in "Implement mbedtls_pk_import_into_psa"
2024-02-21 15:45:21 +00:00
Gilles Peskine
0196f4886a
Fix mbedtls_pk_get_bitlen() for RSA with non-byte-aligned sizes
...
Add non-regression tests. Update some test functions to not assume that
byte_length == bit_length / 8.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-12 17:00:48 +01:00
Gilles Peskine
c89f9ceb41
Don't define pk_sign_verify in configurations where it's unused
...
In some configurations (e.g. ECDH but no ECDSA or RSA), the PK module is
useful but cannot perform any signatures. Then modern GCC complains:
```
../source/tests/suites/test_suite_pk.function: In function ‘test_pk_sign_verify’:
../source/tests/suites/test_suite_pk.function:1136:12: error: array subscript 0 is outside array bounds of ‘unsigned char[0]’ [-Werror=array-bounds]
../source/tests/suites/test_suite_pk.function:1094:19: note: while referencing sig’
…
```
This fixes test-ref-configs.pl with a modern GCC (specifically with
config-thread.h).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-12 14:33:41 +01:00
Gilles Peskine
0af7a90329
depends.py: set unique configuration names in outcome file
...
Set unique configuration names in the outcome file. This was lost in the
rewrite from depends-*.pl to depends.py.
Fix #7290
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-12 14:30:59 +01:00
Kusumit Ghoderao
bfa27e33ff
Fix kdf incorrect initial capacity
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2024-02-02 19:56:37 +05:30
Dave Rodgman
2866a6bb20
Merge remote-tracking branch 'restricted/mbedtls-2.28' into mbedtls-2.28.7rc
2024-01-22 16:48:18 +00:00
Dave Rodgman
f154831067
bump version
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-22 16:47:12 +00:00
Jonathan Winzig
d78496cccf
Add tests for Issue #8687
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-22 16:00:07 +00:00
Paul Elliott
56fd26cee9
Merge pull request #8640 from bensze01/release_components_2.28
...
[Backport 2.28] Set OpenSSL/GnuTLS variables when running release components
2024-01-11 15:38:23 +00:00
Jonathan Winzig
61f4fc24a9
Add tests for Issue #8687
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-10 13:26:12 +01:00
Gilles Peskine
fafc6cd201
Update generated test data files
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-09 09:55:24 +01:00
Dave Rodgman
ffb18d2012
Merge pull request #8670 from daverodgman/default-compiler-all-2.28
...
Backport CI perf: Use clang by default in all.sh
2024-01-04 12:58:50 +00:00
Dave Rodgman
0fd07d5e10
Mark test function with MBEDTLS_MAYBE_UNUSED
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 11:37:35 +00:00
Dave Rodgman
e42c23569b
Don't use full path for setting CC
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:35:35 +00:00
Dave Rodgman
9d2c67f8e2
Use gcc in test_full_deprecated_warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:35:16 +00:00
Dave Rodgman
ce04f24737
Add -O2 to some CFLAGS which were not setting it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:34:31 +00:00
Dave Rodgman
374b188468
Don't specify gcc unless the test requires it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:30:57 +00:00
Dave Rodgman
b046b9a96b
Enable -O2 in depends.py
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:22 +00:00
Dave Rodgman
5b00fb111f
Use gcc in test_psa_compliance
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:17 +00:00
Dave Rodgman
b0660c22d9
Ensure test_psa_compliance uses gcc
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:07 +00:00
Dave Rodgman
e0a2f6d08d
Ensure clang is present
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:24:34 +00:00
Dave Rodgman
62be456449
Use clang by default
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:24:30 +00:00
Bence Szépkúti
cb89fbdc67
Set OpenSSL/GnuTLS variables in release components
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 21:17:56 +01:00
Bence Szépkúti
44043ed127
Document release components in all.sh
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 21:17:56 +01:00
Bence Szépkúti
2064c9b595
all.sh: Parse arguments before checking if a test is supported
...
Support for each test was checked before the command line had been
parsed, causing the support_ functions to ignore arguments that set a
tool's location.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 20:40:18 +01:00
David Horstmann
ec4c47f62b
Move MPI initialization to start of function
...
This prevents a call to mbedtls_mpi_free() on uninitialized data when
USE_PSA_INIT() fails.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2023-12-08 18:36:07 +00:00
Bence Szépkúti
e1c6c4c962
Do not run Valgrind tests in PR jobs
...
Co-authored-by: Dave Rodgman <dave.rodgman@arm.com >
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-06 16:47:51 +00:00
Ronald Cron
ba77a66475
Align forced ciphersuite with test description
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-11-29 10:15:14 +08:00
Ronald Cron
6f2183f756
ssl-opt.sh: Remove unnecessary symmetric crypto dependencies
...
Same test cases as in the previous commit.
Remove the redundant symmetric crypto dependency.
The dependency is ensured by the fact that:
1) the test case forces a cipher suite
2) ssl-opt.sh enforces automatically that the
forced ciphersuite is available.
3) The fact that the forced ciphersuite is
available implies that the symmetric
cipher algorithm it uses is available as
well.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-11-29 10:15:12 +08:00
Ronald Cron
237e3f8e53
ssl-opt.sh: Fix some symmetric crypto dependencies
...
Fix some dependencies on symmetric crypto that
were not correct in case of driver but not
builtin support. Revealed by "Analyze driver
test_psa_crypto_config_accel_cipher_aead vs reference
test_psa_crypto_config_reference_cipher_aead" in
analyze_outcomes.py.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-11-29 10:13:50 +08:00
Ronald Cron
a8b474f42f
ssl-opt.sh: Add a check of the list of supported ciphersuites
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-11-29 10:11:47 +08:00
Ronald Cron
46a660a2c5
ssl-opt.sh: Fix getting the list of supported ciphersuites.
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-11-29 10:11:17 +08:00
Gilles Peskine
c3a9bdb2b5
Detect enabled GCC/Clang sanitizers
...
Occasionally we want tests to take advantage of sanitizers, or work around
them.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-22 18:00:31 +01:00
Dave Rodgman
b9c70581a0
Merge pull request #8222 from tgonzalezorlandoarm/tg/backport-psa-low-hash-mac-size
...
Backport 2.28: Start testing the PSA built-in drivers: hashes
2023-11-21 15:39:36 +00:00
Gilles Peskine
181844fa1f
Merge pull request #8491 from mschulz-at-hilscher/mbedtls-2.28
...
Backport 2.28: "CSR parsing with critical fields fails" #8377
2023-11-20 14:07:31 +00:00
Gilles Peskine
d4084fd899
Readability improvement
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-16 15:56:52 +01:00
Gilles Peskine
c41133b90d
Add documentation
...
Explain the goals of metatests, how to write them, and how to read their
output.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-16 15:56:52 +01:00
Gilles Peskine
e38eb79e89
Add metatests for mutex usage
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-16 15:56:23 +01:00
Gilles Peskine
ee8af06887
Run metatests in selected components
...
Run metatests in some components, covering both GCC and Clang, with ASan,
MSan or neither.
Note that this commit does not cover constant-flow testing builds or Valgrind.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-16 15:56:23 +01:00
Gilles Peskine
6effdff76b
Script to run all the metatests (with platform filtering)
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-16 15:56:23 +01:00
Tomás González
5fae560b4a
Update new license headers
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com >
2023-11-13 11:45:12 +00:00
Gilles Peskine
ac5fcd4540
Update license
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-08 19:19:18 +01:00
Gilles Peskine
bfc1844eb2
Merge pull request #8480 from yuhaoth/backports/7649/add-command-for-server9-bad-saltlen
...
Backports for #7649 : add command for server9-bad-saltlen
2023-11-08 19:04:27 +01:00
Dave Rodgman
79659cdf22
Merge pull request #8469 from daverodgman/mbedtls-2.28.6-pr
...
Mbedtls 2.28.6
2023-11-08 18:01:18 +00:00
Dave Rodgman
a645708949
Restore bump version
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-08 11:50:57 +00:00
Matthias Schulz
9a0ad5c427
Changed the test to reflect mbedTLS's current behavior.
...
Signed-off-by: Matthias Schulz <mschulz@hilscher.com >
2023-11-07 16:40:22 +01:00
Matthias Schulz
5240ab0c98
Backported test cases from https://github.com/Mbed-TLS/mbedtls/pull/8378
...
Signed-off-by: Matthias Schulz <mschulz@hilscher.com >
2023-11-07 16:21:49 +01:00
Dave Rodgman
d6d43ec8a5
Merge pull request #8485 from gilles-peskine-arm/check-files-license-2.28
...
Backport 2.28: Check copyright statements and SPDX license statements
2023-11-06 17:07:48 +00:00
Gilles Peskine
32ffbfd139
Pacify mypy
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-11-06 13:25:37 +01:00