/** @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
@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