summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot/trusted
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/secureboot/trusted')
-rw-r--r--src/usr/secureboot/trusted/trustedTypes.H1
-rw-r--r--src/usr/secureboot/trusted/trustedbootCmds.C5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/usr/secureboot/trusted/trustedTypes.H b/src/usr/secureboot/trusted/trustedTypes.H
index fee966520..947669701 100644
--- a/src/usr/secureboot/trusted/trustedTypes.H
+++ b/src/usr/secureboot/trusted/trustedTypes.H
@@ -598,6 +598,7 @@ namespace TRUSTEDBOOT
struct _TPM2_QuoteOut
{
TPM2_BaseOut base;
+ uint32_t authSessionSize;
uint8_t quoteData[MAX_TRANSMIT_SIZE];
} PACKED;
typedef struct _TPM2_QuoteOut TPM2_QuoteOut;
diff --git a/src/usr/secureboot/trusted/trustedbootCmds.C b/src/usr/secureboot/trusted/trustedbootCmds.C
index 12ce871b6..5040cadab 100644
--- a/src/usr/secureboot/trusted/trustedbootCmds.C
+++ b/src/usr/secureboot/trusted/trustedbootCmds.C
@@ -426,6 +426,7 @@ errlHndl_t tpmUnmarshalResponseData(uint32_t i_commandCode,
reinterpret_cast<TPM2_QuoteOut*>(o_outBuf);
TPM2_QuoteOut* l_tpmRespData =
reinterpret_cast<TPM2_QuoteOut*>(i_respBuf);
+ l_respPtr->authSessionSize = l_tpmRespData->authSessionSize;
memcpy(l_respPtr->quoteData,
l_tpmRespData->quoteData,
sizeof(l_tpmRespData->base.responseSize));
@@ -1520,7 +1521,9 @@ errlHndl_t tpmCmdGenerateQuote(TpmTarget* i_target,
// The response size contains the size of the base response structure too,
// so subtract that size from the size of the actual quote data.
- o_data->size = l_read->base.responseSize-sizeof(l_read->base);
+ o_data->size = l_read->base.responseSize -
+ sizeof(l_read->base) -
+ sizeof(l_read->authSessionSize);
memcpy(o_data->data, l_quoteDataPtr, o_data->size);
} while(0);
OpenPOWER on IntegriCloud