Gilles Peskine
86c603702e
Reorder blocks to avoid double negations
...
Convert `#if !... A #else B #endif` to `#if ... B #else A`. No semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-17 12:21:21 +02:00
Gilles Peskine
4804847b15
Make it possible to enable CTR_DRBG/PSA without a PSA AES driver
...
Make it possible, but not officially supported, to switch the CTR_DRBG
module to PSA mode even if MBEDTLS_AES_C is defined. This is not really
useful in practice, but is convenient to test the PSA mode without setting
up drivers.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-17 12:21:21 +02:00
Gilles Peskine
cd693c36fd
MBEDTLS_STATIC_ASSERT: make it work outside of a function
...
At the top level, the macro would have had to be used without a following
semicolon (except with permissive compilers that accept spurious semicolons
outside of a function), which is confusing to humans and indenters. Fix
that.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-17 12:21:21 +02:00
Gilles Peskine
71a0e8c2cd
Merge pull request #9398 from davidhorstmann-arm/upgrade-python-dependencies-3.6
...
[Backport 3.6] Upgrade python dependencies in requirements file
2024-07-15 18:16:11 +00:00
David Horstmann
4e7ca644ce
Upgrade python dependencies in requirements file
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-15 16:35:50 +01:00
Gilles Peskine
89a48ce267
Merge pull request #9392 from valeriosetti/backport-fix-psa_key_derivation_verify_bytes
...
[Backport 3.6] psa: fix parameters' names of psa_key_derivation_verify_bytes()
2024-07-15 11:01:01 +00:00
Valerio Setti
d30cc09bc7
psa: fix parameters' names of psa_key_derivation_verify_bytes()
...
PSA buffers and their length should follow a pattern for which
the latter is named after the former as <buffer_name>_length,
but this was not the case for psa_key_derivation_verify_bytes().
This makes life of crypto.h parsers (for automatic code generation)
harder. This commit aims at solving this problem.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-15 07:23:09 +02:00
Ronald Cron
71ff969ca2
Merge pull request #9383 from ronald-cron-arm/move-mbedtls-crypto-modules-3.6
...
[Backport 3.6] Backport of the framework submodule update in PR 9340
2024-07-10 15:09:48 +00:00
Ronald Cron
eebe477c3f
Update framework submodule
...
Update framework submodule as
in PR 9340 against development.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 12:18:22 +02:00
Gilles Peskine
3e419b06da
Merge pull request #9375 from davidhorstmann-arm/move-test-data-files-to-framework-3.6
...
[Backport 3.6] Move test data files to framework
2024-07-09 12:47:05 +00:00
Ronald Cron
dda4382f22
Update the framework submodule to the merge of PR18
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-09 09:04:31 +02:00
David Horstmann
55e4c36f55
Update framework submodule
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
77074905bb
Update generated tls13 testcase script
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
d762d94dfb
Move variable into generated bash
...
Move the DATA_FILES_PATH_VAR variable into the generated bash rather
than only variablising it in the python that generates the test script.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
316beb349d
Simplify path in audit-validity-dates.py
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
72edc66437
Simplify data_files path in compat test generation
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
5ab92be10a
Use variable for data_files path in ssl-opt.sh
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
79c8a65be3
Replace data_files path with variable in compat.sh
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
7d0e5d20ab
Correct redundant framework/../framework paths
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
3e00faf166
Fix line-too-long in generate_tls13_compat_tests.py
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
5282ecddaa
Update directory-climbing path in context-info.sh
...
A path containing '../../' was defined in relation to a directory in the
tests/data_files directory. Since this has been moved to
framework/data_files, we must update the path to refer correctly to the
same location as before.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:48 +01:00
David Horstmann
9c4dd4ee6f
Update paths pointing to tests/data_files
...
These now point to framework/data_files instead.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:36:46 +01:00
David Horstmann
099f49230c
Move some files to framework repository
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-08 15:33:58 +01:00
Gilles Peskine
422a276c5e
Merge pull request #9045 from Troy-Butler/handle-null-args
...
[Backport 3.6] Fix NULL argument handling in mbedtls_xxx_free() functions
2024-07-04 14:50:59 +00:00
Gilles Peskine
41204b86d8
Merge pull request #9272 from sezrab/silence-3.6
...
[Backport 3.6] Silence gcc 12.2.0 warning
2024-07-04 14:49:41 +00:00
Gilles Peskine
c03041844b
Merge pull request #9341 from gilles-peskine-arm/psa_cipher_decrypt-ccm_star-iv_length_enforcement-3.6
...
Backport 3.6: psa_cipher_decrypt CCM*: fix rejection of messages shorter than 3 bytes
2024-07-04 14:39:29 +00:00
Gilles Peskine
acef7b3894
Merge pull request #9132 from andre-rosa/check-overflow-when-reading-padding-len-on-aes-128-cbc-decryption-for-mbedtls-3.6
...
Backport 3.6: Add invalid `padding_len` check in `get_pkcs_padding`
2024-07-03 14:41:17 +00:00
Ronald Cron
e2ae1b44f1
Merge pull request #9301 from gilles-peskine-arm/test_suite_config-booleans-3.6
...
Backport 3.6: Report configuration settings in the outcome file
2024-07-03 13:10:18 +00:00
Gilles Peskine
b47c3b3111
psa_cipher_decrypt CCM*: fix rejection of messages shorter than 3 bytes
...
Credit to Cryptofuzz. Fixes #9314 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-03 09:42:35 +02:00
Gilles Peskine
4e69485b65
Update framework after merge of #28
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-01 15:31:40 +02:00
Tom Cosgrove
71b58180cd
Merge pull request #9273 from eleuzi01/backport-8389
...
[Backport 3.6] Use CMAKE_C_SIMULATE_ID when available to determine compiler
2024-06-24 11:28:37 +00:00
Paul Elliott
9bfe69a815
Merge pull request #9274 from eleuzi01/backport-9250
...
[Backport 3.6] Fix compiler warnings in test_suite_pk.function
2024-06-24 10:40:49 +00:00
Manuel Pégourié-Gonnard
087d007040
Merge pull request #9305 from valeriosetti/issue9126-backport
...
[Backport 3.6] Do not perform adjustments on legacy crypto from PSA, when MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
2024-06-24 07:30:36 +00:00
Valerio Setti
3b665626e8
changelog: add changelog
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-21 13:40:16 +02:00
Valerio Setti
3153ae47a9
config_psa: do not update legacy symbols in client-only PSA build
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-21 13:40:16 +02:00
Gilles Peskine
a9a2c73b7e
Update generate_config_tests.py
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
112673f106
Add some missing handling for generated test_suite_config.*.data
...
Fixes the files not being generated in the build tree.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
d496caad6d
Anchor relative paths
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
331d7d053d
Driver vs referenee: ignore relevant configuration differences
...
The driver-vs-reference checks compare test results in different
configurations. Ignore the test results that report differences in
configurations that were the point of the comparison. Do compare other
configuration reports: this will let us know if the configurations diverge
in an unexpected way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
06fb1803be
Generate config test cases for single options
...
Generate option-on and option-off cases for test_suite_config, for all
boolean options (MBEDTLS_xxx and PSA_WANT_xxx, collected from the mbedtls
and PSA config files).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
1c52e57621
New test suite to report configuration options
...
Add a test suite intended to report configuration options in the outcome
file: we're only interested in SKIP vs PASS.
Add a few test cases for some interesting combinations of options. The
selection here is just for illustration purposes, more will be added later.
A subsequent commit will automatically generate test cases for single options.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
26d279e35f
Clean up generated files enumeration
...
Avoid having to list multiple generation scripts on the same line.
No intended semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Gilles Peskine
30805a733b
Recognize that a double-inclusion guard is not a config setting
...
Fix PSA_CRYPTO_CONFIG_H being treated as a configuration setting in
include/psa/crypto_config.h.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-21 00:01:20 +02:00
Ronald Cron
cf995d4197
Merge pull request #9289 from ronald-cron-arm/adapt-components-with-psa-crypto-config-enabled-3.6
...
[Backport 3.6] Partial backport of PR 9185
2024-06-19 13:38:27 +00:00
Ronald Cron
2c891fd165
Update framework submodule to the merge of PR22
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 13:49:24 +02:00
Ronald Cron
7b66beb666
test_when_no_ciphersuites_have_mac: Fix logs
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 10:34:21 +02:00
Ronald Cron
2463ec8d70
tests: src: Fix PSA test wrappers for PAKE
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 10:34:21 +02:00
Ronald Cron
81a2d1d421
Merge pull request #9276 from ronald-cron-arm/tree-cleanliness-3.6
...
[Backport 3.6] Partial backport of #9247
2024-06-18 22:23:48 +00:00
Ronald Cron
5758749347
Update framework
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-18 11:44:00 +02:00
Elena Uziunaite
f99197122d
Changelog Fix
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-06-18 10:28:10 +01:00