]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This file defines the EFI EAP Configuration protocol.\r | |
3 | \r | |
4 | Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | @par Revision Reference:\r | |
8 | This Protocol is introduced in UEFI Specification 2.5\r | |
9 | \r | |
10 | **/\r | |
11 | \r | |
12 | #ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r | |
13 | #define __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r | |
14 | \r | |
15 | ///\r | |
16 | /// EFI EAP Configuration protocol provides a way to set and get EAP configuration.\r | |
17 | ///\r | |
18 | #define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \\r | |
19 | { \\r | |
20 | 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \\r | |
21 | }\r | |
22 | \r | |
23 | typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL;\r | |
24 | \r | |
25 | ///\r | |
26 | /// Make sure it not conflict with any real EapTypeXXX\r | |
27 | ///\r | |
28 | #define EFI_EAP_TYPE_ATTRIBUTE 0\r | |
29 | \r | |
30 | typedef enum {\r | |
31 | ///\r | |
32 | /// EFI_EAP_TYPE_ATTRIBUTE\r | |
33 | ///\r | |
34 | EfiEapConfigEapAuthMethod,\r | |
35 | EfiEapConfigEapSupportedAuthMethod,\r | |
36 | ///\r | |
37 | /// EapTypeIdentity\r | |
38 | ///\r | |
39 | EfiEapConfigIdentityString,\r | |
40 | ///\r | |
41 | /// EapTypeEAPTLS/EapTypePEAP\r | |
42 | ///\r | |
43 | EfiEapConfigEapTlsCACert,\r | |
44 | EfiEapConfigEapTlsClientCert,\r | |
45 | EfiEapConfigEapTlsClientPrivateKeyFile,\r | |
46 | EfiEapConfigEapTlsClientPrivateKeyFilePassword, // ASCII format, Volatile\r | |
47 | EfiEapConfigEapTlsCipherSuite,\r | |
48 | EfiEapConfigEapTlsSupportedCipherSuite,\r | |
49 | ///\r | |
50 | /// EapTypeMSChapV2\r | |
51 | ///\r | |
52 | EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile\r | |
53 | ///\r | |
54 | /// EapTypePEAP\r | |
55 | ///\r | |
56 | EfiEapConfigEap2ndAuthMethod,\r | |
57 | ///\r | |
58 | /// More...\r | |
59 | ///\r | |
60 | } EFI_EAP_CONFIG_DATA_TYPE;\r | |
61 | \r | |
62 | ///\r | |
63 | /// EFI_EAP_TYPE\r | |
64 | ///\r | |
65 | typedef UINT8 EFI_EAP_TYPE;\r | |
66 | #define EFI_EAP_TYPE_ATTRIBUTE 0\r | |
67 | #define EFI_EAP_TYPE_IDENTITY 1\r | |
68 | #define EFI_EAP_TYPE_NOTIFICATION 2\r | |
69 | #define EFI_EAP_TYPE_NAK 3\r | |
70 | #define EFI_EAP_TYPE_MD5CHALLENGE 4\r | |
71 | #define EFI_EAP_TYPE_OTP 5\r | |
72 | #define EFI_EAP_TYPE_GTC 6\r | |
73 | #define EFI_EAP_TYPE_EAPTLS 13\r | |
74 | #define EFI_EAP_TYPE_EAPSIM 18\r | |
75 | #define EFI_EAP_TYPE_TTLS 21\r | |
76 | #define EFI_EAP_TYPE_PEAP 25\r | |
77 | #define EFI_EAP_TYPE_MSCHAPV2 26\r | |
78 | #define EFI_EAP_TYPE_EAP_EXTENSION 33\r | |
79 | \r | |
80 | /**\r | |
81 | Set EAP configuration data.\r | |
82 | \r | |
83 | The SetData() function sets EAP configuration to non-volatile storage or volatile\r | |
84 | storage.\r | |
85 | \r | |
86 | @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r | |
87 | @param[in] EapType EAP type.\r | |
88 | @param[in] DataType Configuration data type.\r | |
89 | @param[in] Data Pointer to configuration data.\r | |
90 | @param[in] DataSize Total size of configuration data.\r | |
91 | \r | |
92 | @retval EFI_SUCCESS The EAP configuration data is set successfully.\r | |
93 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
94 | Data is NULL.\r | |
95 | DataSize is 0.\r | |
96 | @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r | |
97 | @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r | |
98 | **/\r | |
99 | typedef\r | |
100 | EFI_STATUS\r | |
101 | (EFIAPI *EFI_EAP_CONFIGURATION_SET_DATA)(\r | |
102 | IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r | |
103 | IN EFI_EAP_TYPE EapType,\r | |
104 | IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r | |
105 | IN VOID *Data,\r | |
106 | IN UINTN DataSize\r | |
107 | );\r | |
108 | \r | |
109 | /**\r | |
110 | Get EAP configuration data.\r | |
111 | \r | |
112 | The GetData() function gets EAP configuration.\r | |
113 | \r | |
114 | @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r | |
115 | @param[in] EapType EAP type.\r | |
116 | @param[in] DataType Configuration data type.\r | |
117 | @param[in, out] Data Pointer to configuration data.\r | |
118 | @param[in, out] DataSize Total size of configuration data. On input, it means\r | |
119 | the size of Data buffer. On output, it means the size\r | |
120 | of copied Data buffer if EFI_SUCCESS, and means the\r | |
121 | size of desired Data buffer if EFI_BUFFER_TOO_SMALL.\r | |
122 | \r | |
123 | @retval EFI_SUCCESS The EAP configuration data is got successfully.\r | |
124 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
125 | Data is NULL.\r | |
126 | DataSize is NULL.\r | |
127 | @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r | |
128 | @retval EFI_NOT_FOUND The EAP configuration data is not found.\r | |
129 | @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.\r | |
130 | **/\r | |
131 | typedef\r | |
132 | EFI_STATUS\r | |
133 | (EFIAPI *EFI_EAP_CONFIGURATION_GET_DATA)(\r | |
134 | IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r | |
135 | IN EFI_EAP_TYPE EapType,\r | |
136 | IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r | |
137 | IN OUT VOID *Data,\r | |
138 | IN OUT UINTN *DataSize\r | |
139 | );\r | |
140 | \r | |
141 | ///\r | |
142 | /// The EFI_EAP_CONFIGURATION_PROTOCOL\r | |
143 | /// is designed to provide a way to set and get EAP configuration, such as Certificate,\r | |
144 | /// private key file.\r | |
145 | ///\r | |
146 | struct _EFI_EAP_CONFIGURATION_PROTOCOL {\r | |
147 | EFI_EAP_CONFIGURATION_SET_DATA SetData;\r | |
148 | EFI_EAP_CONFIGURATION_GET_DATA GetData;\r | |
149 | };\r | |
150 | \r | |
151 | extern EFI_GUID gEfiEapConfigurationProtocolGuid;\r | |
152 | \r | |
153 | #endif\r |