Skip to content

Commit 805b16e

Browse files
committed
remove TPM secret debug logging
F/1103
1 parent 8041e83 commit 805b16e

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

src/update_flash.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,6 @@ int wolfBoot_unlock_disk(void)
12411241
ret = wolfBoot_get_random(secret, secretSz);
12421242
if (ret == 0) {
12431243
wolfBoot_printf("Creating new secret (%d bytes)\n", secretSz);
1244-
wolfBoot_print_hexstr(secret, secretSz, 0);
12451244

12461245
/* seal new secret */
12471246
ret = wolfBoot_seal(pubkey_hint, policy, policySz, nvIndex,
@@ -1265,15 +1264,13 @@ int wolfBoot_unlock_disk(void)
12651264
}
12661265

12671266
wolfBoot_printf("Secret Check %d bytes\n", secretCheckSz);
1268-
wolfBoot_print_hexstr(secretCheck, secretCheckSz, 0);
12691267
TPM2_ForceZero(secretCheck, sizeof(secretCheck));
12701268
}
12711269
}
12721270
}
12731271

12741272
if (ret == 0) {
12751273
wolfBoot_printf("Secret %d bytes\n", secretSz);
1276-
wolfBoot_print_hexstr(secret, secretSz, 0);
12771274

12781275
/* TODO: Unlock disk */
12791276

src/x86/ahci.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ static int sata_create_and_seal_unlock_secret(const uint8_t *pubkey_hint,
281281
ret = sata_get_random_base64(secret, secret_size);
282282
if (ret == 0) {
283283
wolfBoot_printf("Creating new secret (%d bytes)\r\n", *secret_size);
284-
wolfBoot_printf("%s\r\n", secret);
285284

286285
/* seal new secret */
287286
ret = wolfBoot_seal(pubkey_hint, policy, policy_size,
@@ -305,14 +304,11 @@ static int sata_create_and_seal_unlock_secret(const uint8_t *pubkey_hint,
305304
}
306305

307306
wolfBoot_printf("Secret Check %d bytes\n", secret_check_sz);
308-
wolfBoot_printf("%s\r\n", secret_check);
309307
TPM2_ForceZero(secret_check, sizeof(secret_check));
310308
}
311309

312-
if (ret == 0) {
310+
if (ret == 0)
313311
wolfBoot_printf("Secret %d bytes\n", *secret_size);
314-
wolfBoot_printf("%s\r\n", secret);
315-
}
316312

317313
return ret;
318314
}
@@ -414,9 +410,6 @@ int sata_unlock_disk(int drv, int freeze)
414410
r = sata_get_unlock_secret(secret, &secret_size);
415411
if (r != 0)
416412
return r;
417-
#ifdef TARGET_x86_fsp_qemu
418-
wolfBoot_printf("DISK LOCK SECRET: %s\r\n", secret);
419-
#endif
420413
ata_st = ata_security_get_state(drv);
421414
wolfBoot_printf("ATA: Security state SEC%d\r\n", ata_st);
422415
#if defined(TARGET_x86_fsp_qemu)

0 commit comments

Comments
 (0)