F-4157 — Fix native_test hash check using && instead of ||

pull/512/head
aidan garske 2026-05-26 12:13:11 -07:00
parent 07e3ec5525
commit fa616ac090
1 changed files with 1 additions and 1 deletions

View File

@ -963,7 +963,7 @@ int TPM2_Native_TestArgs(void* userCtx, int argc, char *argv[])
TPM2_GetRCString(rc));
goto exit;
}
if (cmdOut.seqComp.result.size != TPM_SHA256_DIGEST_SIZE &&
if (cmdOut.seqComp.result.size != TPM_SHA256_DIGEST_SIZE ||
XMEMCMP(cmdOut.seqComp.result.buffer, hashTestDig,
TPM_SHA256_DIGEST_SIZE) != 0) {
printf("Hash SHA256 test failed, result not as expected!\n");