Fix macros to match. Resolves `error: unused variable 'pubKeySz'` and `examples/pcr/quote.c:336:9: error: use of undeclared identifier 'pubKey'`.

pull/379/head
David Garske 2024-09-20 17:15:08 -07:00
parent 388e32912e
commit 034306a49c
1 changed files with 4 additions and 2 deletions

View File

@ -60,7 +60,8 @@ int TPM2_PCR_Quote_Test(void* userCtx, int argc, char *argv[])
const char *outputFile = "quote.blob";
BYTE *data = NULL;
int dataSz;
#ifdef HAVE_ECC
#if defined(HAVE_ECC) && !defined(WOLFTPM2_NO_HEAP) && \
defined(WOLFSSL_PUBLIC_MP)
byte *pubKey = NULL;
word32 pubKeySz;
#endif
@ -331,7 +332,8 @@ exit:
wolfTPM2_Cleanup(&dev);
#ifdef HAVE_ECC
#if defined(HAVE_ECC) && !defined(WOLFTPM2_NO_HEAP) && \
defined(WOLFSSL_PUBLIC_MP)
if (pubKey != NULL) {
XFREE(pubKey, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
}