summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Smirnov <ismirno@us.ibm.com>2019-02-22 09:54:57 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-02-26 15:55:47 -0600
commitcab3c5b1f80c36dcb9015d7085ee5b11948d4232 (patch)
tree628ab4484fb8fc4328bcf397e87005b16547ea5a
parent02150d1b6c0d5108630ac4983165aacd54b2000f (diff)
downloadtalos-hostboot-cab3c5b1f80c36dcb9015d7085ee5b11948d4232.tar.gz
talos-hostboot-cab3c5b1f80c36dcb9015d7085ee5b11948d4232.zip
Secureboot: Enhanced Multinode Comm: Add size of quote & signature to slv quote
This commit adds the size of the quote and signature fields returned from the TPM as part of enhanced multinode comm to the generated slave quote. This will make it easier to process the slave quote for remote attestation. Change-Id: Iab0d66bf5c34f49441fec346c6964458c58cff1f RTC: 203645 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72357 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/usr/secureboot/trustedbootif.H2
-rw-r--r--src/usr/secureboot/node_comm/node_comm_exchange.C4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/include/usr/secureboot/trustedbootif.H b/src/include/usr/secureboot/trustedbootif.H
index 8b7fe8104..72849c2eb 100644
--- a/src/include/usr/secureboot/trustedbootif.H
+++ b/src/include/usr/secureboot/trustedbootif.H
@@ -53,7 +53,7 @@ namespace TRUSTEDBOOT
// Structure that contains the TPM quote data and the size thereof
struct _QuoteDataOut
{
- size_t size; // the size (bytes) of the data pointer
+ uint32_t size; // the size (bytes) of the data pointer
uint8_t* data; // the actual quote data
_QuoteDataOut() : size(0), data(nullptr)
{
diff --git a/src/usr/secureboot/node_comm/node_comm_exchange.C b/src/usr/secureboot/node_comm/node_comm_exchange.C
index d10a4546d..46eaabc69 100644
--- a/src/usr/secureboot/node_comm/node_comm_exchange.C
+++ b/src/usr/secureboot/node_comm/node_comm_exchange.C
@@ -520,6 +520,7 @@ errlHndl_t nodeCommGenSlaveQuoteResponse(const MasterQuoteRequestBlob* const i_r
// Figure out the size of the slave quote
o_size = sizeof(l_goodEyeCatch) +
sizeof(l_nodeId) +
+ sizeof(l_quoteData.size) +
l_quoteData.size +
sizeof(l_pcrCount) +
// Only include the read PCRs in the slave quote
@@ -539,6 +540,9 @@ errlHndl_t nodeCommGenSlaveQuoteResponse(const MasterQuoteRequestBlob* const i_r
// Now the node ID
memcpy(o_resp + l_currentOffset, &l_nodeId, sizeof(l_nodeId));
l_currentOffset += sizeof(l_nodeId);
+ // The size of the quote and signature structures
+ memcpy(o_resp + l_currentOffset,&l_quoteData.size,sizeof(l_quoteData.size));
+ l_currentOffset += sizeof(l_quoteData.size);
// The TPM quote & signature information (both are included in the TPM
// quote blob)
memcpy(o_resp + l_currentOffset, l_quoteData.data, l_quoteData.size);
OpenPOWER on IntegriCloud