Skip to content

Commit a443ab9

Browse files
committed
fixup! psa: Disallow use of invalid MAC contexts
1 parent 966526a commit a443ab9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/psa_crypto.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,8 @@ psa_status_t psa_mac_sign_finish( psa_mac_operation_t *operation,
22472247
{
22482248
psa_status_t status;
22492249

2250-
if( operation->alg == 0) {
2250+
if( operation->alg == 0)
2251+
{
22512252
return( PSA_ERROR_BAD_STATE );
22522253
}
22532254

@@ -2289,7 +2290,8 @@ psa_status_t psa_mac_verify_finish( psa_mac_operation_t *operation,
22892290
uint8_t actual_mac[PSA_MAC_MAX_SIZE];
22902291
psa_status_t status;
22912292

2292-
if( operation->alg == 0) {
2293+
if( operation->alg == 0)
2294+
{
22932295
return( PSA_ERROR_BAD_STATE );
22942296
}
22952297

0 commit comments

Comments
 (0)