]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDxe/DetectTestKey.c
ArmPlatformPkg/NorFlashDxe: prepare for devicepath format change
[mirror_edk2.git] / FmpDevicePkg / FmpDxe / DetectTestKey.c
index 0a6e37ededae7360268ffd60264987cb5667ad46..f9b983bb75ef905e3c7978ce2d4be4daec5192b0 100644 (file)
@@ -1,4 +1,4 @@
-/**  @file\r
+/** @file\r
   Detects if PcdFmpDevicePkcs7CertBufferXdr contains a test key.\r
 \r
   Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
@@ -53,12 +53,14 @@ DetectTestKey (
   UINT8    *PublicKeyDataXdrEnd;\r
   VOID     *HashContext;\r
   UINT8    Digest[SHA256_DIGEST_SIZE];\r
+  UINTN    TestKeyDigestSize;\r
 \r
   //\r
   // If PcdFmpDeviceTestKeySha256Digest is not exacty SHA256_DIGEST_SIZE bytes,\r
   // then skip the test key detection.\r
   //\r
-  if (PcdGetSize (PcdFmpDeviceTestKeySha256Digest) != SHA256_DIGEST_SIZE) {\r
+  TestKeyDigestSize = PcdGetSize (PcdFmpDeviceTestKeySha256Digest);\r
+  if (TestKeyDigestSize != SHA256_DIGEST_SIZE) {\r
     return;\r
   }\r
 \r