]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/SecurityManagementLib.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Library / SecurityManagementLib.h
index de87d09c54c737f2a6f0a9e83a9719c3088aff7e..c6ef8c38b9b797cfca44ed20c631604d2d6a000e 100644 (file)
@@ -1,16 +1,10 @@
 /** @file\r
-  This library class defines a set of interfaces to abstract the policy of \r
+  This library class defines a set of interfaces to abstract the policy of\r
   security measurement by managing the different security measurement services.\r
   The library instances can be implemented according to the different security policy.\r
 \r
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -36,33 +30,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_AUTH_OPERATION_IMAGE_REQUIRED      0x80000000\r
 \r
 /**\r
-  The security handler is used to abstract platform-specific policy \r
-  from the DXE core response to an attempt to use a file that returns a \r
-  given status for the authentication check from the section extraction protocol.  \r
+  The security handler is used to abstract platform-specific policy\r
+  from the DXE core response to an attempt to use a file that returns a\r
+  given status for the authentication check from the section extraction protocol.\r
 \r
-  The possible responses in a given SAP implementation may include locking \r
-  flash upon failure to authenticate, attestation logging for all signed drivers, \r
-  and other exception operations.  The File parameter allows for possible logging \r
+  The possible responses in a given SAP implementation may include locking\r
+  flash upon failure to authenticate, attestation logging for all signed drivers,\r
+  and other exception operations.  The File parameter allows for possible logging\r
   within the SAP of the driver.\r
-  \r
+\r
   If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
+  If the file specified by File with an authentication status specified by\r
   AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use under any circumstances,\r
   then EFI_ACCESS_DENIED is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use at the time, but it \r
-  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use at the time, but it\r
+  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is\r
   returned.\r
 \r
-  FileBuffer will be NULL and FileSize will be 0 if the handler being called \r
+  FileBuffer will be NULL and FileSize will be 0 if the handler being called\r
   did not set EFI_AUTH_OPERATION_IMAGE_REQUIRED when it was registered.\r
 \r
-  @param[in]    AuthenticationStatus \r
+  @param[in]    AuthenticationStatus\r
                            The authentication status returned from the security\r
                            measurement services for the input file.\r
   @param[in]    File       The pointer to the device path of the file that is\r
@@ -83,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                                  used for any purpose.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *SECURITY_FILE_AUTHENTICATION_STATE_HANDLER)(\r
   IN  OUT   UINT32                     AuthenticationStatus,\r
@@ -117,12 +111,12 @@ RegisterSecurityHandler (
   Execute registered handlers until one returns an error and that error is returned.\r
   If none of the handlers return an error, then EFI_SUCCESS is returned.\r
 \r
-  Before exectue handler, get the image buffer by file device path if a handler \r
+  Before exectue handler, get the image buffer by file device path if a handler\r
   requires the image file. And return the image buffer to each handler when exectue handler.\r
 \r
   The handlers are executed in same order to their registered order.\r
 \r
-  @param[in]  AuthenticationStatus \r
+  @param[in]  AuthenticationStatus\r
                            This is the authentication type returned from the Section\r
                            Extraction protocol. See the Section Extraction Protocol\r
                            Specification for details on this type.\r
@@ -130,9 +124,9 @@ RegisterSecurityHandler (
                            being dispatched. This will optionally be used for logging.\r
 \r
   @retval EFI_SUCCESS            The file specified by File authenticated when more\r
-                                 than one security handler services were registered, \r
-                                 or the file did not authenticate when no security \r
-                                 handler service was registered. And the platform policy \r
+                                 than one security handler services were registered,\r
+                                 or the file did not authenticate when no security\r
+                                 handler service was registered. And the platform policy\r
                                  dictates that the DXE Core may use File.\r
   @retval EFI_INVALID_PARAMETER  File is NULL.\r
   @retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and\r
@@ -152,13 +146,13 @@ ExecuteSecurityHandlers (
   );\r
 \r
 /**\r
-  The security handler is used to abstracts security-specific functions from the DXE \r
-  Foundation of UEFI Image Verification, Trusted Computing Group (TCG) measured boot, \r
-  User Identity policy for image loading and consoles, and for purposes of \r
-  handling GUIDed section encapsulations. \r
-  \r
-  @param[in]    AuthenticationStatus \r
-                           The authentication status for the input file. \r
+  The security handler is used to abstracts security-specific functions from the DXE\r
+  Foundation of UEFI Image Verification, Trusted Computing Group (TCG) measured boot,\r
+  User Identity policy for image loading and consoles, and for purposes of\r
+  handling GUIDed section encapsulations.\r
+\r
+  @param[in]    AuthenticationStatus\r
+                           The authentication status for the input file.\r
   @param[in]    File       The pointer to the device path of the file that is\r
                            being dispatched. This will optionally be used for logging.\r
   @param[in]    FileBuffer A pointer to the buffer with the UEFI file image\r
@@ -188,7 +182,7 @@ ExecuteSecurityHandlers (
                                   drivers from the device path specified by DevicePath. The\r
                                   image has been added into the list of the deferred images.\r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *SECURITY2_FILE_AUTHENTICATION_HANDLER) (\r
   IN  UINT32                           AuthenticationStatus,\r
@@ -221,16 +215,16 @@ RegisterSecurity2Handler (
   );\r
 \r
 /**\r
-  Execute registered handlers based on input AuthenticationOperation until \r
-  one returns an error and that error is returned. \r
-  \r
+  Execute registered handlers based on input AuthenticationOperation until\r
+  one returns an error and that error is returned.\r
+\r
   If none of the handlers return an error, then EFI_SUCCESS is returned.\r
   The handlers those satisfy AuthenticationOperation will only be executed.\r
   The handlers are executed in same order to their registered order.\r
 \r
-  @param[in]  AuthenticationOperation   \r
+  @param[in]  AuthenticationOperation\r
                            The operation type specifies which handlers will be executed.\r
-  @param[in]  AuthenticationStatus \r
+  @param[in]  AuthenticationStatus\r
                            The authentication status for the input file.\r
   @param[in]  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
@@ -260,7 +254,7 @@ RegisterSecurity2Handler (
   @retval EFI_SECURITY_VIOLATION  FileBuffer is not NULL and the user has no permission to load\r
                                   drivers from the device path specified by DevicePath. The\r
                                   image has been added into the list of the deferred images.\r
-  @retval EFI_INVALID_PARAMETER   File and FileBuffer are both NULL. \r
+  @retval EFI_INVALID_PARAMETER   File and FileBuffer are both NULL.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r