Remove extraneous state checks
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 13116dc..0bdbc5b 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -3514,8 +3514,7 @@
goto exit;
}
- if( operation->nonce_set || operation->ad_started ||
- operation->body_started || !operation->is_encrypt )
+ if( operation->nonce_set || !operation->is_encrypt )
{
status = PSA_ERROR_BAD_STATE;
goto exit;
@@ -3561,8 +3560,7 @@
goto exit;
}
- if( operation->nonce_set || operation->ad_started ||
- operation->body_started )
+ if( operation->nonce_set )
{
status = PSA_ERROR_BAD_STATE;
goto exit;