]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Security/Security.c
Update PeiCore to follow PI spec to retrieve GUIDED section data when ExtractionPpi...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Security / Security.c
index f08926766a6019caaf1bfc1c0568133e0b563da3..763126057d910b8d34b1837dd85bede8524d15fa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI PEI Core Security services\r
   \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -100,9 +100,16 @@ VerifyPeim (
   EFI_STATUS                      Status;\r
   BOOLEAN                         DeferExection;\r
 \r
-\r
+  Status = EFI_NOT_FOUND;\r
   if (PrivateData->PrivateSecurityPpi == NULL) {\r
-    Status = EFI_NOT_FOUND;\r
+    //\r
+    // Check AuthenticationStatus first.\r
+    //\r
+    if ((AuthenticationStatus & EFI_AUTH_STATUS_IMAGE_SIGNED) != 0) {\r
+      if ((AuthenticationStatus & (EFI_AUTH_STATUS_TEST_FAILED | EFI_AUTH_STATUS_NOT_TESTED)) != 0) {\r
+        Status = EFI_SECURITY_VIOLATION;\r
+      }\r
+    }\r
   } else {\r
     //\r
     // Check to see if the image is OK\r