From b65a7f7b52d755083063c9b740165377764ef1d2 Mon Sep 17 00:00:00 2001 From: David Brown <david.brown@linaro.org> Date: Fri, 15 Jan 2021 12:04:09 -0700 Subject: [PATCH] Add feature support for DES for PSA crypto config Basic support for enabling DES through PSA_WANT_KEY_TYPE_DES. Signed-off-by: David Brown <david.brown@linaro.org> --- 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 a4b4f913f..e80a8e6e2 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -238,6 +238,12 @@ extern "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_DES_C +#endif /*!MBEDTLS_PSA_ACCEL_KEY_TYPE_DES */ +#endif /* PSA_WANT_KEY_TYPE_DES */ + #else /* MBEDTLS_PSA_CRYPTO_CONFIG */ /* @@ -358,6 +364,10 @@ extern "C" { #define PSA_WANT_KEY_TYPE_CAMELLIA 1 #endif +#if defined(MBEDTLS_DES_C) +#define PSA_WANT_KEY_TYPE_DES 1 +#endif + #endif /* MBEDTLS_PSA_CRYPTO_CONFIG */ #ifdef __cplusplus