From 9b0bdd0590441a5e99f7cf18c44877ed6a74ad85 Mon Sep 17 00:00:00 2001 From: Elena Uziunaite Date: Fri, 6 Sep 2024 16:10:20 +0100 Subject: [PATCH] Remove MBEDTLS_ECP_HAVE_xxx and MBEDTLS_MD_CAN_xxx Signed-off-by: Elena Uziunaite --- docs/driver-only-builds.md | 17 ++++------------- include/mbedtls/config_adjust_legacy_crypto.h | 1 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/driver-only-builds.md b/docs/driver-only-builds.md index 5d950b068d..2c08c69063 100644 --- a/docs/driver-only-builds.md +++ b/docs/driver-only-builds.md @@ -100,12 +100,8 @@ considerations](#general-considerations) above. If you want to check at compile-time whether a certain hash algorithm is available in the present build of Mbed TLS, regardless of whether it's -provided by a driver or built-in, you should use the following macros: - -- for code that uses only the PSA Crypto API: `PSA_WANT_ALG_xxx` from - `psa/crypto.h`; -- for code that uses non-PSA crypto APIs: `MBEDTLS_MD_CAN_xxx` from - `mbedtls/config_adjust_legacy_crypto.h`. +provided by a driver or built-in, you should use `PSA_WANT_ALG_xxx` from +`psa/crypto.h`. ### HMAC @@ -186,13 +182,8 @@ enabled, with the following exceptions: If you want to check at compile-time whether a certain curve is available in the present build of Mbed TLS, regardless of whether ECC is provided by a -driver or built-in, you should use the following macros: - -- for code that uses only the PSA Crypto API: `PSA_WANT_ECC_xxx` from - `psa/crypto.h`; -- for code that may also use non-PSA crypto APIs: `MBEDTLS_ECP_HAVE_xxx` from - `mbedtls/build_info.h` where xxx can take the same values as for -`MBEDTLS_ECP_DP_xxx` macros. +driver or built-in, you should use `PSA_WANT_ECC_xxx` from + `psa/crypto.h`. Note that for externally-provided drivers, the integrator is responsible for ensuring the appropriate `MBEDTLS_PSA_ACCEL_xxx` macros are defined. However, diff --git a/include/mbedtls/config_adjust_legacy_crypto.h b/include/mbedtls/config_adjust_legacy_crypto.h index 778ea6cc1d..d669f4cf76 100644 --- a/include/mbedtls/config_adjust_legacy_crypto.h +++ b/include/mbedtls/config_adjust_legacy_crypto.h @@ -87,7 +87,6 @@ #if defined(MBEDTLS_MD_LIGHT) /* - * - MBEDTLS_MD_CAN_xxx is defined if the md module can perform xxx. * - MBEDTLS_MD_xxx_VIA_PSA is defined if the md module may perform xxx via PSA * (see below). * - MBEDTLS_MD_SOME_PSA is defined if at least one algorithm may be performed