Skip to content

Commit 4adbbc5

Browse files
committed
Improve the printing of the capabilities vendor firmware number. Spelling fixes.
1 parent 05d5a0b commit 4adbbc5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/wrap/wrap_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ int TPM2_Wrapper_TestArgs(void* userCtx, int argc, char *argv[])
184184
rc = wolfTPM2_GetCapabilities(&dev, &caps);
185185
if (rc != 0) goto exit;
186186

187-
printf("Mfg %s (%d), Vendor %s, Fw %u.%u (%u), "
187+
printf("Mfg %s (%d), Vendor %s, Fw %u.%u (0x%x), "
188188
"FIPS 140-2 %d, CC-EAL4 %d\n",
189189
caps.mfgStr, caps.mfg, caps.vendorStr, caps.fwVerMajor,
190190
caps.fwVerMinor, caps.fwVerVendor, caps.fips140_2, caps.cc_eal4);

src/tpm2_wrap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static int wolfTPM2_ParseCapabilities(WOLFTPM2_CAPS* caps,
306306
caps->fwVerMinor = val & 0xFFFF;
307307
break;
308308
case TPM_PT_FIRMWARE_VERSION_2:
309-
if (caps->mfg == TPM_MFG_INFINEON || caps->mfg == TPM_MFG_NUVOTON) {
309+
if (caps->mfg == TPM_MFG_INFINEON) {
310310
caps->fwVerVendor = val >> 8;
311311
caps->cc_eal4 = (val & 0x00000002) ? 0 : 1;
312312
}
@@ -3190,7 +3190,7 @@ int wolfTPM2_GetRandom(WOLFTPM2_DEV* dev, byte* buf, word32 len)
31903190
return BAD_FUNC_ARG;
31913191

31923192
while (pos < len) {
3193-
/* caclulate size to get */
3193+
/* calculate size to get */
31943194
sz = len - pos;
31953195
if (sz > MAX_RNG_REQ_SIZE)
31963196
sz = MAX_RNG_REQ_SIZE;

0 commit comments

Comments
 (0)