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