2 EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.
3 This protocol is used on any device handle to obtain authentication information
4 associated with the physical or logical device.
6 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials are licensed and made available under
8 the terms and conditions of the BSD License that accompanies this distribution.
9 The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef __AUTHENTICATION_INFO_H__
18 #define __AUTHENTICATION_INFO_H__
20 #define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
22 0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \
25 #define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \
27 0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
30 #define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \
32 0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
35 typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL
;
40 /// Authentication Type GUID.
45 /// Length of this structure in bytes.
51 AUTH_NODE_HEADER Header
;
54 /// RADIUS Server IPv4 or IPv6 Address.
56 UINT8 RadiusIpAddr
[16]; ///< IPv4 or IPv6 address.
59 /// Reserved for future use.
64 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL).
66 UINT8 NasIpAddr
[16]; ///< IPv4 or IPv6 address.
69 /// Network Access Server Secret Length in bytes (OPTIONAL).
71 UINT16 NasSecretLength
;
74 /// Network Access Server Secret (OPTIONAL).
79 /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength.
81 /// UINT16 ChapSecretLength;
83 /// CHAP Initiator Secret.
85 /// UINT8 ChapSecret[];
87 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.
89 /// UINT16 ChapNameLength;
91 /// CHAP Initiator Name.
95 /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.
97 /// UINT16 ReverseChapNameLength;
99 /// Reverse CHAP Name.
101 /// UINT8 ReverseChapName[];
103 /// Reverse CHAP Secret Length in bytes on offseet ReverseChapName + ReverseChapNameLength.
105 /// UINT16 ReverseChapSecretLength;
107 /// Reverse CHAP Secret.
109 /// UINT8 ReverseChapSecret[];
111 } CHAP_RADIUS_AUTH_NODE
;
114 AUTH_NODE_HEADER Header
;
117 /// Reserved for future use.
122 /// User Secret Length in bytes.
124 UINT16 UserSecretLength
;
132 /// User Name Length in bytes on offset UserSecret + UserSecretLength.
134 /// UINT16 UserNameLength;
138 /// UINT8 UserName[];
140 /// CHAP Initiator Secret Length in bytes on offset UserName + UserNameLength.
142 /// UINT16 ChapSecretLength;
144 /// CHAP Initiator Secret.
146 /// UINT8 ChapSecret[];
148 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength.
150 /// UINT16 ChapNameLength;
152 /// CHAP Initiator Name.
154 /// UINT8 ChapName[];
156 /// Reverse CHAP Name Length in bytes on offset ChapName + ChapNameLength.
158 /// UINT16 ReverseChapNameLength;
160 /// Reverse CHAP Name.
162 /// UINT8 ReverseChapName[];
164 /// Reverse CHAP Secret Length in bytes on offset ReverseChapName + ReverseChapNameLength.
166 /// UINT16 ReverseChapSecretLength;
168 /// Reverse CHAP Secret.
170 /// UINT8 ReverseChapSecret[];
172 } CHAP_LOCAL_AUTH_NODE
;
176 Retrieves the authentication information associated with a particular controller handle.
178 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.
179 @param[in] ControllerHandle The handle to the Controller.
180 @param[out] Buffer The pointer to the authentication information. This function is
181 responsible for allocating the buffer and it is the caller's
182 responsibility to free buffer when the caller is finished with buffer.
184 @retval EFI_SUCCESS Successfully retrieved authentication information
185 for the given ControllerHandle.
186 @retval EFI_INVALID_PARAMETER No matching authentication information found for
187 the given ControllerHandle.
188 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved
189 due to a hardware error.
194 (EFIAPI
*EFI_AUTHENTICATION_INFO_PROTOCOL_GET
)(
195 IN EFI_AUTHENTICATION_INFO_PROTOCOL
*This
,
196 IN EFI_HANDLE ControllerHandle
,
201 Set the authentication information for a given controller handle.
203 @param[in] This The pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL.
204 @param[in] ControllerHandle The handle to the Controller.
205 @param[in] Buffer The pointer to the authentication information.
207 @retval EFI_SUCCESS Successfully set authentication information for the
208 given ControllerHandle.
209 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of
210 the authentication information.
211 @retval EFI_DEVICE_ERROR The authentication information could not be configured
212 due to a hardware error.
213 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
218 (EFIAPI
*EFI_AUTHENTICATION_INFO_PROTOCOL_SET
)(
219 IN EFI_AUTHENTICATION_INFO_PROTOCOL
*This
,
220 IN EFI_HANDLE ControllerHandle
,
225 /// This protocol is used on any device handle to obtain authentication
226 /// information associated with the physical or logical device.
228 struct _EFI_AUTHENTICATION_INFO_PROTOCOL
{
229 EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get
;
230 EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set
;
233 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid
;
234 extern EFI_GUID gEfiAuthenticationChapRadiusGuid
;
235 extern EFI_GUID gEfiAuthenticationChapLocalGuid
;