From 949330827cad4da897c30d37b75309ec65d85c09 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 5 Jan 2021 12:03:25 -0700 Subject: [PATCH] Add feature support for AES for PSA crypto config Basic support for enabling AES through PSA_WANT_KEY_TYPE_AES. Signed-off-by: David Brown --- include/mbedtls/config_psa.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index 69a6a31ce..d011c383b 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -220,6 +220,12 @@ extern "C" { #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY */ #endif /* PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY */ +#if defined(PSA_WANT_KEY_TYPE_AES) +#if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES) +#define MBEDTLS_AES_C +#endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_AES */ +#endif /* PSA_WANT_KEY_TYPE_AES */ + #else /* MBEDTLS_PSA_CRYPTO_CONFIG */ /* @@ -328,6 +334,10 @@ extern "C" { #define PSA_WANT_ALG_SHA_512 1 #endif +#if defined(MBEDTLS_AES_C) +#define PSA_WANT_KEY_TYPE_AES 1 +#endif + #endif /* MBEDTLS_PSA_CRYPTO_CONFIG */ #ifdef __cplusplus