]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/AuthenticationInfo.h
3b3fd6b33a4b09a50cf70e97c6e5542a4f6bf95c
[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 EFI_GUID Guid;
39 UINT16 Length;
40 } AUTH_NODE_HEADER;
41
42 typedef struct {
43 AUTH_NODE_HEADER Header;
44 EFI_IPv6_ADDRESS RadiusIpAddr; ///< IPv4 or IPv6 address
45 UINT16 Reserved;
46 EFI_IPv6_ADDRESS NasIpAddr; ///< IPv4 or IPv6 address
47 UINT16 NasSecretLength;
48 UINT8 *NasSecret;
49 UINT16 ChapSecretLength;
50 UINT8 *ChapSecret;
51 UINT16 ChapNameLength;
52 UINT8 *ChapName;
53 } CHAP_RADIUS_AUTH_NODE;
54
55 typedef struct {
56 AUTH_NODE_HEADER Header;
57 UINT16 Reserved;
58 UINT16 UserSecretLength;
59 UINT8 *UserSecret;
60 UINT16 UserNameLength;
61 UINT8 *UserName;
62 UINT16 ChapSecretLength;
63 UINT8 *ChapSecret;
64 UINT16 ChapNameLength;
65 UINT8 *ChapName;
66 } CHAP_LOCAL_AUTH_NODE;
67
68 /**
69 Retrieves the Authentication information associated with a particular controller handle.
70
71 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
72 @param ControllerHandle Handle to the Controller
73 @param Buffer Pointer to the authentication information.
74
75 @retval EFI_SUCCESS Successfully retrieved Authentication information for the given ControllerHandle
76 @retval EFI_INVALID_PARAMETER No matching Authentication information found for the given ControllerHandle
77 @retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
78 hardware error.
79
80 **/
81 typedef
82 EFI_STATUS
83 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET)(
84 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
85 IN EFI_HANDLE *ControllerHandle,
86 OUT VOID *Buffer
87 );
88
89 /**
90 Set the Authentication information for a given controller handle.
91
92 @param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
93 @param ControllerHandle Handle to the Controller
94 @param Buffer Pointer to the authentication information.
95
96 @retval EFI_SUCCESS Successfully set Authentication information for the given ControllerHandle
97 @retval EFI_UNSUPPORTED If the platform policies do not allow setting of the Authentication
98 information.
99 @retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
100 hardware error.
101 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
102
103 **/
104 typedef
105 EFI_STATUS
106 (EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET)(
107 IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
108 IN EFI_HANDLE *ControllerHandle,
109 IN VOID *Buffer
110 );
111
112 /**
113 @par Protocol Description:
114 This protocol is used on any device handle to obtain authentication
115 information associated with the physical or logical device.
116 **/
117 struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
118 EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
119 EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
120 };
121
122 extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
123 extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
124 extern EFI_GUID gEfiAuthenticationChapLocalGuid;
125
126 #endif