David Horstmann
4a67c351a8
Improve X509 DN test naming
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
94cbd30a24
Add explanatory comments to raw DER test data
...
Break down the DER-encoded ASN.1 test data into its structure in a
comment and explain it, to make it easier to understand where the data
came from and how it is corrupted.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:28 +01:00
Andrzej Kurek
36b3b7cbee
Fix test dependencies for cases that are PSA-based
...
These should be using PSA-type macros, not MBEDTLS_XXX_C.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 05:40:55 -04:00
Andrzej Kurek
ed01319962
Add missing ECB requirements for PSA cipher aes tests
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 05:21:50 -04:00
Andrzej Kurek
0d3b3a86d2
Move MBEDTLS_ECP_C requirements to test_suite_ssl.function
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 14:50:35 -04:00
Andrzej Kurek
e470821e6a
Add missing SHA dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:46:16 -04:00
Andrzej Kurek
a2089f5a29
pylint: ignore duplicated imports
...
It is not uncommon to have the same imports
across different python files. Ignore it when
running pylint.
Starting at pylint 2.14.5 this is the default value.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:43:59 -04:00
Andrzej Kurek
3de1c783ea
Fix blowfish padding dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:43:55 -04:00
Andrzej Kurek
467a0f2025
Adjust depends.py to the 2.28 branch
...
SHA224 and SHA384 does not exist.
ARC4 and BLOWFISH requirements had to be added.
Changed mbedtls_config.h to config.h
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
15e5dd8d96
Add missing blowfish possibility to CBC suites
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
113952de01
depends.py: rename domains argument to tasks
...
Tasks can consist of domains and/or jobs.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
ffbc8f5d4a
depends.py documentation fixes
...
Now that the format of exclusive groups has been changed,
update the documentation using it too.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
96298f960f
Add a temporary solution to create a seedfile
...
This caused problems if a config with SHA512 was
compiled after a config without it and the seedfile
did not contain enough data.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
3146bb4f61
depends.py: remove config options that are unset anyway
...
Over the lifespan of this script these options have been removed
from the "full" configuration.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
bec35a18c1
depends.py: rename config_pl usage to config_py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
9cbdf102d6
Change the way exclusive groups are defined in depends.py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
0325ced8cc
depends.py: fix TLS 1.3 requirements
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
8b7a157fbe
Improve depends.py readability
...
Switch from SHA224 & SHA384 testing to SHA256 and SHA512.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
9155e7f8e3
Switch from x509_CRT_PARSE to KEY_EXCHANGE_WITH_CERT_ENABLED
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
cddae3b3fa
Add MBEDTLS_DES_C exclusive group dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
0b56ce00bd
Fix the memory allocation in test_suite_ssl
...
ASSERT_ALLOC calculates the size itself, and the parameter indicates number of elements.
```
mbedtls_calloc( sizeof( *( pointer ) ), ( length ) );
```
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
dc4a25249f
Fix tls 1.3 test dependencies
...
Remove the dependency of tls1_3 key Remove the dependency of secret evolution tests on curve25519
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:36:20 -04:00
Andrzej Kurek
7829d8fd8b
Replace x509_CRT_PARSE_C with KEY_EXCHANGE_WITH_CERT_ENABLED
...
SSL programs use certificates in an exchange, so it's more natural
to have such dependency instead of just certificate parsing.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:31 -04:00
Andrzej Kurek
7ddb53c18d
Fix unchecked allocation in test_suite_ssl
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:25 -04:00
Andrzej Kurek
110fc48070
depends.py: Add script documentation
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:19 -04:00
Andrzej Kurek
5b327555d5
Disable MBEDTLS_TEST_HOOKS in depends.py
...
This option was increasing testing duration
by about 40%.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:14 -04:00
Andrzej Kurek
068a73f46d
Rework depends.py to run more tests with hashes
...
The test coverage reduction introduced in
dc25cee lowered the coverage of hash tests
due to intertwining dependencies.
This commit introduces a new class for building
a domain using both the complementary
and exclusive classes.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:09 -04:00
Andrzej Kurek
2e105b53f9
depends.py: disable part of the test jobs
...
Disable exclusive jobs that run with a single
config disabled. A lot more bugs should be found by running jobs with only one config
of a family enabled.
This will also lessen the burden on the CI.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:24:02 -04:00
Andrzej Kurek
85d69309e8
Split depends.py all.sh job into seven
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:56 -04:00
Andrzej Kurek
fb3e27e178
Use upper case for constants in depends.py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:51 -04:00
Andrzej Kurek
b95ba9a2db
Improve depends.py structrue
...
Apply most improvements suggested by pylint.
Use config.py instead of config.pl.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:45 -04:00
Andrzej Kurek
798f5c28c9
Fix python formatting and indentation
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:40 -04:00
Andrzej Kurek
3cdd08cf84
Add an all.sh component running depends.pl
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:34 -04:00
Andrzej Kurek
9068625a57
Update depends.py
...
Remove old and add new dependencies.
Introduce a way to handle non-trivial problems
stemming from exclusive group testing.
Exclude SHA256 and SHA512, as these are tested
in SHA224 and SHA384 jobs, respectively.
Change config.h to mbedtls_config.h).
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:29 -04:00
Andrzej Kurek
4d95934a61
Add missing ECP and ECDH dependencies in ssl test suites
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:23:20 -04:00
Andrzej Kurek
4ed670f0cd
Add missing key exchange dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:22:53 -04:00
Andrzej Kurek
b3b0ec9bed
Add missing dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:22:13 -04:00
Andrzej Kurek
0d2982be13
Refactor ssl test suite to use pointers more
...
This way it's easier to track structures that are partially set up.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:22:05 -04:00
Andrzej Kurek
e8ed2a1115
Compile constant time masking and hmac if there are suites using MAC
...
This is used in TLS 1.2 authentication with NULL cipher,
when there are no TLS_CBC suites.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:21:50 -04:00
Janos Follath
9abd09822c
Merge pull request #6424 from gilles-peskine-arm/test_data_generation-pr_6093_followup-2.28
...
Backport 2.28: Minor fixes to test_data_generation.py
2022-10-18 13:38:17 +01:00
Andrzej Kurek
f9412f77ac
Add tls prf handling when there's no SHA256 or SHA384
...
Return a null prf function pointer and check for it when populating transform.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 07:30:19 -04:00
Andrzej Kurek
773a461a17
Fix missing AES dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 07:05:55 -04:00
Gilles Peskine
3ce0e32d4b
Add domains for symmetric ciphers
...
Add a domain for cipher base algorithms (block permutations and stream
ciphers), a domain for block cipher chaining modes and a domain for
block cipher padding modes.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
7088a73296
When exercising key exchanges, don't build the test suites
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
b81f406742
Declare more reverse dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
3dd0dab7fb
Don't test builds with only deprecated hashes
...
Don't try to build with only SHA-1 or with only RIPEMD160 or with only
MD{2,4,5}.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
88e8dd6f5d
Use the full config as the baseline for all jobs
...
Start each job from the full config minus some memory management
settings and the job-specific settings.
The original content of config.h no longer influences the
configurations used for the jobs (but it still influences what jobs
may run, in that the set of jobs is partly built by parsing #define
and //#define lines in config.h).
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
dc68f618cc
Simplify final passed/failed reporting
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
fd1d69c77c
Add basic support for colored output
...
Show "pass" lines in green and "fail" lines in red.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00
Gilles Peskine
d43ce2b4c1
Factor running config.pl into its own function
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-18 06:13:04 -04:00