Skip to content

Commit

Permalink
Merge pull request #7575 from josepho0918/cmac
Browse files Browse the repository at this point in the history
Simplify CMAC verification logic
  • Loading branch information
dgarske authored May 23, 2024
2 parents 023f604 + 8a7e3ba commit 40db521
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions wolfcrypt/src/cmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,8 @@ int wc_AesCmacVerify_ex(Cmac* cmac,
devId);
if (ret == 0) {
compareRet = ConstantCompare(check, a, (int)min(checkSz, aSz));
}

if (ret == 0)
ret = compareRet ? 1 : 0;
}

return ret;
}
Expand Down

0 comments on commit 40db521

Please sign in to comment.