Menu

#123 Minor Error in testsuite/tcg/tpm/Tspi_TPM_Quote02.c

Bug
open
Test Cases (9)
5
2009-11-28
2009-11-28
Anonymous
No

In file testsuite/tcg/tpm/Tspi_TPM_Quote02.c line 190 to 198 read:
result = Tspi_TPM_GetRandom(hTPM, 20, &data);
if (result != TSS_SUCCESS) {
print_error("Tspi_TPM_GetRandom ", result);
Tspi_Context_Close(hContext);
Tspi_Context_CloseObject(hContext, hIdentKey);
exit(result);
}

pValidationData.ulDataLength = 20;
pValidationData.rgbExternalData = data;

In my opinion the external data lenght should be set to 20 rather than the data length (which will be set after Tspi_TPM_Quote anyway).
I replaced pValidationData.ulDataLength = 20; with pValidationData.ulExternalDataLength = 20; and everything worked fine.

Dominik Holling

Discussion


Log in to post a comment.