Skip to content

Commit fbea691

Browse files
committed
fixup! psa: Disallow use of invalid cipher contexts
1 parent a443ab9 commit fbea691

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/psa_crypto.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,8 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
29212921
PSA_KEY_USAGE_DECRYPT );
29222922

29232923
/* A context must be freshly initialized before it can be set up. */
2924-
if (operation->alg != 0) {
2924+
if (operation->alg != 0)
2925+
{
29252926
return( PSA_ERROR_BAD_STATE );
29262927
}
29272928

0 commit comments

Comments
 (0)