mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-14 01:25:28 -04:00
Remove extraneous state checks
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
6f0e72038d
commit
daf5c8954c
@ -3514,8 +3514,7 @@ psa_status_t psa_aead_generate_nonce( psa_aead_operation_t *operation,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( operation->nonce_set || operation->ad_started ||
|
if( operation->nonce_set || !operation->is_encrypt )
|
||||||
operation->body_started || !operation->is_encrypt )
|
|
||||||
{
|
{
|
||||||
status = PSA_ERROR_BAD_STATE;
|
status = PSA_ERROR_BAD_STATE;
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -3561,8 +3560,7 @@ psa_status_t psa_aead_set_nonce( psa_aead_operation_t *operation,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( operation->nonce_set || operation->ad_started ||
|
if( operation->nonce_set )
|
||||||
operation->body_started )
|
|
||||||
{
|
{
|
||||||
status = PSA_ERROR_BAD_STATE;
|
status = PSA_ERROR_BAD_STATE;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user