Skip to content

Commit 8828915

Browse files
committed
Fix for older TPM's that don't support ECC384/SHA384.
1 parent 5aa95b6 commit 8828915

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unit_tests.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ static void test_wolfTPM2_EccSignVerifyDig(WOLFTPM2_DEV* dev,
429429
AssertIntEQ(rc, 0);
430430
rc = wolfTPM2_CreateAndLoadKey(dev, &eccKey, &storageKey->handle,
431431
&publicTemplate, (byte*)gKeyAuth, sizeof(gKeyAuth)-1);
432+
if ((rc & TPM_RC_HASH) == TPM_RC_HASH) {
433+
printf("Hash type not supported... Skipping\n");
434+
return;
435+
}
432436
AssertIntEQ(rc, 0);
433437

434438
/* Sign with TPM */

0 commit comments

Comments
 (0)