mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 10:24:15 +01:00
Clear up language on zeroizing driver context at setup
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
aa87fd0012
commit
b6bf4bbf95
@ -2164,7 +2164,8 @@ psa_status_t psa_hash_setup( psa_hash_operation_t *operation,
|
|||||||
if( !PSA_ALG_IS_HASH( alg ) )
|
if( !PSA_ALG_IS_HASH( alg ) )
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
|
|
||||||
/* Ensure all of the context is zeroized, not just the dummy int */
|
/* Ensure all of the context is zeroized, since PSA_HASH_OPERATION_INIT only
|
||||||
|
* directly zeroes the int-sized dummy member of the context union. */
|
||||||
memset( &operation->ctx, 0, sizeof( operation->ctx ) );
|
memset( &operation->ctx, 0, sizeof( operation->ctx ) );
|
||||||
|
|
||||||
return( psa_driver_wrapper_hash_setup( operation, alg ) );
|
return( psa_driver_wrapper_hash_setup( operation, alg ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user