diff --git a/.gitignore b/.gitignore index 8e0ac6f..2cf0713 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,9 @@ examples/csr/csr examples/tls/tls_client examples/pkcs7/pkcs7 examples/timestamp/signed_timestamp -examples/timestamp/pcr +examples/pcr/quote +examples/pcr/extend +examples/pcr/reset pkcs7tpmsigned.p7s pkcs7tpmsignedex.p7s examples/tls/tls_server diff --git a/examples/README.md b/examples/README.md index f72cd10..827f1a6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -37,6 +37,8 @@ Demonstrates the generation of TPM2.0 Quote used for attestation of the system s More information about how to test and use PCR attestation can be found in the in README file located in the `pcr` folder of the example. `./examples/pcr/quote` +`./examples/pcr/extend` +`./examples/pcr/reset` ## CSR diff --git a/examples/pcr/extend.c b/examples/pcr/extend.c index fe4112c..d2624eb 100644 --- a/examples/pcr/extend.c +++ b/examples/pcr/extend.c @@ -58,10 +58,10 @@ int TPM2_Extend_Test(void* userCtx, int argc, char *argv[]) /* Arbitrary user data provided through a file */ const char *filename = NULL; FILE *dataFile = NULL; - unsigned char hash[TPM_SHA256_DIGEST_SIZE]; + BYTE hash[TPM_SHA256_DIGEST_SIZE]; #ifndef WOLFTPM2_NO_WOLFCRYPT /* Using wolfcrypt to hash input data */ - unsigned char dataBuffer[1024]; + BYTE dataBuffer[1024]; Sha256 sha256; #endif diff --git a/examples/pcr/quote.c b/examples/pcr/quote.c index de76cf0..b83a7e0 100644 --- a/examples/pcr/quote.c +++ b/examples/pcr/quote.c @@ -52,7 +52,7 @@ int TPM2_Quote_Test(void* userCtx, int argc, char *argv[]) { int pcrIndex, rc = -1; const char *filename = NULL; - UINT8 *data = NULL; + BYTE *data = NULL; FILE *quoteBlob = NULL; WOLFTPM2_DEV dev; TPMS_ATTEST attestedData;