Wipe sensitive data in psa_mac_verify_finish

Wipe the whole MAC intermediate buffer, not just the requested MAC
size. With truncated MAC algorithms, the requested MAC size may be
smaller than what is written to the intermediate buffer.
This commit is contained in:
Gilles Peskine 2018-08-21 14:56:19 +02:00
parent 87b0ac49f8
commit 99b7d6b700

View file

@ -1827,7 +1827,7 @@ cleanup:
else
psa_mac_abort( operation );
mbedtls_zeroize( actual_mac, mac_length );
mbedtls_zeroize( actual_mac, sizeof( actual_mac ) );
return( status );
}