From 86730a8d50f3b823dd2953218f6c2cbe4d65b100 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 9 Feb 2021 16:24:11 -0700 Subject: [PATCH] Add missing MBEDTLS_PSA_BUILTIN for ChaCha20-Poly1305 Add these missing definitions when this configration is chosen. Signed-off-by: David Brown --- include/mbedtls/config_psa.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index b085500bb..1e63872e2 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -353,6 +353,7 @@ extern "C" { #if defined(PSA_WANT_ALG_CHACHA20_POLY1305) #if defined(PSA_WANT_KEY_TYPE_CHACHA20) #define MBEDTLS_CHACHAPOLY_C +#define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #else /* not PSA_WANT_KEY_TYPE_CHACHA20 */ // #error "PSA_WANT_ALG_CHACHA20_POLY1305 requires PSA_WANT_KEY_TYPE_CHACHA20" #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */ @@ -495,6 +496,7 @@ extern "C" { #define MBEDTLS_PSA_BUILTIN_ALG_STREAM_CIPHER 1 #if defined(MBEDTLS_CHACHAPOLY_C) #define PSA_WANT_ALG_CHACHA20_POLY1305 1 +#define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #endif #endif