Commit graph

1720 commits

Author SHA1 Message Date
Bence Szépkúti
ae79fb2c2e Merge branch 'development' into pr3431 2022-11-25 03:12:43 +01:00
Manuel Pégourié-Gonnard
ef25a99f20
Merge pull request #6533 from valeriosetti/issue5847
Use PSA EC-JPAKE in TLS (1.2) - Part 2
2022-11-23 13:27:30 +01:00
Ronald Cron
d8603a7b44
Merge pull request #6638 from ronald-cron-arm/tls13-misc
TLS 1.3: Adjustments for the coming release
2022-11-23 09:07:36 +01:00
Bence Szépkúti
a17d038ee1 Merge branch 'development' into pr3431 2022-11-22 15:54:52 +01:00
Janos Follath
0fc88779ec
Merge pull request #6632 from yanesca/refactor_bignum_test_framework
Refactor bignum test framework
2022-11-22 14:53:58 +00:00
Gilles Peskine
a08103aa94
Merge pull request #6611 from gilles-peskine-arm/run-test-suites-out-of-tree
Fix run-test-suites.pl in out-of-tree builds
2022-11-22 15:01:13 +01:00
Ronald Cron
c2e110f445 tls13: Disable MBEDTLS_SSL_EARLY_DATA by default
Eventually we want it to be enabled by default
when TLS 1.3 is enabled but currently the
feature is on development thus it should not be
enabled by default.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2022-11-22 09:01:46 +01:00
Janos Follath
f45797652f Bignum tests: set unique combinations off by default
Normally we need all the combinations, unique combinations make sense
only if the operation is commutative.

No changes to generated tests.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-21 08:56:14 +00:00
Janos Follath
351e6885f5 Make pylint happy
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-21 08:56:14 +00:00
Janos Follath
87df373e0e Bignum test: Move identical function to superclass
No intended change in generated test cases.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-21 08:56:13 +00:00
Janos Follath
0cd8967ba1 Split test generator base class
The class BaseTarget served two purposes:
- track test cases and target files for generation
- provide an abstract base class for individual test groups

Splitting these allows decoupling these two and to have further common
superclasses across targets.

No intended change in generated test cases.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-21 08:56:13 +00:00
Manuel Pégourié-Gonnard
ba7c006222
Merge pull request #6466 from mprse/driver-only-hash-ci
Driver-only hashes: test coverage in the CI
2022-11-18 09:31:13 +01:00
Ronald Cron
d12922a69a
Merge pull request #6486 from xkqian/tls13_add_early_data_indication
The merge job of the internal CI ran successfully. This is good to go.
2022-11-17 12:48:50 +01:00
Przemek Stekiel
85c54ea361 Allow providing space sepatated tasks
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-17 11:50:23 +01:00
Przemek Stekiel
542d932352 Fix handling of default value for task argument
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-17 09:43:34 +01:00
Przemek Stekiel
6419ab5299 Reduce number of skipped suites (after making configs more similar)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-16 14:56:49 +01:00
Przemek Stekiel
52d8e96ff6 Disable PSA_WANT_ALG_STREAM_CIPHER, PSA_WANT_ALG_ECB_NO_PADDING also in reference config
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-16 14:56:26 +01:00
Przemek Stekiel
f3be7ccade Keep drivers enabled also in reference build
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-16 12:53:20 +01:00
Xiaokang Qian
e7bab00825 Update enabled guards for early data cases
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2022-11-16 10:06:50 +00:00
Xiaokang Qian
2dbfedae4a Update early data test cases with latest code message
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2022-11-16 02:01:49 +00:00
Gilles Peskine
298f781948 Use .datax for make test, not .data
Looking for the .data file doesn't work in out-of-tree builds. Use the
.datax file instead. `make clean` removes all .datax files, so this resolves
the issue of executables not present on the current branch being left behind
after a branch change followed by a `make clean`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-15 23:54:26 +01:00
Gilles Peskine
b9b9026c53 Pacify pylint
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-15 20:49:43 +01:00
Gilles Peskine
35af02171d Add negative zero as an input to automatically generated tests
Although negative zero is officially unsupported, we've had bugs related to
it in the past. So do test functions with a negative zero input.

There will likely be cases where we don't want to accept negative zero as if
it was valid, because it's too hard to handle. We'll add exceptions on a
case by case basis.

