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
Dave Rodgman
60dcdd1686
Merge pull request #8558 from gilles-peskine-arm/MBEDTLS_TEST_HAVE_xSAN-2.28
...
Backport 2.28: Fix test_suite_platform failure with Asan on modern Clang
2023-11-23 14:04:09 +00:00
Paul Elliott
20e76134ea
Merge pull request #8557 from gilles-peskine-arm/metatest-gcc-12-2.28
...
Backport 2.28: Fix metatest.c with gcc-12 -Wuse-after-free
2023-11-23 11:09:24 +00: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
Gilles Peskine
e9616fdbc9
Fix the build with gcc-12 -Wuse-after-free
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-22 17:37:57 +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
feb98ccada
Merge pull request #8497 from ronald-cron-arm/remove-cocci-files-2.28
...
[Backport 2.28] Remove unused *.cocci files
2023-11-20 14:07: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
Dave Rodgman
04a8d02f31
Merge pull request #8543 from gilles-peskine-arm/metatest-create-2.28
...
Backport 2.28: Create a metatest program
2023-11-20 10:16:39 +00:00
Gilles Peskine
e00255c41c
Improve explanations of what bad thing a metatest does
...
Especially clarify the situation with respect to mutex usage.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:52 +01:00
Gilles Peskine
96c87c4e7b
Uniformly use MBEDTLS_THREADING_C guards
...
Since the code compiles with MBEDTLS_THREADING_C, not just with
MBEDTLS_THREADING_PTHREAD, use MBEDTLS_THREADING_C as the guard. The runtime
behavior is only as desired under certain conditions that imply
MBEDTLS_THREADING_PTHREAD, but that's fine: no metatest is expected to pass
in all scenarios, only under specific build- and run-time conditions.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:52 +01: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
efc57cabd0
Uninitialized read: make the pointer non-volatile rather than the buffer
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:52 +01:00
Gilles Peskine
226f1bc080
More consistent usage of volatile
...
Fix MSVC warning C4090.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:52 +01:00
Gilles Peskine
53833516bf
Strengthen against possible compiler optimizations
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:52 +01:00
Gilles Peskine
2c04f57ffc
programs/test/metatest indirectly includes library/common.h
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:50 +01:00
Gilles Peskine
510c01c6ad
Add missing program to .gitignore
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +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
db2b5c94a6
Don't use %llx in printf
...
We still do MinGW builds on our CI whose printf doesn't support it!
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
6b3b7f832b
Fix cast from pointer to integer of different size
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
64c6c80e28
Don't cast a function pointer to a data pointer
...
That's nonstandard. Instead, convert to an integer.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
6289ccc006
Use casts when doing nonstandard pointer conversions
...
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
967714d8e7
Strengthen against Clang optimizations
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
970584f32f
Metatests for basic Asan and Msan features
...
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
Gilles Peskine
21d8d59ce2
Metatests for null pointer dereference
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
30380dacdb
Validate that test_fail causes a test failure
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:23 +01:00
Gilles Peskine
c33940da51
Add a metatest program
...
This program can be used to validate that things that should be detected as
test failures are indeed caught, either by setting the test result to
MBEDTLS_TEST_RESULT_FAILED or by aborting the program.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:56:22 +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
Dave Rodgman
e44be6a7d3
Merge pull request #8503 from gilles-peskine-arm/fix-license-generate_server9_bad_saltlen
...
2.28 only: Update license of a newly added file
2023-11-08 21:39:44 +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
fd0f440a7f
Add docs re Everest license
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:50:57 +00:00
Dave Rodgman
e74ac9e474
Update BRANCHES
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:50:57 +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
Dave Rodgman
bfda7def7d
Restore Changelog from 2.28.6
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:50:57 +00:00
Dave Rodgman
6097cdd048
Merge remote-tracking branch 'origin/mbedtls-2.28' into mbedtls-2.28.6-pr
2023-11-08 11:50:13 +00:00
Dave Rodgman
82b9f5ecdd
Revert back to 2.28.5
...
git revert v2.28.5..v2.28.6
git rebase to combine the resulting revert commits
This reverts commit 3a91dad9dceb484eea8b41f8941facafc4520021.
2023-11-08 11:48:14 +00:00
Dave Rodgman
3a91dad9dc
Add docs re Everest license
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:41:55 +00:00
Ronald Cron
eb8f498ef1
Remove unused *.cocci files
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-11-08 10:13:35 +01: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