From 78a429b89a5b72bcba038e5bbec1337c06da8a8e Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 21 Jan 2021 09:48:57 -0700 Subject: [PATCH] Add _BUILTIN defines for new features For the new features conditionalized on MBEDTLS_PSA_ACCEL_..., define a correlated MBEDTLS_PSA_BUILTIN_... if it is not defined. This prevents check_names from considering these new defines as typos. Signed-off-by: David Brown --- include/mbedtls/config_psa.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index 756991a0e..60ed72c39 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -222,24 +222,28 @@ extern "C" { #if defined(PSA_WANT_KEY_TYPE_AES) #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES) +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_AES 1 #define MBEDTLS_AES_C #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_AES */ #endif /* PSA_WANT_KEY_TYPE_AES */ #if defined(PSA_WANT_KEY_TYPE_ARC4) #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ARC4) +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ARC4 1 #define MBEDTLS_ARC4_C #endif /*!MBEDTLS_PSA_ACCEL_KEY_TYPE_ARC4 */ #endif /* PSA_WANT_KEY_TYPE_ARC4 */ #if defined(PSA_WANT_KEY_TYPE_CAMELLIA) #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA) +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_CAMELLIA 1 #define MBEDTLS_CAMELLIA_C #endif /*!MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA */ #endif /* PSA_WANT_KEY_TYPE_CAMELLIA */ #if defined(PSA_WANT_KEY_TYPE_DES) #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DES) +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES 1 #define MBEDTLS_DES_C #endif /*!MBEDTLS_PSA_ACCEL_KEY_TYPE_DES */ #endif /* PSA_WANT_KEY_TYPE_DES */