]>
Commit | Line | Data |
---|---|---|
badd7e61 | 1 | /** @file\r |
2 | EFI EAP(Extended Authenticaton Protocol) Protocol Definition\r | |
3 | The EFI EAP Protocol is used to abstract the ability to configure and extend the\r | |
4 | EAP framework. \r | |
b37aa2c6 | 5 | The definitions in this file are defined in UEFI Specification 2.3.1B, which have\r |
badd7e61 | 6 | not been verified by one implementation yet.\r |
7 | \r | |
d3dc58e9 | 8 | Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 9 | This program and the accompanying materials\r |
badd7e61 | 10 | are licensed and made available under the terms and conditions of the BSD License\r |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
5899caf0 | 17 | @par Revision Reference: \r |
18 | This Protocol is introduced in UEFI Specification 2.2\r | |
19 | \r | |
badd7e61 | 20 | **/\r |
21 | \r | |
22 | #ifndef __EFI_EAP_PROTOCOL_H__\r | |
23 | #define __EFI_EAP_PROTOCOL_H__\r | |
24 | \r | |
25 | \r | |
26 | #define EFI_EAP_PROTOCOL_GUID \\r | |
27 | { \\r | |
28 | 0x5d9f96db, 0xe731, 0x4caa, {0xa0, 0xd, 0x72, 0xe1, 0x87, 0xcd, 0x77, 0x62 } \\r | |
29 | }\r | |
30 | \r | |
31 | typedef struct _EFI_EAP_PROTOCOL EFI_EAP_PROTOCOL;\r | |
32 | \r | |
33 | ///\r | |
34 | /// Type for the identification number assigned to the Port by the \r | |
35 | /// System in which the Port resides.\r | |
36 | ///\r | |
37 | typedef VOID * EFI_PORT_HANDLE;\r | |
38 | \r | |
39 | ///\r | |
b37aa2c6 | 40 | /// EAP Authentication Method Type (RFC 3748)\r |
badd7e61 | 41 | ///@{\r |
b37aa2c6 | 42 | #define EFI_EAP_TYPE_TLS 13 ///< REQUIRED - RFC 5216\r |
badd7e61 | 43 | ///@}\r |
44 | \r | |
b37aa2c6 LG |
45 | //\r |
46 | // EAP_TYPE MD5, OTP and TOEKN_CARD has been removed from UEFI2.3.1B.\r | |
d3dc58e9 | 47 | // Definitions are kept for backward compatibility.\r |
b37aa2c6 | 48 | //\r |
d3dc58e9 HW |
49 | #define EFI_EAP_TYPE_MD5 4\r |
50 | #define EFI_EAP_TYPE_OTP 5\r | |
51 | #define EFI_EAP_TYPE_TOKEN_CARD 6\r | |
badd7e61 | 52 | \r |
53 | /**\r | |
54 | One user provided EAP authentication method.\r | |
55 | \r | |
56 | Build EAP response packet in response to the EAP request packet specified by\r | |
57 | (RequestBuffer, RequestSize).\r | |
58 | \r | |
59 | @param[in] PortNumber Specified the Port where the EAP request packet comes.\r | |
60 | @param[in] RequestBuffer Pointer to the most recently received EAP- Request packet.\r | |
61 | @param[in] RequestSize Packet size in bytes for the most recently received\r | |
62 | EAP-Request packet.\r | |
63 | @param[in] Buffer Pointer to the buffer to hold the built packet.\r | |
64 | @param[in, out] BufferSize Pointer to the buffer size in bytes. \r | |
65 | On input, it is the buffer size provided by the caller.\r | |
66 | On output, it is the buffer size in fact needed to contain\r | |
67 | the packet.\r | |
68 | \r | |
69 | @retval EFI_SUCCESS The required EAP response packet is built successfully.\r | |
70 | @retval others Failures are encountered during the packet building process.\r | |
71 | \r | |
72 | **/\r | |
73 | typedef\r | |
74 | EFI_STATUS\r | |
75 | (EFIAPI *EFI_EAP_BUILD_RESPONSE_PACKET)(\r | |
76 | IN EFI_PORT_HANDLE PortNumber,\r | |
77 | IN UINT8 *RequestBuffer, \r | |
78 | IN UINTN RequestSize, \r | |
79 | IN UINT8 *Buffer, \r | |
80 | IN OUT UINTN *BufferSize\r | |
81 | );\r | |
82 | \r | |
83 | /**\r | |
84 | Set the desired EAP authentication method for the Port.\r | |
85 | \r | |
86 | The SetDesiredAuthMethod() function sets the desired EAP authentication method indicated \r | |
87 | by EapAuthType for the Port.\r | |
88 | \r | |
89 | If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r | |
90 | returned.\r | |
9095e76b LG |
91 | If the EAP authentication method of EapAuthType is unsupported by the Ports, then it will\r |
92 | return EFI_UNSUPPORTED.\r | |
b37aa2c6 LG |
93 | The cryptographic strength of EFI_EAP_TYPE_TLS shall be at least of hash strength \r |
94 | SHA-256 and RSA key length of at least 2048 bits.\r | |
95 | \r | |
badd7e61 | 96 | @param[in] This A pointer to the EFI_EAP_PROTOCOL instance that indicates \r |
97 | the calling context.\r | |
98 | @param[in] EapAuthType The type of the EAP authentication method to register. It should \r | |
99 | be the type value defined by RFC. See RFC 2284 for details.\r | |
100 | @param[in] Handler The handler of the EAP authentication method to register.\r | |
101 | \r | |
102 | @retval EFI_SUCCESS The EAP authentication method of EapAuthType is \r | |
103 | registered successfully.\r | |
104 | @retval EFI_INVALID_PARAMETER EapAuthType is an invalid EAP authentication type.\r | |
9095e76b LG |
105 | @retval EFI_UNSUPPORTED The EAP authentication method of EapAuthType is\r |
106 | unsupported by the Port.\r | |
badd7e61 | 107 | \r |
108 | **/\r | |
109 | typedef\r | |
110 | EFI_STATUS\r | |
111 | (EFIAPI *EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD)(\r | |
ea6898b9 | 112 | IN EFI_EAP_PROTOCOL *This, \r |
badd7e61 | 113 | IN UINT8 EapAuthType\r |
114 | );\r | |
115 | \r | |
116 | /**\r | |
117 | Register an EAP authentication method. \r | |
118 | \r | |
119 | The RegisterAuthMethod() function registers the user provided EAP authentication method, \r | |
120 | the type of which is EapAuthType and the handler of which is Handler. \r | |
121 | \r | |
122 | If EapAuthType is an invalid EAP authentication type, then EFI_INVALID_PARAMETER is \r | |
123 | returned.\r | |
124 | If there is not enough system memory to perform the registration, then \r | |
125 | EFI_OUT_OF_RESOURCES is returned.\r | |
126 | \r | |
127 | @param[in] This A pointer to the EFI_EAP_PROTOCOL instance that indicates \r | |
128 | the calling context.\r | |
129 | @param[in] EapAuthType The type of the EAP authentication method to register. It should \r | |
130 | be the type value defined by RFC. See RFC 2284 for details.\r | |
131 | @param[in] Handler The handler of the EAP authentication method to register.\r | |
132 | \r | |
133 | @retval EFI_SUCCESS The EAP authentication method of EapAuthType is \r | |
134 | registered successfully.\r | |
135 | @retval EFI_INVALID_PARAMETER EapAuthType is an invalid EAP authentication type.\r | |
136 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration.\r | |
137 | \r | |
138 | **/\r | |
139 | typedef\r | |
140 | EFI_STATUS\r | |
141 | (EFIAPI *EFI_EAP_REGISTER_AUTHENTICATION_METHOD)(\r | |
ea6898b9 | 142 | IN EFI_EAP_PROTOCOL *This, \r |
badd7e61 | 143 | IN UINT8 EapAuthType, \r |
144 | IN EFI_EAP_BUILD_RESPONSE_PACKET Handler\r | |
145 | );\r | |
146 | \r | |
147 | ///\r | |
148 | /// EFI_EAP_PROTOCOL \r | |
149 | /// is used to configure the desired EAP authentication method for the EAP \r | |
150 | /// framework and extend the EAP framework by registering new EAP authentication\r | |
151 | /// method on a Port. The EAP framework is built on a per-Port basis. Herein, a\r | |
152 | /// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284. \r | |
153 | ///\r | |
154 | struct _EFI_EAP_PROTOCOL {\r | |
155 | EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD SetDesiredAuthMethod;\r | |
156 | EFI_EAP_REGISTER_AUTHENTICATION_METHOD RegisterAuthMethod;\r | |
157 | };\r | |
158 | \r | |
159 | extern EFI_GUID gEfiEapProtocolGuid;\r | |
160 | \r | |
161 | #endif\r | |
162 | \r |