From e16e6edfce3078e596692a9181299de16078659f Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 24 Aug 2022 15:20:14 -0400 Subject: [PATCH] Remove the dependency on MD_MAX_SIZE from PKCS12 Signed-off-by: Andrzej Kurek --- library/pkcs12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/pkcs12.c b/library/pkcs12.c index 8dd5f74905..06b0c125a1 100644 --- a/library/pkcs12.c +++ b/library/pkcs12.c @@ -324,7 +324,7 @@ int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen, unsigned char diversifier[128]; unsigned char salt_block[128], pwd_block[128], hash_block[128] = {0}; - unsigned char hash_output[MBEDTLS_MD_MAX_SIZE]; + unsigned char hash_output[64]; /* Maximal hash size for SHA512 */ unsigned char *p; unsigned char c; int use_password = 0;