From d1cd4eff5221a3cc9a3e98f0e11bfc9b5a60e960 Mon Sep 17 00:00:00 2001 From: John Bland Date: Wed, 3 May 2023 19:29:45 -0400 Subject: [PATCH] use correct session index for wrap test so parameter encryption works --- examples/wrap/wrap_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wrap/wrap_test.c b/examples/wrap/wrap_test.c index da311d4..aaa6de1 100644 --- a/examples/wrap/wrap_test.c +++ b/examples/wrap/wrap_test.c @@ -259,7 +259,7 @@ int TPM2_Wrapper_TestArgs(void* userCtx, int argc, char *argv[]) (word32)tpmSession.handle.hndl); /* set session for authorization of the storage key */ - rc = wolfTPM2_SetAuthSession(&dev, 1, &tpmSession, + rc = wolfTPM2_SetAuthSession(&dev, 0, &tpmSession, (TPMA_SESSION_decrypt | TPMA_SESSION_encrypt | TPMA_SESSION_continueSession)); if (rc != 0) goto exit; }