]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/AuthenticationInfo.h
1. Add TCG MOR (Memory Overwrite request) definition from TCG Platform Reset Attack...
[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 #pragma pack(1)
38 typedef struct {
39 ///
40 /// Authentication Type GUID.
41 ///
42 EFI_GUID Guid;
43
44 ///
45 /// Length of this structure in bytes.
46 ///
47 UINT16 Length;
48 } AUTH_NODE_HEADER;
49
50 typedef struct {
51 AUTH_NODE_HEADER Header;
52
53 ///
54 /// RADIUS Server IPv4 or IPv6 Address
55 ///
56 UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address
57
58 ///
59 /// Reserved for future use
60 ///
61 UINT16 Reserved;
62
63 ///
64 /// Network Access Server IPv4 or IPv6 Address (OPTIONAL)
65 ///
66 UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address
67
68 ///
69 /// Network Access Server Secret Length in bytes (OPTIONAL)
70 ///
71 UINT16 NasSecretLength;
72
73 ///
74 /// Network Access Server Secret (OPTIONAL)
75 ///
76 UINT8 NasSecret[1];
77
78 ///
79 /// CHAP Initiator Secret length in bytes on offset NasSecret + NasSecretLength.
80 ///
81 /// UINT16 ChapSecretLength;
82 ///
83 /// CHAP Initiator Secret
84 ///
85 /// UINT8 ChapSecret[];
86 ///
87 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength
88 ///
89 /// UINT16 ChapNameLength;
90 ///
91 /// CHAP Initiator Name
92 ///
93 /// UINT8 ChapName[];
94 ///
95 } CHAP_RADIUS_AUTH_NODE;
96
97 typedef struct {
98 AUTH_NODE_HEADER Header;
99
100 ///
101 /// Reserved for future use
102 ///
103 UINT16 Reserved;
104
105 ///
106 /// User Secret Length in bytes
107 ///
108 UINT16 UserSecretLength;
109
110 ///
111 /// User Secret
112 ///
113 UINT8 UserSecret[1];
114
115 ///
116 /// User Name Length in bytes on offset UserSecret + UserSecretLength
117 ///
118 /// UINT16 UserNameLength;
119 ///
120 /// User Name
121 ///
122 /// UINT8 *UserName;
123 ///
124 /// CHAP Initiator Secret length in bytes on offset UserName + UserNameLength
125 ///
126 /// UINT16 ChapSecretLength;
127 ///
128 /// CHAP Initiator Secret
129 ///
130 /// UINT8 *ChapSecret;
131 ///
132 /// CHAP Initiator Name Length in bytes on offset ChapSecret + ChapSecretLength
133 ///
134 /// UINT16 ChapNameLength;
135 ///
136 /// CHAP Initiator Name
137 ///
138 /// UINT8 *ChapName;
139 ///
140 } CHAP_LOCAL_AUTH_NODE;
141 #pragma pack()
142
143 /**
144 Retrieves the authentication information associated with a particular controller handle.
145
146 @param[in] This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
147 @param[in] ControllerHandle Handle to the Controller
148 @param[out] Buffer Pointer to the authentication information.
149
150 @retval EFI_SUCCESS Successfully retrieved authentication information for the given ControllerHandle
151 @retval EFI_INVALID_PARAMETER No matching authentication information found for the given ControllerHandle
152 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
153 hardware error.
154
155 **/
156 typedef
157 EFI_STATUS
158 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(
159 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
160 IN EFI_HANDLE *ControllerHandle,
161 OUT VOID *Buffer
162 );
163
164 /**
165 Set the authentication information for a given controller handle.
166
167 @param[in] This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
168 @param[in] ControllerHandle Handle to the Controller
169 @param[in] Buffer Pointer to the authentication information.
170
171 @retval EFI_SUCCESS Successfully set authentication information for the given ControllerHandle
172 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the authentication
173 information.
174 @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
175 hardware error.
176 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
177
178 **/
179 typedef
180 EFI_STATUS
181 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(
182 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
183 IN EFI_HANDLE *ControllerHandle,
184 IN VOID *Buffer
185 );
186
187 ///
188 /// This protocol is used on any device handle to obtain authentication
189 /// information associated with the physical or logical device.
190 ///
191 struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
192 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
193 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
194 };
195
196 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
197 extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
198 extern EFI_GUID gEfiAuthenticationChapLocalGuid;
199
200 #endif