For the functions that are currently tested by the generated tests, the new
test cases pass.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-15 20:47:07 +01:00
Valerio Setti
9f0ec53c4c add a test for EC-JPAKE compatibility in TLS1.2
This is to ensure that the MbedTLS based implementation of EC-JPAKE
is compatible with the PSA crypto one

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-11-15 16:49:55 +01:00
Przemek Stekiel
aa88e0b86b Make configurations (driver, reference) as close as possible
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-15 13:21:14 +01:00
Xiaokang Qian
9a0aafbe79 Enable/disable MBEDTLS_SSL_EARLY_DATA for cases in ssl-opt.sh
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2022-11-15 02:49:46 +00:00
Przemek Stekiel
d3068af2a8 Optimize code (tasks list initialization, task verification)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-14 16:15:19 +01:00
Przemek Stekiel
733c76e08a Fix style issues pointed by pylint
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-14 08:33:21 +01:00
Dave Rodgman
71565cff3a Disable PKCS7 for some TLS 1.3 tests
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-11-11 10:37:38 +00:00
Minos Galanakis
5566eff657 generate_bignum_tests: Enabled BignumModRaw automatic generation
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2022-11-10 11:37:33 +00:00
Gilles Peskine
b4eb444a5c
Merge pull request #6535 from davidhorstmann-arm/change-test-templating-syntax
Change test templating syntax to be valid C
2022-11-10 12:05:55 +01:00
Dave Rodgman
f58172fe43 Merge remote-tracking branch 'origin/development' into pr3431 2022-11-10 09:54:49 +00:00
Gilles Peskine
9a571ddfd9
Merge pull request #6543 from mpg/improve-test-suites-listing
Improve test suite detection in run-test-suites.pl
2022-11-09 19:03:03 +01:00
David Horstmann
360f8e4429 Minor improvements to test code script
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-11-09 17:27:33 +00:00
Nick Child
89e82e1685 pkcs7: Add dependecy on MBEDTLS_MD_C
Signed-off-by: Nick Child <nick.child@ibm.com>
2022-11-09 10:36:10 -06:00
Przemek Stekiel
992de3c562 Make TASK parameter positional and allow more than one task
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-09 14:24:49 +01:00
Przemek Stekiel
be279c7bcc Make a list from ignored tests in TASKS
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-09 12:17:08 +01:00
Przemek Stekiel
51f30ff6e6 Make separate components for ref and driver in TASKS
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-09 12:07:29 +01:00
Przemek Stekiel
6856f4c70d Fix typos and comments
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-11-09 10:50:29 +01:00
Gilles Peskine
34c09469f3
Merge pull request #5396 from SiliconLabs/codegen_1.1
Driver dispatch Codegen 1.1
2022-11-07 15:27:41 +01:00
Manuel Pégourié-Gonnard
38860e2f19 Improve test suite detection in run-test-suites.pl
Looking for executables causes problems with leftover compiled test
suites from other branches when we forget to run make clean before
switching branches. Using the .data files is more robust as most of them
are tracked, so will be removed when switching branches.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-11-07 10:05:49 +01:00
David Horstmann
b85838f2f4 Change test templating syntax to be valid C
For the benefit of auto-formatting tools, move from the '$placeholder'
templating syntax to a new syntax of the form:

__MBEDTLS_TEST_TEMPLATE__PLACEHOLDER

This change allows the test code template to be almost entirely valid C.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-11-04 19:53:39 +00:00
Nick Child
fc234b7b52 test/pkcs7: Add Windows CRLF EOF to data files
Windows tests are failing pkcs7 verification due to differnt line
endings. Therefore, add make instuctions for building the data
files with Windows EOF instead. As a result, regenerate other data
files so that verification works.

Add these CRLF EOF files to the exception in check_files to ignore
the line endings.

Signed-off-by: Nick Child <nick.child@ibm.com>
2022-11-03 09:24:20 -05:00
Gilles Peskine
da6017cbe3 Group cpp_dummy_build test into an existing component
No need to do yet another build just to compile an additional trivial program.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-30 21:18:14 +01:00
Gilles Peskine
78e06a1054 Remove redundant TLS 1.3 components
* component_test_tls13_with_padding: just explicitly sets some options that
  are identical with full.
* component_test_tls13_with_ecp_restartable: redundant since TLS 1.3 doesn't
  have any support for restartable ECC.
* component_test_tls13_with_everest: not useful since TLS 1.3 doesn't call
  ECDH directly, it just relies on the PSA abstraction.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-29 17:57:18 +02:00
Gilles Peskine
8a4fd0e7a9 Remove redundant build-only driver interface component
component_build_psa_accel_alg_ecdsa is subsumed by
component_test_psa_crypto_config_accel_ecdsa, which has the same
configuration and additionally runs the unit tests.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-29 17:51:19 +02:00
Gilles Peskine
4bb369c4eb Always enable MBEDTLS_TEST_HOOKS in TLS 1.3-only test configurations
MBEDTLS_TEST_HOOKS is not supposed to change the behavior of the library, so
it's generally good to have it on in functional tests.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-29 17:48:20 +02:00
Ronald Cron
04e2133f45
Merge pull request #6482 from ronald-cron-arm/tls13-misc
TLS 1.3: Update documentation for the coming release and misc
2022-10-28 11:09:03 +02:00
Przemek Stekiel
120ed8f8fa Add comments to explan the purpose of the reference component
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-27 10:29:15 +02:00
Przemek Stekiel
5f6f32a0ad Remove hidden option to skip ssl-opt and compat tests
Also remove compat tests from reference component as results from this run are not included in outcome file.

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-27 08:24:43 +02:00