]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c
MdeModulePkg/Ip4Dxe: Support SetData interface to clear specific configuration
[mirror_edk2.git] / MdeModulePkg / Universal / SecurityStubDxe / SecurityStub.c
index 22e6c7f4eab4676681a50c1cfb9fbb3f1a127307..a75d8dc223e1490faac98c1f4fb1f3f345aa9a4a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This driver produces Security2 and Security architectural protocol based on SecurityManagementLib.\r
  \r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 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
@@ -20,6 +20,7 @@
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/SecurityManagementLib.h>\r
+#include "Defer3rdPartyImageLoad.h"\r
 \r
 //\r
 // Handle for the Security Architectural Protocol instance produced by this driver\r
@@ -140,6 +141,15 @@ Security2StubAuthenticate (
   IN BOOLEAN                           BootPolicy\r
   )\r
 {\r
+  EFI_STATUS                           Status;\r
+\r
+  if (FileBuffer != NULL) {\r
+    Status = Defer3rdPartyImageLoad (File, BootPolicy);\r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
+  }\r
+\r
   return ExecuteSecurity2Handlers (EFI_AUTH_OPERATION_VERIFY_IMAGE | \r
                                    EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD | \r
                                    EFI_AUTH_OPERATION_MEASURE_IMAGE |\r
@@ -200,5 +210,7 @@ SecurityStubInitialize (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  Defer3rdPartyImageLoadInitialize ();\r
+\r
   return EFI_SUCCESS;\r
 }\r