diff options
author | Chris Engel <cjengel@us.ibm.com> | 2016-06-06 10:48:58 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2016-08-01 13:58:06 -0400 |
commit | a44d7064df1a51935e90b6ff22231ac7aa9e1ae4 (patch) | |
tree | 2b70184f6ce049381cedb4d6046e444e000d3c06 /src/usr/secureboot/trusted/trustedboot.C | |
parent | 2f54d71dbf7318cda9dbf6d72f42d24d2db9e50e (diff) | |
download | talos-hostboot-a44d7064df1a51935e90b6ff22231ac7aa9e1ae4.tar.gz talos-hostboot-a44d7064df1a51935e90b6ff22231ac7aa9e1ae4.zip |
SecureBoot: Update sha1 bank of PCRs along with sha256
Change-Id: I526809abe8fa8d00929f79a4c3e1dcaf7386873a
RTC: 154324
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27032
Reviewed-by: Timothy R. Block <block@us.ibm.com>
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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27634
Reviewed-by: Christopher J. Engel <cjengel@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot/trusted/trustedboot.C')
-rw-r--r-- | src/usr/secureboot/trusted/trustedboot.C | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/usr/secureboot/trusted/trustedboot.C b/src/usr/secureboot/trusted/trustedboot.C index 06924a330..f2776adfd 100644 --- a/src/usr/secureboot/trusted/trustedboot.C +++ b/src/usr/secureboot/trusted/trustedboot.C @@ -411,7 +411,8 @@ void tpmReplayLog(TRUSTEDBOOT::TpmTarget & io_target) err = tpmCmdPcrExtend(&io_target, (TPM_Pcr)l_eventLog.pcrIndex, l_algId, - l_eventLog.digests.digests[i].digest.bytes, + reinterpret_cast<uint8_t*> + (&(l_eventLog.digests.digests[i].digest)), getDigestSize(l_algId)); if (err) { @@ -571,8 +572,12 @@ void pcrExtendSingleTpm(TpmTarget & io_target, !io_target.failed)) { // Fill in TCG_PCR_EVENT2 and add to log - eventLog = TpmLogMgr_genLogEventPcrExtend(i_pcr, i_algId, i_digest, - i_digestSize, i_logMsg); + eventLog = TpmLogMgr_genLogEventPcrExtend(i_pcr, + i_algId, i_digest, + i_digestSize, + TPM_ALG_SHA1, i_digest, + i_digestSize, + i_logMsg); err = TpmLogMgr_addEvent(io_target.logMgr,&eventLog); if (NULL != err) { @@ -587,11 +592,16 @@ void pcrExtendSingleTpm(TpmTarget & io_target, !io_target.failed) { - err = tpmCmdPcrExtend(&io_target, - i_pcr, - i_algId, - i_digest, - i_digestSize); + // Perform the requested extension and also force into the + // SHA1 bank + err = tpmCmdPcrExtend2Hash(&io_target, + i_pcr, + i_algId, + i_digest, + i_digestSize, + TPM_ALG_SHA1, + i_digest, + i_digestSize); } } while ( 0 ); |