Declare curves as accelerated in all.sh when needed
Before this PR, the tests passed without this, but they shouldn't have.
Accelerators need to declare what curves they support, and if no curve
is declared as accelerated, the built-in implementations of algs and key
types need to be enabled.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 6f9d142..6b0e735 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -2340,6 +2340,9 @@
loc_accel_list="ALG_ECDSA ALG_DETERMINISTIC_ECDSA \
$(helper_get_psa_key_type_list "ECC")"
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
loc_curve_list="$(helper_get_psa_curve_list)"
# Configure
@@ -2365,7 +2368,7 @@
helper_libtestdriver1_make_drivers "$loc_accel_list" "$loc_extra_list"
- helper_libtestdriver1_make_main "$loc_accel_list"
+ helper_libtestdriver1_make_main "$loc_accel_list $loc_curve_list"
# Make sure this was not re-enabled by accident (additive config)
not grep mbedtls_ecdsa_ library/ecdsa.o
@@ -2384,6 +2387,9 @@
loc_accel_list="ALG_ECDH \
$(helper_get_psa_key_type_list "ECC")"
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
loc_curve_list="$(helper_get_psa_curve_list)"
# Configure
@@ -2407,7 +2413,7 @@
helper_libtestdriver1_make_drivers "$loc_accel_list"
- helper_libtestdriver1_make_main "$loc_accel_list"
+ helper_libtestdriver1_make_main "$loc_accel_list $loc_curve_list"
# Make sure this was not re-enabled by accident (additive config)
not grep mbedtls_ecdh_ library/ecdh.o
@@ -2480,7 +2486,13 @@
component_test_psa_crypto_config_accel_pake() {
msg "build: full with accelerated PAKE"
- loc_accel_list="ALG_JPAKE"
+ loc_accel_list="ALG_JPAKE \
+ $(helper_get_psa_key_type_list "ECC")"
+
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
+ loc_curve_list="$(helper_get_psa_curve_list)"
# Configure
# ---------
@@ -2496,7 +2508,7 @@
helper_libtestdriver1_make_drivers "$loc_accel_list"
- helper_libtestdriver1_make_main "$loc_accel_list"
+ helper_libtestdriver1_make_main "$loc_accel_list $loc_curve_list"
# Make sure this was not re-enabled by accident (additive config)
not grep mbedtls_ecjpake_init library/ecjpake.o
@@ -2547,6 +2559,9 @@
ALG_JPAKE \
$(helper_get_psa_key_type_list "ECC")"
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
loc_curve_list="$(helper_get_psa_curve_list)"
# Configure
@@ -2652,6 +2667,9 @@
ALG_JPAKE \
$(helper_get_psa_key_type_list "ECC")"
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
loc_curve_list="$(helper_get_psa_curve_list)"
# Configure
@@ -2826,6 +2844,9 @@
$(helper_get_psa_keys_list "FFDH")"
fi
+ # Note: Those are handled in a special way by the libtestdriver machinery,
+ # so we only want to include them in the accel list when building the main
+ # libraries, hence the use of a separate variable.
loc_curve_list="$(helper_get_psa_curve_list)"
# Configure