Add missing MBEDTLS_PSA_BUILTIN for ChaCha20-Poly1305

Add these missing definitions when this configration is chosen.

Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
David Brown 2021-02-09 16:24:11 -07:00
parent fc46818eeb
commit 86730a8d50

View file

@ -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