Commit graph

1127 commits

Author SHA1 Message Date
Ronald Cron
6b49b55d6d all.sh: Use consistently CRYPTO_CONFIG_H
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:02:59 +02:00
Ronald Cron
7a93ac5308 all.sh: Use consistently CONFIG_H
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:02:32 +02:00
Manuel Pégourié-Gonnard
828b3acd6b
Merge pull request #7848 from valeriosetti/issue7749
driver-only ECC: EPCf.TLS testing
2023-07-18 10:33:21 +02:00
Ronald Cron
e501d0e71e Add change log and non-regression test
Add change log and non-regression test
for CCM* with no tag not supported in
CCM only configuration.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-17 11:53:20 +02:00
Paul Elliott
88f34e3348
Merge pull request #7703 from gabor-mezei-arm/7598_clone_the_eco_module
[Bignum] Clone the ECP module
2023-07-11 15:00:01 +01:00
Manuel Pégourié-Gonnard
f614bde912
Merge pull request #7656 from mprse/ffdh_tls13_v2_drivers
FFDH 4: driver-only parity testing - with TLS 1.3
2023-07-10 13:08:47 +02:00
Valerio Setti
0085c2e486 test: fix message's text
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Valerio Setti
16b70f2b1a test: enabled ssl-opt testing in no_ecp_at_all components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Valerio Setti
887f823deb test: re-enable TLS and key exchanges in no_ecp_at_all component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Paul Elliott
2dfe7993af
Merge pull request #6914 from davidhorstmann-arm/cmake-pass-through-config-defines
Pass `MBEDTLS_CONFIG_FILE` defines through cmake
2023-07-07 17:01:57 +01:00
Manuel Pégourié-Gonnard
9967f11066
Merge pull request #7810 from valeriosetti/issue7771
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/ECC
2023-07-07 10:22:47 +02:00
Gabor Mezei
6db604711d
Add a new test component to test the new bignum interface with TEST_HOOKS
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-07-05 16:54:20 +02:00
David Horstmann
969c145f34 Use CONFIG_H variable rather than config file name
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-07-05 14:12:13 +01:00
David Horstmann
20550e3d59 all.sh component to test cmake custom config file
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-07-05 14:12:13 +01:00
Andrzej Kurek
026235c4ec Disable msan errors on null allocation in all.sh
Such error was raised in platform tests,
and it's a valid test case.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-07-05 08:32:43 -04:00
Przemek Stekiel
565353ef71 Cleanup the code
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-05 11:07:07 +02:00
Przemek Stekiel
84f4ff1dd3 Minor adaptations after ffdh was enabled for tls1.3
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-05 09:12:08 +02:00
Przemek Stekiel
01c248c00b Enable TLS1.3 in FFDH alg build with drivers and add reference config(without drivers)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-04 12:35:54 +02:00
Dave Rodgman
9cf17dad9d
Merge pull request #7851 from daverodgman/fix-unused-aes
Fix AES dependencies - build TF-M config cleanly
2023-07-03 16:49:00 +01:00
Manuel Pégourié-Gonnard
56b159a12a
Merge pull request #7627 from mprse/ffdh_tls13_v2
Make use of FFDH keys in TLS 1.3 v.2
2023-07-03 10:12:33 +02:00
Dave Rodgman
a2c1a387e4
Merge pull request #7630 from daverodgman/prefer-intrinsics
Prefer intrinsics over asm for AES-NI
2023-06-30 11:39:38 +01:00
Gabor Mezei
9b6b5a06d5
Enable testing the cloned ecp module
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-06-30 11:39:20 +02:00
Valerio Setti
c0d2f8417a test: replace all KEY_TYPE_ECC_KEY_PAIR with proper symbols
Note: the DERIVE option is intentionally skipped from the acceleration
list because this feature is still not supported.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
072bded588 test: use proper key pair symbols in accelerated list for EC curve test
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
f6587be09a test: remove useless accelerator intialization + minor restyling
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:21 +02:00
Valerio Setti
a983655526 test: use better naming for new components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:21 +02:00
Valerio Setti
249b18a286 test: add new component to test with all KEY_PAIRs enabled but one
- this component should work also for RSA and DH keys, not only for
  EC
