mbedtls/tests
Manuel Pégourié-Gonnard 54e3c6593e Fix failures in signature accel test
The test driver library tries to only build what's necessary, but must
use the same PSA_WANT macros as the main library. So, for things that
are not needed, it undefines MBEDTLS_PSA_BUILTIN_xxx and defines
MBEDTLS_PSA_ACCEL_xxx, unless the ACCEL symbol was defined on the
command line, in which case it undefines it and defineds BUILTIN
instead. This negation happens in crypto_config_test_driver_extension.h
and reflects the fact that what we want accelerated in the main library
is what we want built-in in the driver library (and vice versa if we
want to minimize the size of the driver library).

So, the ACCEL symbols in inside the test driver library (while it's
being built, not those on the command line) are a bit of a white lie:
they don't actually mean "there's an accelerator for this" but instead
"I won't include a built-in for this even though the corresponding
PSA_WANT symbol is defined".

This was quite harmless until MD started making dispatch decisions based
on the ACCEL symbols: when it tries to dispatch to an accelerator that
doesn't actually exist, things tend to go badly.

The minimal fix for this is to change how we enable extra hashes in the
test driver library: by defining the ACCEL symbol on the command line,
in the build we'll end up with the BUILTIN symbol (and implementation!)
and no ACCEL symbol, which is exactly what we want.

Long version: https://arm-ce.slack.com/archives/GTM3SM1K5/p1675071671707599

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-03-16 09:46:51 +01:00
..
.jenkins
configs Explicitly disable all DTLS options in tls13-only.h 2023-03-01 19:49:58 +01:00
data_files Add PKCS #7 test files using expired cert 2023-03-11 10:24:30 +00:00
docker/bionic Point to docker images used in the CI 2022-12-15 10:08:26 +01:00
git-scripts Fix typographical errors in .md files found by cspell 2022-07-29 13:44:01 +01:00
include Fix failures in builds without PSA_CRYPTO_C 2023-03-16 09:46:51 +01:00
opt-testcases ssl-opt: remove redundant ECDSA dependencies in TLS1.3 tests 2023-03-06 14:48:39 +01:00
scripts Fix failures in signature accel test 2023-03-16 09:46:51 +01:00
src Merge pull request #6500 from yanrayw/split-TLS-connection-func-into-ssl_helpers 2023-03-15 10:50:03 +01:00
suites Dispatch according to init status. 2023-03-16 09:46:51 +01:00
.gitignore Test the PSA alternative header configuration macros 2023-02-23 17:18:33 +01:00
CMakeLists.txt Fix build errors in CMake 2023-03-13 19:20:42 +08:00
compat-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2022-12-19 11:42:12 +01:00
compat.sh Update some comments 2023-02-23 16:03:56 +08:00
context-info.sh Modifies tests in context-info.sh 2021-06-16 16:19:53 +01:00
Descriptions.txt
make-in-docker.sh Point to docker images used in the CI 2022-12-15 10:08:26 +01:00
Makefile Fix build errors in CMake 2023-03-13 19:20:42 +08:00
ssl-opt-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2022-12-19 11:42:12 +01:00
ssl-opt.sh Merge pull request #7217 from lpy4105/issue/6840/add-cache-entry-removal-api 2023-03-15 15:38:06 +01:00