]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / SecurityStubDxe / SecurityStub.c
index f60c98ca433a00ba6bfaf556c19ed6f8f1853062..8e81d87f95981f2fb633907948f354601d64baf9 100644 (file)
@@ -1,9 +1,8 @@
 /** @file\r
-  This driver implements one sample platform security service, which does \r
-  nothing and always return EFI_SUCCESS.\r
-  \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                              \r
-  All rights reserved. This program and the accompanying materials                          \r
+  This driver produces security architectural protocol based on SecurityManagementLib.\r
\r
+  Copyright (c) 2006 - 2009, 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
   http://opensource.org/licenses/bsd-license.php                                            \r
 **/\r
 \r
 \r
-#include "SecurityStub.h"\r
+#include <Uefi.h>\r
+#include <Protocol/Security.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/SecurityManagementLib.h>\r
 \r
 //\r
 // Handle for the Security Architectural Protocol instance produced by this driver\r
 //\r
 EFI_HANDLE                  mSecurityArchProtocolHandle = NULL;\r
 \r
-//\r
-// Security Architectural Protocol instance produced by this driver\r
-//\r
-EFI_SECURITY_ARCH_PROTOCOL  mSecurityStub = { \r
-  SecurityStubAuthenticateState \r
-};\r
-\r
-\r
 /**\r
   The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific \r
   policy from the DXE core response to an attempt to use a file that returns a \r
@@ -61,32 +57,32 @@ EFI_SECURITY_ARCH_PROTOCOL  mSecurityStub = {
   @param  File             This is a pointer to the device path of the file that is\r
                            being dispatched. This will optionally be used for logging.\r
 \r
-  @retval EFI_SUCCESS            Do nothing and return.\r
+  @retval EFI_SUCCESS            Do nothing and return success.\r
   @retval EFI_INVALID_PARAMETER  File is NULL.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 SecurityStubAuthenticateState (\r
-  IN EFI_SECURITY_ARCH_PROTOCOL  *This,\r
-  IN UINT32                      AuthenticationStatus,\r
-  IN EFI_DEVICE_PATH_PROTOCOL    *File\r
+  IN CONST EFI_SECURITY_ARCH_PROTOCOL  *This,\r
+  IN UINT32                            AuthenticationStatus,\r
+  IN CONST EFI_DEVICE_PATH_PROTOCOL    *File\r
   )\r
 {\r
-  if (File == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
+  return ExecuteSecurityHandlers (AuthenticationStatus, File);\r
 }\r
 \r
+//\r
+// Security Architectural Protocol instance produced by this driver\r
+//\r
+EFI_SECURITY_ARCH_PROTOCOL  mSecurityStub = { \r
+  SecurityStubAuthenticateState \r
+};\r
 \r
 /**\r
-  The user Entry Point installs SAP. The user code starts with this function\r
-  as the real entry point for the image goes into a library that calls this \r
-  function.\r
+  Installs Security Architectural Protocol.\r
 \r
-  @param ImageHandle    The firmware allocated handle for the EFI image.  \r
-  @param SystemTable    A pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of this driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
   \r
   @retval EFI_SUCCESS   Install the sample Security Architectural Protocol successfully.\r
 \r