From a45f922c6dece3b5d39312cde8738053fa32f665 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 30 May 2025 18:09:14 -0700 Subject: [PATCH] Fix for older TPM's that don't support ECC384/SHA384. --- tests/unit_tests.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit_tests.c b/tests/unit_tests.c index 5720085..70dfb06 100644 --- a/tests/unit_tests.c +++ b/tests/unit_tests.c @@ -429,6 +429,10 @@ static void test_wolfTPM2_EccSignVerifyDig(WOLFTPM2_DEV* dev, AssertIntEQ(rc, 0); rc = wolfTPM2_CreateAndLoadKey(dev, &eccKey, &storageKey->handle, &publicTemplate, (byte*)gKeyAuth, sizeof(gKeyAuth)-1); + if ((rc & TPM_RC_HASH) == TPM_RC_HASH) { + printf("Hash type not supported... Skipping\n"); + return; + } AssertIntEQ(rc, 0); /* Sign with TPM */