Make use of MBEDTLS_MAX_HASH_SIZE macro

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/library/pkcs12.c b/library/pkcs12.c
index 06b0c12..f335079 100644
--- a/library/pkcs12.c
+++ b/library/pkcs12.c
@@ -324,7 +324,7 @@
 
     unsigned char diversifier[128];
     unsigned char salt_block[128], pwd_block[128], hash_block[128] = {0};
-    unsigned char hash_output[64]; /* Maximal hash size for SHA512 */
+    unsigned char hash_output[MBEDTLS_HASH_MAX_SIZE];
     unsigned char *p;
     unsigned char c;
     int           use_password = 0;