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