From 67ffab560078ffcc4244b1e41e0c633a2ddc963d Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Wed, 14 Sep 2022 14:07:01 +0200 Subject: [PATCH] ssl.h: use PSA hash buffer size when PSA is used Signed-off-by: Przemyslaw Stekiel --- include/mbedtls/ssl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 0fcac689f..1e0220a6a 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -629,7 +629,12 @@ union mbedtls_ssl_premaster_secret #define MBEDTLS_PREMASTER_SIZE sizeof( union mbedtls_ssl_premaster_secret ) +#if defined(MBEDTLS_USE_PSA_CRYPTO) +#define MBEDTLS_TLS1_3_MD_MAX_SIZE PSA_HASH_MAX_SIZE +#else #define MBEDTLS_TLS1_3_MD_MAX_SIZE MBEDTLS_MD_MAX_SIZE +#endif /* MBEDTLS_USE_PSA_CRYPTO */ + /* Length in number of bytes of the TLS sequence number */ #define MBEDTLS_SSL_SEQUENCE_NUMBER_LEN 8