mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-01 04:20:45 +00:00
Change test on local nonce buffer size to an assertion
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
cae5909053
commit
a393619dc2
@ -3893,11 +3893,9 @@ psa_status_t psa_aead_generate_nonce( psa_aead_operation_t *operation,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( required_nonce_size > sizeof( local_nonce ) )
|
#if defined(assert)
|
||||||
{
|
assert( required_nonce_size <= sizeof( local_nonce ) );
|
||||||
status = PSA_ERROR_GENERIC_ERROR;
|
#endif
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = psa_generate_random( local_nonce, required_nonce_size );
|
status = psa_generate_random( local_nonce, required_nonce_size );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user