Gilles Peskine
4537d6d838
Move implementation detail from docstring to comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-09-17 10:38:58 +02:00
Gilles Peskine
64f2efdc40
More precise name for test data generation
...
We have Python code both for test code generation
(tests/scripts/generate_test_code.py) and now for test data generation.
Avoid the ambiguous expression "test generation".
This commit renames the Python module and adjusts all references to it. A
subsequent commit will adjust the documentation.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-09-17 10:38:58 +02:00
Gilles Peskine
1716f06ee3
Merge pull request #6093 from wernerlewis/bignum_test_script
...
Add bignum test case generation script
2022-09-17 10:37:26 +02:00
Werner Lewis
c2fb540c67
Use a script specific description in CLI help
...
Previous changes used the docstring of the test_generation module,
which does not inform a user about the script.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-16 17:03:54 +01:00
Archana
634e0d25cb
Update check_names.py to exclude autogen file
...
Don't look for MBED keywords on the autogenerated
psa_crypto_driver_wrappers.c file. This is needed since the naming of
constants is dependent on the driver json and the naming conventions
used through the library is stuck at a place where it does not swing
either way ( mbedtls_ / psa_).
Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Andrzej Kurek
4ba0e45f8e
all.sh: don't build with ECJPAKE_TO_PMS if SHA256 is not available
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-14 14:58:49 -04:00
Werner Lewis
52ae326ebb
Update references to file targets in docstrings
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-14 16:52:45 +01:00
Werner Lewis
ac446c8a04
Add combination_pairs helper function
...
Wrapper function for itertools.combinations_with_replacement, with
explicit cast due to imprecise typing with older versions of mypy.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-14 16:52:45 +01:00
Werner Lewis
b6e809133d
Use typing.cast instead of unqualified cast
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-14 16:52:45 +01:00
Przemek Stekiel
dcec7ac3e8
test_psa_crypto_config_accel_hash_use_psa: enable tls.1.3 at the end and adapt comment
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-09-13 18:08:54 +02:00
Przemek Stekiel
a4af13a46c
test_psa_crypto_config_accel_hash_use_psa: enable TLS 1.3
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-09-13 18:08:54 +02:00
Werner Lewis
3dc45198e6
Replace L/R inputs with A/B
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-12 17:35:27 +01:00
Werner Lewis
1fade8adb6
Move symbol definition out of __init__
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-12 17:34:15 +01:00
Andrzej Kurek
07e3570f8c
Add an ssl-opt.sh run to all.sh for the accel_hash_use_psa config
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-12 05:37:46 -04:00
Manuel Pégourié-Gonnard
f6a6a2d815
Merge pull request #6216 from AndrzejKurek/tls-tests-no-md-compat
...
TLS without MD - compat.sh addition to all.sh hash acceleration tests
2022-09-12 10:23:49 +02:00
Hannes Tschofenig
fd6cca4448
CID update to RFC 9146
...
The DTLS 1.2 CID specification has been published as RFC 9146. This PR updates the implementation to match the RFC content.
Signed-off-by: Hannes Tschofenig <hannes.tschofenig@arm.com>
2022-09-07 17:15:05 +02:00
Andrzej Kurek
5e0654a324
Add a compat.sh run to psa_crypto_config_accel_hash_use_psa
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-04 09:31:17 -04:00
Werner Lewis
855e45c817
Use simpler int to hex string conversion
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-02 17:26:19 +01:00
Werner Lewis
56013081c7
Remove unused imports
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-02 12:57:37 +01:00
Werner Lewis
a4668a6b6c
Rework TestGenerator to add file targets
...
BaseTarget-derived targets are now added to TestGenerator.targets in
initialization. This reduces repeated code in generate_xxx_tests.py
scripts which use this framework.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-09-02 11:56:34 +01:00
Andrzej Kurek
37a17e890c
Enable PKCS5 in no-md builds in all.sh
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-02 04:05:33 -04:00
Manuel Pégourié-Gonnard
97fc247d6a
Merge pull request #6232 from AndrzejKurek/pkcs12-no-md
...
Remove MD dependency from pkcs12 module
2022-09-02 09:43:13 +02:00
Andrzej Kurek
7bd12c5d5e
Remove MD dependency from pkcs12 module
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-01 08:57:41 -04:00
Werner Lewis
a4b7720cb5
Use combinations_with_replacement
for inputs
...
When generating combinations of values, `itertools.combinations` will
not allow inputs to be repeated. This is replaced so that cases where
input values match are generated, i.e. ("0", "0").
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-31 16:55:44 +01:00
Gilles Peskine
076f7257e9
Don't remove programs/fuzz/Makefile
...
Other programs/*/Makefile are only created by CMake, but programs/fuzz has
its own Makefile in the repository. Fixes #6247 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-08-30 21:02:44 +02:00
Gilles Peskine
dd06efbb8d
Don't try restoring a file if no backup is available
...
This caused `all.sh --force` to fail on a clean build tree.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-08-30 21:02:00 +02:00
Manuel Pégourié-Gonnard
bf22a2500b
Merge pull request #6208 from AndrzejKurek/tls-tests-no-md-structured
...
Remove the dependency on MD from TLS 1.2 tests
2022-08-30 12:34:37 +02:00
Manuel Pégourié-Gonnard
a84ce3fa81
Merge pull request #6111 from superna9999/6101-programs-dont-build-with-libtestdriver-and-use-psa
...
Programs don't build with libtestdriver and USE_PSA
2022-08-30 12:29:01 +02:00
Werner Lewis
81f24443b7
Modify wording in docstrings
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-30 09:37:07 +01:00
Werner Lewis
6ef5436f3c
Clarify documentation
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 12:29:46 +01:00
Werner Lewis
a16b617fe9
Disable abstract check in pylint
...
Version of pylint used in CI does not recognize abstract subclasses of
BaseTarget, so disable warning in these abstract classes.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 11:17:35 +01:00
Werner Lewis
e3ad22ecf2
Fix TARGET types and code style
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 10:02:06 +01:00
Werner Lewis
6d654c6491
Raise NotImplementedError in abstract methods
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-25 09:56:51 +01:00
Werner Lewis
9990b30568
Use typing casts for fixed-width tuples
...
Enforces fixed-width tuple types where mypy does not recognize.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:47 +01:00
Werner Lewis
6300b4f7e0
Add missing typing
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:41 +01:00
Werner Lewis
cfd4768df2
Use __new__() for case counting
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:13 +01:00
Werner Lewis
2b527a394d
Split generate_tests to reduce code complexity
...
Previous implementation mixed the test case generation and the
recursive generation calls together. A separate method is added to
generate test cases for the current class' test function. This reduces
the need to override generate_tests().
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 18:10:13 +01:00
Werner Lewis
699e126942
Use ABCMeta for abstract classes
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:33:21 +01:00
Werner Lewis
169034ae63
Add details to docstrings
...
Clarification is added to docstrings, mostly in abstract classes.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:30:30 +01:00
Werner Lewis
6c70d745d1
Convert bools to int before arithmetic
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:18 +01:00
Werner Lewis
92c876aaa9
Remove unneeded list concatenation
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:18 +01:00
Werner Lewis
55e638ca57
Remove abbreviations and clarify attributes
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 17:29:08 +01:00
Werner Lewis
fbb75e3fc5
Separate common test generation classes/functions
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-24 15:08:56 +01:00
Janos Follath
645ff5b8ff
Merge pull request #6095 from gabor-mezei-arm/6016_add_new_modulus_and_residue_structures
...
Add the new modulus and the residue structures with low level I/O operations
2022-08-23 09:02:43 +01:00
Andrzej Kurek
180b6b9608
Enable TLS 1.2 tests without MD and with USE_PSA in all.sh
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-08-22 17:46:50 -04:00
Gilles Peskine
e5018c97f9
Merge pull request #6195 from superna9999/6149-driver-only-hashes-ec-j-pake
...
Driver-only hashes: EC J-PAKE
2022-08-22 17:28:15 +02:00
Neil Armstrong
7b044c1bbf
Enable ECJPAKE in test_crypto_full_no_md () & test_psa_crypto_config_accel_hash_use_psa () components
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2022-08-19 11:49:22 +02:00
Przemek Stekiel
b792cfd423
component_test_psa_crypto_config_accel_hash_use_psa: stop removing all X.509 modules from the build
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-08-19 10:15:56 +02:00
Dave Rodgman
92cd8642fa
Merge pull request #6090 from hanno-arm/fix_bnmul_arm_v7a
...
Remove encoding width suffix from Arm bignum assembly
2022-08-18 08:48:03 +01:00
Dave Rodgman
03f7a6e086
Add armcc plain armv7-m target; tidy up arg order
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-08-17 14:35:29 +01:00