mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01:00
Set tag to 'impossible' value on failure to encrypt
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
6eb959854b
commit
f47b0957ab
|
|
@ -3626,6 +3626,11 @@ psa_status_t psa_aead_finish( psa_aead_operation_t *operation,
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
/* In case the operation fails and the user fails to check for failure or
|
||||||
|
* the zero tag size, make sure the tag is set to something impossible. */
|
||||||
|
if( status != PSA_SUCCESS )
|
||||||
|
memset(tag, '!', tag_size);
|
||||||
|
|
||||||
psa_aead_abort( operation );
|
psa_aead_abort( operation );
|
||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue