]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
SecurityPkg TPM2: Make IsHashAlgSupportedInHashAlgorithmMask external
[mirror_edk2.git] / SecurityPkg / Library / HashLibBaseCryptoRouter / HashLibBaseCryptoRouterPei.c
index 98c07933d827d27ada6757be272f6e1c870b0059..a4fc0c6595d8afeeb8cb60abac1141c70bd10b5a 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-  Ihis library is BaseCrypto router. It will redirect hash request to each individual\r
+  This library is BaseCrypto router. It will redirect hash request to each individual\r
   hash handler registerd, such as SHA1, SHA256.\r
   Platform can use PcdTpm2HashMask to mask some hash engines.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -258,6 +258,7 @@ RegisterHashInterfaceLib (
   HASH_INTERFACE_HOB LocalHashInterfaceHob;\r
   UINT32             HashMask;\r
   UINT32             BiosSupportedHashMask;\r
+  EFI_STATUS         Status;\r
 \r
   //\r
   // Check allow\r
@@ -280,7 +281,8 @@ RegisterHashInterfaceLib (
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   BiosSupportedHashMask = PcdGet32 (PcdTcg2HashAlgorithmBitmap);\r
-  PcdSet32 (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask);\r
+  Status = PcdSet32S (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask);\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Check duplication\r