summaryrefslogtreecommitdiffstats
path: root/src/include/usr/secureboot
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2017-06-06 10:47:33 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-11 12:10:13 -0400
commitb7400ba903b8cbf288126872599474833b452319 (patch)
treefcd7a57c27c4cac082b8ada055afb4c63635afd8 /src/include/usr/secureboot
parentc79f8d9cf862147f53b3976e7947683111ed202c (diff)
downloadblackbird-hostboot-b7400ba903b8cbf288126872599474833b452319.tar.gz
blackbird-hostboot-b7400ba903b8cbf288126872599474833b452319.zip
Verify the correct HW Key Hash is used in Customized SBE Image
This commit keeps track of what HW Key Hash is added to HBBL before customizing the SBE Image and then checks that this HW Key Hash is found in the customized SBE Image. It did this by updating getHwKeyHashFromSbeImage() to possibly read the HW Key Hash from system memory along with its default behavior of reading it from a SBE Seeprom. Change-Id: I0139fb959102de74b12874f30e7d2ec0bf918e3f RTC:175330 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41453 Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/secureboot')
-rw-r--r--src/include/usr/secureboot/service.H9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/usr/secureboot/service.H b/src/include/usr/secureboot/service.H
index 94fa09ec5..f72809e8b 100644
--- a/src/include/usr/secureboot/service.H
+++ b/src/include/usr/secureboot/service.H
@@ -40,7 +40,14 @@ typedef uint8_t SHA512_t[SHA512_DIGEST_LENGTH];
*/
inline uint32_t sha512_to_u32(SHA512_t i_hash)
{
- return *(reinterpret_cast<uint32_t*>(reinterpret_cast<char*>(i_hash)));
+ if (i_hash == nullptr)
+ {
+ return 0;
+ }
+ else
+ {
+ return *(reinterpret_cast<uint32_t*>(reinterpret_cast<char*>(i_hash)));
+ }
};
typedef std::vector< std::pair<void*,size_t> > blobPair_t;
OpenPOWER on IntegriCloud