Do not perform adjustments on legacy crypto from PSA, when MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C #9126
Labels
component-crypto
Crypto primitives and low-level interfaces
enhancement
size-s
Estimated task size: small (~2d)
Summary
When a pure PSA client configuration is being built, i.e.
MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
are defined in the Mbed TLS config, the header fileconfig_adjust_legacy_from_psa.h
will try to adjust theMBEDTLS_*
config items based on what thePSA_WANT_*
defines are imposing. For a client config this adjustment is not really required because the crypto operations will not be implemented by the instance of Mbed TLS running on client side (if any) but will just be routed throughout the transport towards the service side, i.e. these checks are imposing an additional not required constraint on the client config, and so the should be avoided. Ideally, for a pure client config that only performs PSA Crypto APIs, the only required item in a config should be indeed `#define MBEDTLS_PSA_CRYPTO_CLIENT".Note: This assumes the adjustment are only impacting crypto related configuration items, if they are impacting TLS/X.509 related config that then those would need to be preserved.
System information
Mbed TLS version (number or commit id): 3.6.0 and development
Operating system and version: not relevant
Configuration (if not default, please attach
mbedtls_config.h
):MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): not relevant
Additional environment information: N/A
Expected behavior
Do not require local config of Mbed TLS to match adjustment that would stem from
PSA_WANT_*
requirementsActual behavior
a valid local config (client side) of Mbed TLS must be provided to match
PSA_WANT_*
requirementsSteps to reproduce
Additional information
TF-M use case
The text was updated successfully, but these errors were encountered: