Simplify CMAC verification logic

This commit is contained in:
Joseph Chen
2024-05-23 15:12:10 +08:00
parent 24f581fe13
commit 8a7e3ba52e

View File

@ -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;
}