Commit graph

21736 commits

Author SHA1 Message Date
Gilles Peskine
bf7537d0a9 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-19 08:35:08 -04:00
Gilles Peskine
e85163bb5c Simplify final passed/failed reporting
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Gilles Peskine
0fa7cbeeb9 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-19 08:35:08 -04:00
Gilles Peskine
54aa5c6957 Factor running config.pl into its own function
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Gilles Peskine
46c8256547 Flush log output after each line
Otherwise the output can be out of order when redirected.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Gilles Peskine
b39e3ecee6 New script to exercise compilation options
Unify curves.pl, key-exchanges.pl, depends-pkalgs.pl and
depends-hashes.pl into a single, newly-written script.

For curves, key exchanges and hashes, in addition to testing
all-but-one settings in the group like the old scripts, also run the
tests with a single option in the group.

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Andrzej Kurek
e40b92178d Fix missing padding dependencies
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Andrzej Kurek
252283f2aa Fix missing cipher mode dependencies
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-19 08:35:08 -04:00
Przemek Stekiel
8258ea7b7d test_suite_psa_crypto: adapt dependenies and guards so the test can run in the driver-only build
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-19 13:20:20 +02:00
Manuel Pégourié-Gonnard
0dc40773d6 Improve comments & messages
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-19 12:12:21 +02:00
Gabor Mezei
4dceede71b
Fix overly replacement in the documentation
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-18 16:44:17 +02:00
Przemek Stekiel
98b1af4e34 test_suite_debug: adapt dependenies so the test can run in the driver-only build
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-18 14:52:41 +02:00
Janos Follath
7cd1ebe0bb
Merge pull request #6296 from gilles-peskine-arm/test_data_generation-pr_6093_followup
Minor fixes to test_data_generation.py
2022-10-18 13:38:28 +01:00
Manuel Pégourié-Gonnard
d92fb01419 Skip bits not needed in outcome-analysis.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-18 12:10:45 +02:00
Manuel Pégourié-Gonnard
b51051f1c7 Cosmetic improvement
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-18 12:10:45 +02:00
Manuel Pégourié-Gonnard
f6e6df9dbf Add option for before-after or just ref-drivers
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-18 12:10:45 +02:00
Manuel Pégourié-Gonnard
2bb2f15772 Improve driver-only outcome-analysis script
Instead of having a list of test suites of interest, have a list of
suites to ignore and look at all the others.

In order for this to only yield interesting results, we need to tune the
reference configuration a bit, in order to exclude STREAM and ECB to
more closely match the driver-based configuration.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-18 12:10:45 +02:00
Gilles Peskine
47da7bfac8
Merge pull request #6434 from gilles-peskine-arm/lmots_import_export_test-memory_leak
LMS: Fix memory leak if unit test fails
2022-10-17 17:57:59 +02:00
Gabor Mezei
0c74e084d5
Fix condition
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-17 16:09:58 +02:00
Gilles Peskine
503d09b52d Fix memory leak if unit test fails
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-17 12:27:43 +02:00
Manuel Pégourié-Gonnard
6c6f04b651
Merge pull request #6419 from mpg/fix-assert-alloc-usage
Fix usage of ASSERT_ALLOC()
2022-10-17 12:10:48 +02:00
Dave Rodgman
f33da19dfb
Merge pull request #6413 from daverodgman/update_docs_links
Update documentation links
2022-10-14 17:42:48 +01:00
Gilles Peskine
8874cd570e
Merge pull request #4826 from RcColes/development
Add LMS implementation
2022-10-14 18:33:01 +02:00
Gilles Peskine
dcd1717f5f Forbid aliasing outputs
Aliasing between two outputs is hardly ever useful.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-14 17:15:21 +02:00
Gabor Mezei
ffb4aa0ddc
Rename variables to have unambiguous names
Use bytes instead of len in the variable names.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-14 16:39:04 +02:00
Gabor Mezei
4086de667d
Fix documentation
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-14 16:29:42 +02:00
Gabor Mezei
8bcd7cca94
Use count instead of bytes in ASSERT_ALLOC argument
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-14 16:18:10 +02:00
Dave Rodgman
f1ebf128e7
Fix capitalisation
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-10-14 10:48:52 +01:00
Dave Rodgman
ce164b7016
Update SUPPORT.md
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-10-14 10:47:04 +01:00
Dave Rodgman
032b594ec9
Update SUPPORT.md
Co-authored-by: Paul Elliott <62069445+paul-elliott-arm@users.noreply.github.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-10-14 10:40:56 +01:00
Manuel Pégourié-Gonnard
b3c30907d6
Merge pull request #6383 from mprse/aead_driver_test
Enable testing of AEAD drivers with libtestdriver1
2022-10-14 11:11:01 +02:00
Manuel Pégourié-Gonnard
47b8de834d Fix usage of ASSERT_ALLOC()
The second argument is the number of elements of the type the first
argument is pointing to, so we shouldn't be using sizeof there.

This was resulting in overly large allocations.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-14 09:35:55 +02:00
Gilles Peskine
fa65237fd4 Fix which config header MBEDTLS_LMS_xxx is unset from
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-13 22:05:38 +02:00
Gilles Peskine
31c2dcb611 Fix file names in reproduction instructions in test data
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-13 20:48:15 +02:00
Gilles Peskine
2875aa7b01 Fix instructions and test data for pyhsslms interop tests
The test data was invalid because it had the extra 4-byte prefix for HSS.
Regenerate it (which produces completely new signatures since it is
randomized).

Rearrange the reproduction instructions for the second test case so that it
shows more clearly how to generate a second signature with the same private
key.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-13 20:45:05 +02:00
Raef Coles
8bccc999d9
Don't mention error type in LMS test comments
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:57:31 +01:00
Raef Coles
6d7d94a821
Use correct export length in LMS export tests
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:55:46 +01:00
Raef Coles
aa9d52bcdc
Rename LMS private key files to match library name
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:53:40 +01:00
Raef Coles
f8bfe2783b
Remove bad character from LMS test case
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:35:28 +01:00
Raef Coles
d543697092
Fix minor type in LMS test description
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:06:42 +01:00
Raef Coles
a2514f622f
Update pyhsslms test instructions with script
Due to tool name conflict hampering data reproduction

Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 17:04:21 +01:00
Raef Coles
1951259a10
Update how lms.c imports platform.h
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 16:47:13 +01:00
Raef Coles
ce18e528ff Rename LMS private key files
And remove now-unnecessary modification to check_files.py

Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 16:45:05 +01:00
Raef Coles
e4d96b804c Update LMS and LMOTS test comments
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 16:45:05 +01:00
Raef Coles
493724e3c2
Check correct output size in LMOTS export test
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 15:43:07 +01:00
Raef Coles
ed0e4591dc
Add output length test for LMS export too-big test
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 15:05:47 +01:00
Ronald Cron
49e4184812
Merge pull request #6299 from xkqian/tls13_add_servername_check
Add server name check when proposing pre-share key
2022-10-13 16:00:59 +02:00
Raef Coles
33f7d66304
Add output check to export too-big buffer tests
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:30:36 +01:00
Raef Coles
1d88ea870f
Remove unneeded NULL pointer checks in LMS tests
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:30:35 +01:00
Raef Coles
29c490db97
Update LMS calculate_public_key docs
To avoid the word "generate"

Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:30:34 +01:00