Skip to content

Commit 59ec1a5

Browse files
committed
Fix CMAC verify error return value
1 parent 9f759fa commit 59ec1a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfcrypt/src/cmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ int wc_AesCmacVerify_ex(Cmac* cmac,
591591
devId);
592592
if (ret == 0) {
593593
compareRet = ConstantCompare(check, a, (int)min(checkSz, aSz));
594-
ret = compareRet ? 1 : 0;
594+
ret = compareRet ? MAC_CMP_FAILED_E : 0;
595595
}
596596

597597
return ret;

0 commit comments

Comments
 (0)