Skip to content

Commit 8a7e3ba

Browse files
committed
Simplify CMAC verification logic
1 parent 24f581f commit 8a7e3ba

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

wolfcrypt/src/cmac.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,8 @@ int wc_AesCmacVerify_ex(Cmac* cmac,
449449
devId);
450450
if (ret == 0) {
451451
compareRet = ConstantCompare(check, a, (int)min(checkSz, aSz));
452-
}
453-
454-
if (ret == 0)
455452
ret = compareRet ? 1 : 0;
453+
}
456454

457455
return ret;
458456
}

0 commit comments

Comments
 (0)