When MBEDTLS_PSA_CRYPTO_CLIENT is enabled but MBEDTLS_PSA_CRYPTO_C is
disabled, the PSA functions are missing, but there is code in the pk module
that call PSA functions.
When building such a configuration, let the test code provide stub functions
that just return an error. This way, we can link and run programs in this
configuration. The programs will fail at runtime if they try to invoke a PSA
function, so any testing that involves running PSA functions must still be
guarded by MBEDTLS_PSA_CRYPTO_C, not MBEDTLS_PSA_CRYPTO_CLIENT.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
In both cases we check that both libmbedcrypto is build without
missing any mbedtls_xxx() function. Only psa_yyy() are allowed
to be missing due to the lack of PSA provider in the builds.
Note: the component testing the default configuration now is
"downgraded" to only building the library because in the upcoming
commits this would become untestable as well.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This also fixes guards in psa_util that were discovered by the
new component_build_full_psa_crypto_client_without_crypto_provider().
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Since we officially disabled support for importing of PEM formatted keys
into PSA we removed dedicated tests from test_suite_psa_crypto. As a
consequence MBEDTLS_PEM_PARSE_C is no more an exception for
component_check_test_dependencies().
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Do not disable RSA_C and related modules because now it does not
automatically re-enable PK module.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
When building without PSA crypto functions, disable
MBEDTLS_PSA_CRYPTO_CLIENT as well as MBEDTLS_PSA_CRYPTO_C. With
just MBEDTLS_PSA_CRYPTO_CLIENT, PSA crypto API functions are supposed to
exist at link time but be provided by a third party.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
All no_cipher components have crypto (as in libmbedcrypto.a), but the
difference is one doesn't have PSA crypto while the other two do.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
These were probably leftovers from the development phase of the
associated PR that were not removed in the end.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
When building with Make on a Unix-like platform (shell and compiler),
auto-detect configurations that may require linking with pthread.
This removes the need for MAKE_THREADING_FLAGS in all.sh.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit also:
- rename the reference component as component_test_full_block_cipher_legacy_dispatch()
- add a common configuration function, named common_block_cipher_dispatch() that
is used from both accelerated and reference components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>