Andrzej Kurek
7cb0077c5d
Add all.sh components running depends.py without MBEDTLS_USE_PSA_CRYPTO
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-26 08:26:58 -04:00
Andrzej Kurek
2c7993c456
depends.py: add a config option to unset MBEDTLS_USE_PSA
...
This lets us perform any test without MBEDTLS_USE_PSA
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 15:56:10 -04:00
Andrzej Kurek
409248a73a
mbedtls_ssl_get_handshake_transcript is unusable without hashes
...
Mark unused variables when compiling without
SHA256 and SHA384. In future a proper dependency
will be added to TLS 1.2 to enforce either of these hashes
to be on.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 15:56:10 -04:00
Andrzej Kurek
57d1063db9
Fix tls_prf generic dependencies
...
One version was already surrounded by the USE_PSA define,
so the VIA_XX_OR_XX macros were removed;
Second version is when USE_PSA is undefined, so MBEDTLS_
macros can be used.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 15:56:10 -04:00
Andrzej Kurek
468c50656e
Fix key exchange dependencies for ssl_parse_server_ecdh_params
...
Resulting from particular configs in which this code is used.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 15:55:18 -04:00
Manuel Pégourié-Gonnard
72ef7c0390
Merge pull request #6463 from AndrzejKurek/fix-crypo-typo
...
Fix a typo and dependencies in test_suite_cipher.[aes|gcm|ccm]
2022-10-24 11:06:22 +02:00
Manuel Pégourié-Gonnard
4c89542086
Merge pull request #6465 from mpg/pr-template-changelog
...
Make ChangeLog more visible in PR template
2022-10-24 10:46:31 +02:00
Andrzej Kurek
ba970be142
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-21 13:39:00 -04:00
Andrzej Kurek
ed05279e4f
Comment fix
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-21 10:28:55 -04:00
Andrzej Kurek
d066c79d7e
Add missing ECB requirements for PSA cipher aes tests
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-21 10:28:55 -04:00
Andrzej Kurek
8f26c8a0cf
Fix a typo in test_suite_cipher
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-21 10:28:55 -04:00
Manuel Pégourié-Gonnard
02e2fa0f64
Make ChangeLog more visible in PR template
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-21 11:01:22 +02:00
Manuel Pégourié-Gonnard
0e7e47147c
Merge pull request #6447 from mprse/driver-only-hash-gap
...
Fix test gap in driver-only-hashes build
2022-10-21 10:32:43 +02:00
Manuel Pégourié-Gonnard
45c6792faf
Merge pull request #6385 from AndrzejKurek/depends-py-reloaded
...
Unified tests/scripts/depends.py - reloaded
2022-10-21 10:17:58 +02:00
Janos Follath
c6952491c1
Merge pull request #6446 from yanesca/add_split_arch_tests_to_bignum_core
...
Add split arch tests to bignum core
2022-10-20 18:29:33 +01:00
Janos Follath
78e3c9b574
Fix style in bignum_core.py
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 12:09:30 +01:00
Janos Follath
560805d665
Fix mbedtls_mpi_core_add_if test aliasing
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 12:04:40 +01:00
Przemek Stekiel
2c95a56e13
Remove KNOWN_MBEDTLS_SUPPORTED_HASH_ALG as it is now not used anywhere
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-20 12:38:44 +02:00
Janos Follath
ba516f7524
mpi_core_add_if test: Remove dependency on old API
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 10:59:50 +01:00
Janos Follath
5ff03d49c0
Bignum Core test: move bound to constructor
...
We will need it to pad parameters in the base class, but it is useful
because every child class would need to calculate it anyway.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 10:53:14 +01:00
Janos Follath
e153a715f0
mpi_core_add_if: simplify tests
...
Use the new, limb size aware base class to generate tests for
mpi_core_add_if().
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 10:40:03 +01:00
Janos Follath
dd2e4683d0
Bignum Core: add limb size specific test generation
...
In Bignum Core the result also involves a carry and both the result and
the carry depend on the size of the limbs.
Before this change both 32 and 64 bit specific result have been passed
to the test functions.
Moving this decision out of the tests makes the test functions easier to
write and read and the test cases easier to read and debug. The change
doesn't make writing the generator script any harder and might even make
reading it easier.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-10-20 10:38:22 +01:00
Janos Follath
2b751cfa46
Merge pull request #6399 from wernerlewis/bignum_gen_6274
...
Split bignum tests by module and generate with Python framework
2022-10-20 09:29:56 +01:00
Werner Lewis
f1c24f0fbc
Add missing include
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 16:43:22 +01:00
Werner Lewis
bd3ddafee2
Move tests added in #6289
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:36:18 +01:00
Werner Lewis
f86c82e8f3
Pass bits_in_limb parameter to duplicated methods
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
63653b9b0a
Remove unnecessary check
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
6baf12b18d
Move legacy mod functions back to test_suite_mpi
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
2295eecb12
Add missing space in string
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
ffe4478936
Move mpi_core_bitlen tests to bignum_core files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
1b20e7e645
Redefine result() method to return List
...
Many bignum tests have multiple calculated result values, so return
these as a list, rather than formatting as a string.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
7a2731463b
Add function to generate random montmul cases
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
a850312e9d
Add test generation for mpi_core_montmul
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
0a9c48b68e
Add test generation for mpi_core_mla
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
bbf0a32d67
Add flag for unique combinations in operations
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
6351c7f5f3
Add test generation for mpi_core_sub
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
ce769d1fc9
Add test generation for mpi_core_add_if
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
99e8178fa7
Add module for bignum_core test generation
...
Separate file is added for classes used to generate cases for tests
in bignum_core.function. Common elements of the BignumOperation class
are added to classes in a new common file, for use across files.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
0c6ea12145
Move bignum_mod tests into separate files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
c9b6a0aef9
Move bignum_mod_raw tests into separate files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:20:01 +01:00
Werner Lewis
c6004a2ab3
Move bignum_core tests into separate files
...
Test cases for mpi_core_add_if, mpi_core_mla, mpi_core_sub,
mpi_core_montmul are not copied into new files, these are generated in
subsequent commits.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-10-19 15:19:53 +01:00
Gilles Peskine
149c1516e7
Merge pull request #6435 from mpg/improve-outcome-analysis
...
Improve outcome analysis for driver-only builds
2022-10-19 15:54:17 +02:00
Gilles Peskine
4281ae0bd2
Merge pull request #6373 from gilles-peskine-arm/bignum-core-conventions
...
Spell out bignum core conventions
2022-10-19 15:53:33 +02:00
Gilles Peskine
db2996357c
Merge pull request #6289 from gabor-mezei-arm/6237_Add_conditional_assign_and_swap_for_bignum
...
Bignum: Add safe conditional assign and swap for the new MPI types
2022-10-19 15:51:19 +02:00
Andrzej Kurek
f4b8a4f971
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-19 09:13:11 -04:00
Andrzej Kurek
b8a97e7520
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-19 08:35:09 -04:00
Andrzej Kurek
629c412e81
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-19 08:35:09 -04:00
Andrzej Kurek
9387b7b34e
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-19 08:35:09 -04:00
Andrzej Kurek
b489f958b8
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-19 08:35:09 -04:00
Andrzej Kurek
a44c5bcdb7
depends.py: rename config_pl usage to config_py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:09 -04:00