Switch PSA_HASH_FINAL_SIZE to PSA_HASH_SIZE

Make this macro work on derived algorithms as well (HMAC,
hash-and-sign, etc.).
This commit is contained in:
Gilles Peskine 2018-04-19 08:29:59 +02:00 committed by itayzafrir
parent 65eb8588fe
commit 71bb7b77f0
2 changed files with 21 additions and 21 deletions

View file

@ -774,7 +774,7 @@ psa_status_t psa_hash_finish( psa_hash_operation_t *operation,
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),