audk/SecurityPkg
Star Zeng 9fe9cf9acb SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=244

Currently, when software HashLib (HashLibBaseCryptoRouter) and related
HashInstanceLib instances are used, PcdTcg2HashAlgorithmBitmap is
expected to be configured to 0 in platform dsc.
But PcdTcg2HashAlgorithmBitmap has default value 0xFFFFFFFF in
SecurityPkg.dec, and some platforms forget to configure it to 0 or
still configure it to 0xFFFFFFFF in platform dsc, that will make final
PcdTcg2HashAlgorithmBitmap value incorrect.

This patch is to add CONSTRUCTOR in HashLib (HashLibBaseCryptoRouter)
and PcdTcg2HashAlgorithmBitmap will be set to 0 in the CONSTRUCTOR.

Current HASH_LIB_PEI_ROUTER_GUID HOB created in
HashLibBaseCryptoRouterPei is shared between modules that link
HashLibBaseCryptoRouterPei.
To avoid mutual interference, separated HASH_LIB_PEI_ROUTER_GUID HOBs
with gEfiCallerIdGuid Identifier will be created for those modules.

This patch is also to add check in HashLib (HashLibBaseCryptoRouter)
for the mismatch of supported HashMask between modules that may link
different HashInstanceLib instances, warning will be reported if
mismatch is found.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2017-02-08 18:52:07 +08:00
..
Application/RngTest SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00
Hash2DxeCrypto SecurityPkg: Fix typos in comments 2016-11-15 15:45:31 +08:00
Include SecurityPkg: Tcg2Dxe: Log Startup Locality Event 2017-01-24 10:22:25 +08:00
Library SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
Pkcs7Verify/Pkcs7VerifyDxe SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00
RandomNumberGenerator/RngDxe SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00
Tcg SecurityPkg: Tcg2Dxe: Log EV_NO_ACTION event in TCG_PCR_EVENT2 format 2017-02-06 09:28:20 +08:00
UserIdentification SecurityPkg: Fix typos in comments 2016-11-15 16:21:33 +08:00
VariableAuthenticated SecurityPkg SecureBootConfigDxe: Add check for the external PE/COFF image. 2016-07-14 15:04:53 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
SecurityPkg.dec SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
SecurityPkg.dsc SecurityPkg: Tcg2Config: TPM2 ACPI Table Rev Option 2017-01-10 14:18:42 +08:00
SecurityPkg.uni SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap 2017-02-08 18:52:07 +08:00
SecurityPkgExtra.uni SecurityPkg: Convert all .uni files to utf-8 2015-12-15 04:58:32 +00:00