]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Use PcdGetSize to get the size of VOID* PCD value.
authorLiming Gao <liming.gao@intel.com>
Tue, 25 Aug 2015 01:55:52 +0000 (01:55 +0000)
committerlgao4 <lgao4@Edk2>
Tue, 25 Aug 2015 01:55:52 +0000 (01:55 +0000)
PcdLib introduces generic API to get the size of VOID* PCD value.
Update Pei and Dxe RsaGuidedLib to use generic PCD API instead of GetEx API.
This change can remove PCD type limitation in these two libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18277 6f19259b-4bc3-4df7-8a09-765794883524

SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c
SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf
SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c
SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.inf

index 2b610141c4b2403873ec98ecb935dd4fdc3a9de8..1f7a29904f3af1b7a1efffc4131a72976f7e8e67 100644 (file)
@@ -4,7 +4,7 @@
   to parse RSA 2048 SHA 256 encapsulation section and extract raw data.\r
   It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2015, 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
@@ -272,7 +272,7 @@ Rsa2048Sha256GuidedSectionHandler (
   DEBUG ((DEBUG_VERBOSE, "DxePcdRsa2048Sha256: PublicKeyBuffer = %p\n", PublicKey));\r
   ASSERT (PublicKey != NULL);\r
   DEBUG ((DEBUG_VERBOSE, "DxePcdRsa2048Sha256: PublicKeyBuffer Token = %08x\n", PcdToken (PcdRsa2048Sha256PublicKeyBuffer)));\r
-  PublicKeyBufferSize = LibPcdGetExSize (&gEfiSecurityPkgTokenSpaceGuid, PcdToken (PcdRsa2048Sha256PublicKeyBuffer));\r
+  PublicKeyBufferSize = PcdGetSize (PcdRsa2048Sha256PublicKeyBuffer);\r
   DEBUG ((DEBUG_VERBOSE, "DxePcdRsa2048Sha256: PublicKeyBuffer Size = %08x\n", PublicKeyBufferSize));\r
   ASSERT ((PublicKeyBufferSize % SHA256_DIGEST_SIZE) == 0);\r
   CryptoStatus = FALSE;\r
index f1777f4842d1dddca3c71a6f967dc746a6ff5097..4681f08643f8ae24c1701266077b8989451bcc3f 100644 (file)
@@ -50,9 +50,9 @@
   PcdLib\r
   PerformanceLib\r
 \r
-[PcdEx]  \r
+[Pcd]  \r
   gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer    ## SOMETIMES_CONSUMES\r
-  \r
+\r
 [Protocols]\r
   gEfiSecurityPolicyProtocolGuid                   ## SOMETIMES_CONSUMES (Set platform override AUTH status if exist)\r
   \r
index 8c0047edf860cd2221971349558ccbff178300de..e2a0fb6708845eda93736172f2d24ee7f8aee171 100644 (file)
@@ -4,7 +4,7 @@
   to parse RSA 2048 SHA 256 encapsulation section and extract raw data.\r
   It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2015, 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
@@ -256,7 +256,7 @@ Rsa2048Sha256GuidedSectionHandler (
   DEBUG ((DEBUG_VERBOSE, "PeiPcdRsa2048Sha256: PublicKeyBuffer = %p\n", PublicKey));\r
   ASSERT (PublicKey != NULL);\r
   DEBUG ((DEBUG_VERBOSE, "PeiPcdRsa2048Sha256: PublicKeyBuffer Token = %08x\n", PcdToken (PcdRsa2048Sha256PublicKeyBuffer)));\r
-  PublicKeyBufferSize = LibPcdGetExSize (&gEfiSecurityPkgTokenSpaceGuid, PcdToken (PcdRsa2048Sha256PublicKeyBuffer));\r
+  PublicKeyBufferSize = PcdGetSize (PcdRsa2048Sha256PublicKeyBuffer);\r
   DEBUG ((DEBUG_VERBOSE, "PeiPcdRsa2048Sha256: PublicKeyBuffer Size = %08x\n", PublicKeyBufferSize));\r
   ASSERT ((PublicKeyBufferSize % SHA256_DIGEST_SIZE) == 0);\r
   CryptoStatus = FALSE;\r
index 505b8cc6e15b8c02bdb2d4b96031ffd5c06cfdef..3b781c71c7283d5bedc0ee6ab1712316c37e5bfc 100644 (file)
@@ -49,7 +49,7 @@
   PcdLib\r
   PerformanceLib\r
 \r
-[PcdEx]  \r
+[Pcd]  \r
   gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer      ## SOMETIMES_CONSUMES\r
   \r
 [Guids]\r