mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-23 00:02:39 +03:00
Keep MD and PSA max size in sync
Some TLS code is using MD_MAX_SIZE in parts that are common to USE_PSA and non-USE_PSA, then using PSA_HASH_MAX_SIZE in parts specific to USE_PSA, and having different values causes trouble. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -151,6 +151,7 @@ typedef enum {
|
||||
MBEDTLS_MD_RIPEMD160, /**< The RIPEMD-160 message digest. */
|
||||
} mbedtls_md_type_t;
|
||||
|
||||
/* Note: this should be kept in sync with PSA_HASH_MAX_SIZE */
|
||||
#if defined(MBEDTLS_MD_CAN_SHA512)
|
||||
#define MBEDTLS_MD_MAX_SIZE 64 /* longest known is SHA512 */
|
||||
#elif defined(MBEDTLS_MD_CAN_SHA384)
|
||||
|
||||
Reference in New Issue
Block a user