- of course the acceleated counterpart is hanlded properly

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:12:19 +02:00
Dave Rodgman
1a4936ab86 Remove options not known to older gcc
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 14:07:50 +01:00
Dave Rodgman
88651c45e4 Change build target as Cortex-A32 not supported on CI
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:35:51 +01:00
Dave Rodgman
0f0f769cd0 Nicer formatting
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:10:45 +01:00
Dave Rodgman
fb374e6cff Split armcc tests to separate component
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:00:21 +01:00
Dave Rodgman
cd04020dac Add comment
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 11:59:47 +01:00
Dave Rodgman
6001fb241d Test combinations of macros for aes.o
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 09:30:28 +01:00
Dave Rodgman
904c58967c Revert "Extend TF-M build test to test all shipped configs"
This reverts commit 443018537e.

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 18:07:22 +01:00
Dave Rodgman
443018537e Extend TF-M build test to test all shipped configs
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 16:28:37 +01:00
Dave Rodgman
c164c07cfe Add TF-M build test to all.sh
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 09:57:16 +01:00
Andrzej Kurek
04bfe5797b Disable asan errors on null allocation in all.sh
Such error was raised in platform tests,
and it's a valid test case.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-27 10:02:09 -04:00
Valerio Setti
aafe90033c test: enable X509 testing in no_ecp_at_all() components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-26 15:23:44 +02:00
Valerio Setti
1814bb785f test: re-enable PK and RSA in component without ECP/ECP_LIGHT
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:23:53 +02:00
Dave Rodgman
3d9af4734f Fix tests?
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 12:10:11 +01:00
Dave Rodgman
6a08b68c90 Simplify aesni support test
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 11:52:22 +01:00
Dave Rodgman
f8986e3147 Clarify support_test_aesni
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:55:59 +01:00
Dave Rodgman
b959027010 Improve logic for checking for presence of AESNI code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:28:45 +01:00
Dave Rodgman
20cc563462
Improve logic for checking for presence of AESNI code
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:27:31 +01:00
Valerio Setti
a8dc7fd1a2 test: remove leftover paragraph in test_psa_crypto_config_accel_ecc_ecp_light_only
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 10:21:01 +02:00
Dave Rodgman
f18a7e1f86 Fix typo
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 22:41:18 +01:00
Dave Rodgman
f87e5268ec Fix test error
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 22:03:44 +01:00
Dave Rodgman
48d8e83472 fix CI failure
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 21:05:05 +01:00
Dave Rodgman
336a4530c5 Fix typo
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:22:04 +01:00
Dave Rodgman
086e137dc4 code style
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:21:39 +01:00
Dave Rodgman
96a9e6a9dd Address test review comments
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:18:36 +01:00
Dave Rodgman
fa1d05ccfd Remove not-needed compiler flags
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 19:52:49 +01:00
Dave Rodgman
e1dd6e9e8f Merge remote-tracking branch 'origin/development' into prefer-intrinsics 2023-06-16 17:46:16 +01:00
Dave Rodgman
be60fcca78 Add test for plain C path
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 17:04:52 +01:00
Dave Rodgman
c2b7264b83 Simplify aesni test
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 16:24:42 +01:00
Valerio Setti
22d0a79bc6 test: fix bug for test without bugnum
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
4922ba132a build_info: complete list of symbols that auto-enable ECP_LIGHT
The comment is also updated accordingly.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
addeee4531 mbedtls_config: add new MBEDTLS_PK_PARSE_EC_COMPRESSED symbol
This includes also:
- auto enabling ECP_LIGHT when MBEDTLS_PK_PARSE_EC_COMPRESSED is
  defined
- replacing ECP_LIGHT guards with PK_PARSE_EC_COMPRESSED in pkparse
- disabling PK_PARSE_EC_COMPRESSED in tests with accelarated EC curves
  (it get disabled also in the reference components because we want
  to achieve test parity)
- remove skipped checks in analyze_outcomes.py

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
aecd32c90a pk: let PK_PARSE_EC_EXTENDED auto-enable ECP_LIGHT
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
434836801f test: remove leftover from past PR development
ECP_LIGHT was never set as public symbol so it should not be
enabled/disabled using the config.py script.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
4d25a8d48a test: renaming component testing accelerated EC
References in analyze_outcomes.py are updated accordingly.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Dave Rodgman
838dc46a7b Test asm and intrinsics from all.sh
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 13:19:05 +01:00
Valerio Setti
01cc88a46b config_psa: replace USE symbols with BASIC one for all KEY_PAIRs
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:27:02 +02:00
Valerio Setti
4590bc2933 test: run all the test suite in the temporary component and grep outcome file
The file is temporary generate if none is specified on the command line.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
a1a0b1b348 test: add a temporary test for checking conversion for new symbols
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
ff7f861761 tests: replace deprecated symbols with temporary _LEGACY ones
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Manuel Pégourié-Gonnard
24f467668e
Merge pull request #7672 from mpg/libtestdriver1-helpers
Libtestdriver1 helpers
2023-06-16 11:43:40 +02:00
Przemek Stekiel
ce05f54283 Properly disable ECDH in only (psk) ephemeral ffdh key exchange components
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-15 16:44:08 +02:00
Tom Cosgrove
6edf8b8c7b
Merge pull request #7451 from yanrayw/7376_aes_128bit_only
Introduce config option of 128-bit key only in AES calculation
2023-06-15 10:35:32 +01:00
Manuel Pégourié-Gonnard
8d645dcd77 Fix unintentional config reduction in prev commit
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-15 09:07:10 +02:00
Przemek Stekiel
0c23147456 Disable MBEDTLS_DHM_C in component_test_tls13_only_psk
For details see the following comment: https://github.com/Mbed-TLS/mbedtls/pull/7627#issuecomment-1590792002

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-14 11:12:45 +02:00
Yanray Wang
4292441a42 all.sh: use clang for one test of AES_ONLY_128_BIT_KEY_LENGTH
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-06-14 17:10:15 +08:00
Przemek Stekiel
a01c24227f Add test components: only PSK ephemeral ffdh, only ephemeral ffdh key exchange
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-13 10:46:48 +02:00
Manuel Pégourié-Gonnard
f8930e2c80 Fix special-case with all curves except one.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-13 09:51:32 +02:00
Manuel Pégourié-Gonnard
aed1d7875a Remove references to non-existing options
We no longer support TLS 1.0, TLS 1.1 or CBC record splitting since 3.0,
but those where still referenced here.

