Minos Galanakis
e431739c72
Extract basic-components into a separate file.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
f7d1cb0275
Separate all.sh from components.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
f1f086e4a3
Applied consistent style.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:37:41 +01:00
Minos Galanakis
7771119069
Created placeholder component files.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:37:33 +01:00
Gilles Peskine
33218d2b30
Merge pull request #9329 from sezrab/replace_MBEDTLS_MD_CAN_MD5_with_PSA_WANT-3.6
...
Backport 3.6: Add MD5 support for requires_hash_alg
2024-07-18 09:41:05 +00:00
Sam Berry
602550162c
Add TLS: password protected... to ignored_tests list
...
Signed-off-by: Sam Berry <sam.berry@arm.com>
2024-07-17 10:03:40 +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
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
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
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
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
da22402d5f
all.sh: Fix clean-up of Makefiles generated by CMake
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-18 09:12:11 +02:00
David Horstmann
dfba499c16
Extend python checks to framework scripts
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-07 11:10:43 +01:00
Bence Szépkúti
2cfa6c9b45
Merge pull request #9208 from davidhorstmann-arm/move-test-generation-files-3.6
...
[Backport 3.6] Move test generation files to framework
2024-06-04 09:23:23 +00:00
David Horstmann
ea09152be9
Update file paths for moved files
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:51:41 +01:00
David Horstmann
a5eadf45ab
Move some test generation files to framework
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:51:41 +01:00
Ronald Cron
22a092be63
Do not use --recurse-submodules
...
On the CI, the git version when running on
Ubuntu 16.04 is 2.7 and it does not support
the "--recurse-submodules" option of
"git ls-files" thus do not use it.
Another argument to not use it is that
when TF-PSA-Crypto will be a submodule of
mbedtls we will not want check_files.py to
check the TF-PSA-Crypto files as well.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-29 09:51:26 +02:00
Ronald Cron
c521badcea
Extend basic checks of files to framework files
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-29 09:51:26 +02:00
Bence Szépkúti
29c4017007
Merge pull request #9131 from davidhorstmann-arm/move-mbedtls-dev-to-framework-3.6
...
[Backport 3.6] Move `mbedtls_dev` to framework submodule
2024-05-28 15:50:56 +00:00
Gilles Peskine
2c3aa942aa
Merge pull request #9166 from gilles-peskine-arm/analyze_outcomes-generate_files-3.6
...
Backport 3.6: Generate test data before coverage analysis
2024-05-23 12:08:12 +00:00
Ronald Cron
baf6775a73
Merge pull request #9160 from ronald-cron-arm/crypto-config-test_ref_configs-3.6
...
[Backport 3.6] Partial backport of #9057
2024-05-23 09:30:04 +00:00
Gilles Peskine
7fbbb43a57
Pacify pylint
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-22 18:09:39 +02:00
Gilles Peskine
8941033a40
Generate test data before coverage analysis
...
Fixes #8300 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-22 18:09:39 +02:00
Ronald Cron
8526751ec4
Improve test-ref-configs.pl
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-22 09:12:19 +02:00
Ronald Cron
7d949ae1a3
Resolve PBKDF2_AES_CMAC_PRF_128 dependencies
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-22 09:12:19 +02:00
Ronald Cron
e3283ed019
test-ref-configs.pl: Detect automatically test with USE_PSA enabled
...
Change the way we decide if for a given
configuration we need to run tests with
and without MBEDTLS_USE_PSA_CRYPTO enabled.
That makes the script suitable for 3.6 and
development branch.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-22 09:12:19 +02:00
Ronald Cron
f47f5459b1
Fix compat.sh filters
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-22 09:12:19 +02:00
Gilles Peskine
89ef2fabb5
Driver-only FFDH is not good enough for DHE support in TLS 1.2
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-14 12:06:20 +02:00
David Horstmann
b1827cb42d
Add mbedtls_framework to mypy checks
...
Since this python module resides in the framework submodule we must
add an extra explicit path to it for mypy.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:44:37 +01:00
David Horstmann
9638ca389b
Update references to mbedtls_dev
...
Change these to point to the new mbedtls_framework module in the
framework submodule.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:44:37 +01:00
David Horstmann
04f3433a55
Add framework/scripts to scripts_path.py
...
This allows test scripts to find the new mbedtls_framework module.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:44:37 +01:00
David Horstmann
df097d3b38
Add note explaining component purpose
...
We are testing that we don't break OSS-Fuzz, primarily.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-10 15:39:54 +01:00
David Horstmann
90dddc68b9
Add all.sh component for programs without tests
...
Check that we can build under CMake with ENABLE_TESTING=OFF but
ENABLE_PROGRAMS=ON.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-10 14:55:04 +01:00
Valerio Setti
b03778560b
generate_test_keys: move code for arrays and LUT generation to a separate function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 12:37:45 +02:00
Valerio Setti
6f86a4a5a3
check-generated-files: move check for generate_test_cert_macros.py
...
This test should only be performed when in MbedTLS repo and not
in tf-psa-crypto one.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 11:15:57 +02:00
Valerio Setti
3d54a9d7a3
generate_test_[keys/cert_macros]: minor fixes
...
- remove new line at beginning of test_keys.h
- add footer at the end of both generated files
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
d714259c01
generate_test_keys: move output file writing to a separate function
...
This helps removing the previous pylint exception.
Also use "with" statement for opening the file in order to
ensure that all the content is flushed to the file before
exiting.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
42efdd83ff
generate_test_keys: sort keys before processing them
...
Without this fix keys could be listed differently on Ubuntu 16
between different runs therefore causing
check_generated_files() to fail.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
feb87a9dfc
check-generated-files: add test_certs.h file to the list of checked items
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
97e4e04a52
generate_test_cert_macros: minor fixes
...
- use build_tree to get the project root path
- remove "if True" in an "if" statement
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
e2f2dd5b91
generated_test_keys: minor fixes
...
- rewrite output file (do not append)
- remove useless "os" import
- move pylint for main() function
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
b090df2e35
generate_test_keys: remove left-over variable
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
1717821867
generate_test_keys: do not quit script if output file already exists
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
a8753694f2
generate_test_keys: add missing flush at the end of script
...
Ensure that all the data is actually written to the output file.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
351236a3a9
generate_test_keys: use build_tree to guess the MbedTLS root path
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
ba91d44cd3
generate_test_cert_macros: minor fixes
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00
Valerio Setti
c2293190fe
generate_test_cert_macros: embed input args
...
- Embed input arguments inside the script so as to simplify the
calls in Makefiles/CMakeLists.
- add a new "--list-dependencies" command line option to print
out the list of dependencies.
- Modify tests/Makefile accordinlgy.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-07 10:54:44 +02:00