]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Eap.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / Eap.h
index f6dde627be008476cf8770d1d677b382b6489b66..203d0f40b0dd9e3b6d0a0aa739fab0f034e65cd3 100644 (file)
@@ -1,20 +1,14 @@
 /** @file\r
   EFI EAP(Extended Authenticaton Protocol) Protocol Definition\r
   The EFI EAP Protocol is used to abstract the ability to configure and extend the\r
-  EAP framework. \r
-  The definitions in this file are defined in UEFI Specification 2.3, which have\r
+  EAP framework.\r
+  The definitions in this file are defined in UEFI Specification 2.3.1B, which have\r
   not been verified by one implementation yet.\r
 \r
-  Copyright (c) 2009 - 2010, 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
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\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
-\r
-  @par Revision Reference:          \r
+  @par Revision Reference:\r
   This Protocol is introduced in UEFI Specification 2.2\r
 \r
 **/\r
 typedef struct _EFI_EAP_PROTOCOL EFI_EAP_PROTOCOL;\r
 \r
 ///\r
-/// Type for the identification number assigned to the Port by the  \r
+/// Type for the identification number assigned to the Port by the\r
 /// System in which the Port resides.\r
 ///\r
 typedef VOID *  EFI_PORT_HANDLE;\r
 \r
 ///\r
-/// EAP Authentication Method Type (RFC 2284 Section 3)\r
+/// EAP Authentication Method Type (RFC 3748)\r
 ///@{\r
-#define EFI_EAP_TYPE_MD5                0x4   ///< REQUIRED\r
-#define EFI_EAP_TYPE_OTP                0x5   ///< OPTIONAL\r
-#define EFI_EAP_TYPE_TOKEN_CARD         0x6   ///< OPTIONAL\r
+#define EFI_EAP_TYPE_TLS 13 ///< REQUIRED - RFC 5216\r
 ///@}\r
 \r
+//\r
+// EAP_TYPE MD5, OTP and TOEKN_CARD has been removed from UEFI2.3.1B.\r
+// Definitions are kept for backward compatibility.\r
+//\r
+#define EFI_EAP_TYPE_MD5                4\r
+#define EFI_EAP_TYPE_OTP                5\r
+#define EFI_EAP_TYPE_TOKEN_CARD         6\r
 \r
 /**\r
   One user provided EAP authentication method.\r
@@ -56,7 +55,7 @@ typedef VOID *  EFI_PORT_HANDLE;
   @param[in]      RequestSize    Packet size in bytes for the most recently received\r
                                  EAP-Request packet.\r
   @param[in]      Buffer         Pointer to the buffer to hold the built packet.\r
-  @param[in, out] BufferSize     Pointer to the buffer size in bytes. \r
+  @param[in, out] BufferSize     Pointer to the buffer size in bytes.\r
                                  On input, it is the buffer size provided by the caller.\r
                                  On output, it is the buffer size in fact needed to contain\r
                                  the packet.\r
@@ -69,60 +68,63 @@ typedef
 EFI_STATUS\r
 (EFIAPI *EFI_EAP_BUILD_RESPONSE_PACKET)(\r
   IN EFI_PORT_HANDLE        PortNumber,\r
-  IN UINT8                  *RequestBuffer, \r
-  IN UINTN                  RequestSize, \r
-  IN UINT8                  *Buffer, \r
+  IN UINT8                  *RequestBuffer,\r
+  IN UINTN                  RequestSize,\r
+  IN UINT8                  *Buffer,\r
   IN OUT UINTN              *BufferSize\r
   );\r
 \r
 /**\r
   Set the desired EAP authentication method for the Port.\r
 \r
-  The SetDesiredAuthMethod() function sets the desired EAP authentication method indicated \r
+  The SetDesiredAuthMethod() function sets the desired EAP authentication method indicated\r
   by EapAuthType for the Port.\r
-  \r
-  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r
+\r
+  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is\r
   returned.\r
-  If the EAP authentication method of EapAuthType is unsupported by the Ports, then this\r
-  function will return EFI_UNSUPPORTED.\r
+  If the EAP authentication method of EapAuthType is unsupported by the Ports, then it will\r
+  return EFI_UNSUPPORTED.\r
+  The cryptographic strength of EFI_EAP_TYPE_TLS shall be at least of hash strength\r
+  SHA-256 and RSA key length of at least 2048 bits.\r
 \r
-  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates \r
+  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates\r
                                  the calling context.\r
-  @param[in] EapAuthType         The type of the EAP authentication method to register. It should \r
+  @param[in] EapAuthType         The type of the EAP authentication method to register. It should\r
                                  be the type value defined by RFC. See RFC 2284 for details.\r
   @param[in] Handler             The handler of the EAP authentication method to register.\r
 \r
-  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is \r
+  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is\r
                                  registered successfully.\r
   @retval EFI_INVALID_PARAMETER  EapAuthType is an invalid EAP authentication type.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to perform the registration.\r
+  @retval EFI_UNSUPPORTED        The EAP authentication method of EapAuthType is\r
+                                 unsupported by the Port.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD)(\r
-  IN EFI_EAP_PROTOCOL            *This, \r
+  IN EFI_EAP_PROTOCOL            *This,\r
   IN UINT8                       EapAuthType\r
   );\r
 \r
 /**\r
-  Register an EAP authentication method. \r
+  Register an EAP authentication method.\r
+\r
+  The RegisterAuthMethod() function registers the user provided EAP authentication method,\r
+  the type of which is EapAuthType and the handler of which is Handler.\r
 \r
-  The RegisterAuthMethod() function registers the user provided EAP authentication method, \r
-  the type of which is EapAuthType and the handler of which is Handler. \r
-  \r
-  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r
+  If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is\r
   returned.\r
-  If there is not enough system memory to perform the registration, then \r
+  If there is not enough system memory to perform the registration, then\r
   EFI_OUT_OF_RESOURCES is returned.\r
 \r
-  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates \r
+  @param[in] This                A pointer to the EFI_EAP_PROTOCOL instance that indicates\r
                                  the calling context.\r
-  @param[in] EapAuthType         The type of the EAP authentication method to register. It should \r
+  @param[in] EapAuthType         The type of the EAP authentication method to register. It should\r
                                  be the type value defined by RFC. See RFC 2284 for details.\r
   @param[in] Handler             The handler of the EAP authentication method to register.\r
 \r
-  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is \r
+  @retval EFI_SUCCESS            The EAP authentication method of EapAuthType is\r
                                  registered successfully.\r
   @retval EFI_INVALID_PARAMETER  EapAuthType is an invalid EAP authentication type.\r
   @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to perform the registration.\r
@@ -131,17 +133,17 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_EAP_REGISTER_AUTHENTICATION_METHOD)(\r
-  IN EFI_EAP_PROTOCOL                     *This, \r
-  IN UINT8                                EapAuthType, \r
+  IN EFI_EAP_PROTOCOL                     *This,\r
+  IN UINT8                                EapAuthType,\r
   IN EFI_EAP_BUILD_RESPONSE_PACKET        Handler\r
   );\r
 \r
 ///\r
-/// EFI_EAP_PROTOCOL \r
-/// is used to configure the desired EAP authentication method for the EAP \r
+/// EFI_EAP_PROTOCOL\r
+/// is used to configure the desired EAP authentication method for the EAP\r
 /// framework and extend the EAP framework by registering new EAP authentication\r
 /// method on a Port. The EAP framework is built on a per-Port basis. Herein, a\r
-/// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284. \r
+/// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284.\r
 ///\r
 struct _EFI_EAP_PROTOCOL {\r
   EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD   SetDesiredAuthMethod;\r