]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/AuthenticationInfo.h
Reviewed the code comments in the Include/Protocol directory for typos, grammar issue...
[mirror_edk2.git] / MdePkg / Include / Protocol / AuthenticationInfo.h
1 /** @file
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.
5
6 Copyright (c) 2006 - 2008, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
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.
14
15 **/
16
17 #ifndef __AUTHENTICATION_INFO_H__
18 #define __AUTHENTICATION_INFO_H__
19
20 #define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
21 { \
22 0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \
23 }
24
25 #define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \
26 { \
27 0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
28 }
29
30 #define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \
31 { \
32 0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
33 }
34
35 typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;
36
37 typedef struct {
38 ///
39 /// Authentication Type GUID.
40 ///
41 EFI_GUID Guid;
42
43 ///
44 /// Length of this structure in bytes.
45 ///
46 UINT16 Length;
47 } AUTH_NODE_HEADER;
48
49 typedef struct {
50 AUTH_NODE_HEADER Header;
51
52 ///
53 /// RADIUS Server IPv4 or IPv6 Address
54 ///
55 EFI_IPv6_ADDRESS RadiusIpAddr; ///< IPv4 or IPv6 address
56
57 ///
58 /// Reserved for future use
59 ///
60 UINT16 Reserved;
61
62 ///
63 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL)
64 ///
65 EFI_IPv6_ADDRESS NasIpAddr; ///< IPv4 or IPv6 address
66
67 ///
68 /// Network Access Server Secret Length in bytes (OPTIONAL)
69 ///
70 UINT16 NasSecretLength;
71
72 ///
73 /// Network Access Server secret (OPTIONAL)
74 ///
75 UINT8 *NasSecret;
76
77 ///
78 /// CHAP Initiator Secret length in bytes
79 ///
80 UINT16 ChapSecretLength;
81
82 ///
83 /// CHAP Initiator Secret
84 ///
85 UINT8 *ChapSecret;
86
87 ///
88 /// CHAP Initiator Name Length in bytes
89 ///
90 UINT16 ChapNameLength;
91
92 ///
93 /// CHAP Initiator Name
94 ///
95 UINT8 *ChapName;
96 } CHAP_RADIUS_AUTH_NODE;
97
98 typedef struct {
99 AUTH_NODE_HEADER Header;
100
101 ///
102 /// Reserved for future use
103 ///
104 UINT16 Reserved;
105
106 ///
107 /// User Secret Length in bytes
108 ///
109 UINT16 UserSecretLength;
110
111 ///
112 /// User Secret
113 ///
114 UINT8 *UserSecret;
115
116 ///
117 /// User Name Length in bytes
118 ///
119 UINT16 UserNameLength;
120
121 ///
122 /// User Name
123 ///
124 UINT8 *UserName;
125
126 ///
127 /// CHAP Initiator Secret length in bytes
128 ///
129 UINT16 ChapSecretLength;
130
131 ///
132 /// CHAP Initiator Secret
133 ///
134 UINT8 *ChapSecret;
135
136 ///
137 /// CHAP Initiator Name Length in bytes
138 ///
139 UINT16 ChapNameLength;
140
141 ///
142 /// CHAP Initiator Name
143 ///
144 UINT8 *ChapName;
145 } CHAP_LOCAL_AUTH_NODE;
146
147 /**
148 Retrieves the authentication information associated with a particular controller handle.
149
150 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
151 @param ControllerHandle Handle to the Controller
152 @param Buffer Pointer to the authentication information.
153
154 @retval EFI_SUCCESS Successfully retrieved authentication information for the given ControllerHandle
155 @retval EFI_INVALID_PARAMETER No matching authentication information found for the given ControllerHandle
156 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
157 hardware error.
158
159 **/
160 typedef
161 EFI_STATUS
162 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(
163 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
164 IN EFI_HANDLE *ControllerHandle,
165 OUT VOID *Buffer
166 );
167
168 /**
169 Set the authentication information for a given controller handle.
170
171 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
172 @param ControllerHandle Handle to the Controller
173 @param Buffer Pointer to the authentication information.
174
175 @retval EFI_SUCCESS Successfully set authentication information for the given ControllerHandle
176 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the authentication
177 information.
178 @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
179 hardware error.
180 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
181
182 **/
183 typedef
184 EFI_STATUS
185 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(
186 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
187 IN EFI_HANDLE *ControllerHandle,
188 IN VOID *Buffer
189 );
190
191 ///
192 /// This protocol is used on any device handle to obtain authentication
193 /// information associated with the physical or logical device.
194 ///
195 struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
196 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
197 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
198 };
199
200 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
201 extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
202 extern EFI_GUID gEfiAuthenticationChapLocalGuid;
203
204 #endif