2 This file defines the EFI EAP Configuration protocol.
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 @par Revision Reference:
14 This Protocol is introduced in UEFI Specification 2.5
18 #ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__
19 #define __EFI_EAP_CONFIGURATION_PROTOCOL_H__
22 /// EFI EAP Configuration protocol provides a way to set and get EAP configuration.
24 #define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \
26 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \
29 typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL
;
32 /// Make sure it not conflict with any real EapTypeXXX
34 #define EFI_EAP_TYPE_ATTRIBUTE 0
38 /// EFI_EAP_TYPE_ATTRIBUTE
40 EfiEapConfigEapAuthMethod
,
41 EfiEapConfigEapSupportedAuthMethod
,
45 EfiEapConfigIdentityString
,
47 /// EapTypeEAPTLS/EapTypePEAP
49 EfiEapConfigEapTlsCACert
,
50 EfiEapConfigEapTlsClientCert
,
51 EfiEapConfigEapTlsClientPrivateKeyFile
,
52 EfiEapConfigEapTlsClientPrivateKeyFilePassword
, // ASCII format, Volatile
53 EfiEapConfigEapTlsCipherSuite
,
54 EfiEapConfigEapTlsSupportedCipherSuite
,
58 EfiEapConfigEapMSChapV2Password
, // UNICODE format, Volatile
62 EfiEapConfigEap2ndAuthMethod
,
66 } EFI_EAP_CONFIG_DATA_TYPE
;
71 typedef UINT8 EFI_EAP_TYPE
;
72 #define EFI_EAP_TYPE_ATTRIBUTE 0
73 #define EFI_EAP_TYPE_IDENTITY 1
74 #define EFI_EAP_TYPE_NOTIFICATION 2
75 #define EFI_EAP_TYPE_NAK 3
76 #define EFI_EAP_TYPE_MD5CHALLENGE 4
77 #define EFI_EAP_TYPE_OTP 5
78 #define EFI_EAP_TYPE_GTC 6
79 #define EFI_EAP_TYPE_EAPTLS 13
80 #define EFI_EAP_TYPE_EAPSIM 18
81 #define EFI_EAP_TYPE_TTLS 21
82 #define EFI_EAP_TYPE_PEAP 25
83 #define EFI_EAP_TYPE_MSCHAPV2 26
84 #define EFI_EAP_TYPE_EAP_EXTENSION 33
87 Set EAP configuration data.
89 The SetData() function sets EAP configuration to non-volatile storage or volatile
92 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
93 @param[in] EapType EAP type.
94 @param[in] DataType Configuration data type.
95 @param[in] Data Pointer to configuration data.
96 @param[in] DataSize Total size of configuration data.
98 @retval EFI_SUCCESS The EAP configuration data is set successfully.
99 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
102 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
103 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
107 (EFIAPI
*EFI_EAP_CONFIGURATION_SET_DATA
) (
108 IN EFI_EAP_CONFIGURATION_PROTOCOL
*This
,
109 IN EFI_EAP_TYPE EapType
,
110 IN EFI_EAP_CONFIG_DATA_TYPE DataType
,
116 Get EAP configuration data.
118 The GetData() function gets EAP configuration.
120 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
121 @param[in] EapType EAP type.
122 @param[in] DataType Configuration data type.
123 @param[in, out] Data Pointer to configuration data.
124 @param[in, out] DataSize Total size of configuration data. On input, it means
125 the size of Data buffer. On output, it means the size
126 of copied Data buffer if EFI_SUCCESS, and means the
127 size of desired Data buffer if EFI_BUFFER_TOO_SMALL.
129 @retval EFI_SUCCESS The EAP configuration data is got successfully.
130 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
133 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
134 @retval EFI_NOT_FOUND The EAP configuration data is not found.
135 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
139 (EFIAPI
*EFI_EAP_CONFIGURATION_GET_DATA
) (
140 IN EFI_EAP_CONFIGURATION_PROTOCOL
*This
,
141 IN EFI_EAP_TYPE EapType
,
142 IN EFI_EAP_CONFIG_DATA_TYPE DataType
,
144 IN OUT UINTN
*DataSize
148 /// The EFI_EAP_CONFIGURATION_PROTOCOL
149 /// is designed to provide a way to set and get EAP configuration, such as Certificate,
150 /// private key file.
152 struct _EFI_EAP_CONFIGURATION_PROTOCOL
{
153 EFI_EAP_CONFIGURATION_SET_DATA SetData
;
154 EFI_EAP_CONFIGURATION_GET_DATA GetData
;
157 extern EFI_GUID gEfiEapConfigurationProtocolGuid
;