1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

psa: Fix the size of hash buffers

Fix the size of hash buffers for PSA hash
operations.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2021-10-18 09:47:58 +02:00
parent 0859fe20f6
commit 3a95d2b530
5 changed files with 14 additions and 5 deletions

View File

@ -3467,7 +3467,11 @@ curve_matching_done:
{
size_t dig_signed_len = ssl->out_msg + ssl->out_msglen - dig_signed;
size_t hashlen = 0;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
unsigned char hash[PSA_HASH_MAX_SIZE];
#else
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
#endif
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
/*