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