Skip to content

Commit dbb0f6d

Browse files
committed
Fix TEST_SAMPLE build.
1 parent f1ebd43 commit dbb0f6d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/tpm2_wrap.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7056,7 +7056,7 @@ int wolfTPM2_PolicyAuthorizeMake(TPM_ALG_ID pcrAlg,
70567056
#ifdef WOLFTPM_MFG_IDENTITY
70577057

70587058
#ifdef TEST_SAMPLE
7059-
static const uint8_t* TPM2_IAK_SAMPLE_MASTER_PASSWORD = {
7059+
static const uint8_t TPM2_IAK_SAMPLE_MASTER_PASSWORD[] = {
70607060
0xFE, 0xEF, 0x8C, 0xDF, 0x1B, 0x77, 0xBD, 0x00,
70617061
0x30, 0x58, 0x5E, 0x47, 0xB8, 0x21, 0x46, 0x0B
70627062
};
@@ -7085,17 +7085,18 @@ int wolfTPM2_SetIdentityAuth(WOLFTPM2_DEV* dev, WOLFTPM2_HANDLE* handle,
70857085
rc = wc_HashInit(&hash_ctx, hashType);
70867086
if (rc == 0) {
70877087
rc = wc_HashUpdate(&hash_ctx, hashType, serialNum, sizeof(serialNum));
7088-
if (rc == 0)
7088+
if (rc == 0) {
70897089
#ifdef TEST_SAMPLE
70907090
rc = wc_HashUpdate(&hash_ctx, hashType,
70917091
TPM2_IAK_SAMPLE_MASTER_PASSWORD,
70927092
sizeof(TPM2_IAK_SAMPLE_MASTER_PASSWORD));
70937093
(void)masterPassword;
7094-
(void)masterPasswordSs;
7094+
(void)masterPasswordSz;
70957095
#else
70967096
rc = wc_HashUpdate(&hash_ctx, hashType,
70977097
masterPassword, masterPasswordSz);
70987098
#endif
7099+
}
70997100
if (rc == 0) {
71007101
rc = wc_HashFinal(&hash_ctx, hashType, digest);
71017102
}

0 commit comments

Comments
 (0)