Switch PSA_HASH_FINAL_SIZE to PSA_HASH_SIZE Make this macro work on derived algorithms as well (HMAC, hash-and-sign, etc.).
diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 3ea87f6..b66862c 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c
@@ -774,7 +774,7 @@ size_t *hash_length ) { int ret; - size_t actual_hash_length = PSA_HASH_FINAL_SIZE( operation->alg ); + size_t actual_hash_length = PSA_HASH_SIZE( operation->alg ); /* Fill the output buffer with something that isn't a valid hash * (barring an attack on the hash and deliberately-crafted input),