While at it, group things in a more logical way in this component.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-12 17:22:24 +02:00
Manuel Pégourié-Gonnard
2336c8e929 Make -SE_C part of adjust_config
Several components needed to remove it, with the same comment every
time. It's probably just chance that other components happened to work
despite it being enabled.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-12 17:17:54 +02:00
Manuel Pégourié-Gonnard
8df87bf052 Group both configuration steps
Compared to the previous scheme, this avoid the problem of having to
warn about adjusting PSA_WANT in the wrong place.

Also, it allows enabling MBEDTLS_PSA_CRYPTO_CONFIG in adjust_config
rather than having to repeat it in every single component.

It also plays more nicely with components that have an associated
reference component and use a common config function. (Some of them were
already using the new order.)

Finally, "configure, build, run the tests" seems more natural than
"configure, build, configure, build, test" (and, coming back to the
initial point, it avoid questions about what to configure when).

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-12 17:09:38 +02:00
Przemek Stekiel
1051f856dc Re-enable MBEDTLS_DHM_C in tls13_only_psk, tls13_only_psk_ephemeral, tls13_only_psk_all
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-11 20:32:28 +02:00
Tom Cosgrove
6ec39cacaa Remove the all.sh test for this, since armclang on CI is too old
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-06-09 15:34:31 +01:00
Tom Cosgrove
730addc203 Fix armc5-bin-dir and armc6-bin-dir options to all.sh
ARMC5_BIN_DIR and ARMC6_BIN_DIR were set in pre_parse_command_line() and used
by support_build_armcc() which is called by pre_initialize_variables() to
determines SUPPORTED_COMPONENTS.

As pre_initialize_variables() is called before pre_parse_command_line(),
support_build_armcc() failed to use the directories set on the command line.

However, we can't call pre_parse_command_line() before pre_initialize_variables()
since the former needs SUPPORTED_COMPONENTS!

Fix the circular dependency by parsing the command line twice, with the first
pass only to get these directories.

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-06-09 14:20:18 +01:00
Tom Cosgrove
579e6e9a05 Merge the two ARM Compiler 6 - Target ARMv8.2-A - AArch64 builds
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-06-09 13:46:19 +01:00
Tom Cosgrove
46ed3a9834 Add an all.sh build test that catches the unterminated pragmas
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-06-09 13:46:19 +01:00
Gilles Peskine
95b43a04a9
Merge pull request #7651 from daverodgman/fix-armclang-compile-fail
Fix armclang compile fail
2023-06-08 14:36:18 +02:00
Manuel Pégourié-Gonnard
67f80372f0 Add size measurements per library
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-08 10:53:54 +02:00
Manuel Pégourié-Gonnard
7ae342f3f7 Use helper_libtestdriver1_adjust_config more
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-08 09:26:55 +02:00
Manuel Pégourié-Gonnard
981732e453 Fix some typos
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-08 09:26:51 +02:00
Przemek Stekiel
5e2f816c39 Fix test configs
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 12:31:08 +02:00
Manuel Pégourié-Gonnard
d4dff8b4de Update FFDH component
Was added while I was preparing this PR.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:19:37 +02:00
Manuel Pégourié-Gonnard
f5c5d971e7 Add documentation about libtestdriver1 usage
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
239094d51c all.sh: make libtestdriver1 components more uniform
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
27dd73fb91 all.sh: add helper_libtestdriver1_make_main()
Also, remove things that are redundant with ASAN_CFLAGS (-Werror, -O).

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
31639e49d2 all.sh: add helper_libtestdriver1_make_drivers()
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
27e1767c44 all.sh: add helper_libtestdriver1_adjust_config
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
a14b8f0a17 Add total when printing sizes in all.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Dave Rodgman
b45d58b9a5 Add armclang -O0 build test
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-02 13:54:00 -04:00
Dave Rodgman
8c315f2f74 Add build tests for Thumb and Thumb2 with clang
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-02 13:53:27 -04:00
valerio
f1d29136ac test: remove debug echo in component
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
Przemek Stekiel
6efa608d20 Revert setting optimization flag(use O2)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-31 09:38:21 +02:00
Dave Rodgman
99318e6138 Add build test for armclang / Cortex-M0 / -Os
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 12:27:42 +01:00
Yanray Wang
012b6bb99e all.sh: test AES built-in implementation in AES-128-bit key only
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-05-12 11:21:56 +08:00