2 This file defines the EFI EAP Configuration protocol.
4 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 This Protocol is introduced in UEFI Specification 2.5
12 #ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__
13 #define __EFI_EAP_CONFIGURATION_PROTOCOL_H__
16 /// EFI EAP Configuration protocol provides a way to set and get EAP configuration.
18 #define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \
20 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \
23 typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL
;
26 /// Make sure it not conflict with any real EapTypeXXX
28 #define EFI_EAP_TYPE_ATTRIBUTE 0
32 /// EFI_EAP_TYPE_ATTRIBUTE
34 EfiEapConfigEapAuthMethod
,
35 EfiEapConfigEapSupportedAuthMethod
,
39 EfiEapConfigIdentityString
,
41 /// EapTypeEAPTLS/EapTypePEAP
43 EfiEapConfigEapTlsCACert
,
44 EfiEapConfigEapTlsClientCert
,
45 EfiEapConfigEapTlsClientPrivateKeyFile
,
46 EfiEapConfigEapTlsClientPrivateKeyFilePassword
, // ASCII format, Volatile
47 EfiEapConfigEapTlsCipherSuite
,
48 EfiEapConfigEapTlsSupportedCipherSuite
,
52 EfiEapConfigEapMSChapV2Password
, // UNICODE format, Volatile
56 EfiEapConfigEap2ndAuthMethod
,
60 } EFI_EAP_CONFIG_DATA_TYPE
;
65 typedef UINT8 EFI_EAP_TYPE
;
66 #define EFI_EAP_TYPE_ATTRIBUTE 0
67 #define EFI_EAP_TYPE_IDENTITY 1
68 #define EFI_EAP_TYPE_NOTIFICATION 2
69 #define EFI_EAP_TYPE_NAK 3
70 #define EFI_EAP_TYPE_MD5CHALLENGE 4
71 #define EFI_EAP_TYPE_OTP 5
72 #define EFI_EAP_TYPE_GTC 6
73 #define EFI_EAP_TYPE_EAPTLS 13
74 #define EFI_EAP_TYPE_EAPSIM 18
75 #define EFI_EAP_TYPE_TTLS 21
76 #define EFI_EAP_TYPE_PEAP 25
77 #define EFI_EAP_TYPE_MSCHAPV2 26
78 #define EFI_EAP_TYPE_EAP_EXTENSION 33
81 Set EAP configuration data.
83 The SetData() function sets EAP configuration to non-volatile storage or volatile
86 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
87 @param[in] EapType EAP type.
88 @param[in] DataType Configuration data type.
89 @param[in] Data Pointer to configuration data.
90 @param[in] DataSize Total size of configuration data.
92 @retval EFI_SUCCESS The EAP configuration data is set successfully.
93 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
96 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
97 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
101 (EFIAPI
*EFI_EAP_CONFIGURATION_SET_DATA
) (
102 IN EFI_EAP_CONFIGURATION_PROTOCOL
*This
,
103 IN EFI_EAP_TYPE EapType
,
104 IN EFI_EAP_CONFIG_DATA_TYPE DataType
,
110 Get EAP configuration data.
112 The GetData() function gets EAP configuration.
114 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
115 @param[in] EapType EAP type.
116 @param[in] DataType Configuration data type.
117 @param[in, out] Data Pointer to configuration data.
118 @param[in, out] DataSize Total size of configuration data. On input, it means
119 the size of Data buffer. On output, it means the size
120 of copied Data buffer if EFI_SUCCESS, and means the
121 size of desired Data buffer if EFI_BUFFER_TOO_SMALL.
123 @retval EFI_SUCCESS The EAP configuration data is got successfully.
124 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
127 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
128 @retval EFI_NOT_FOUND The EAP configuration data is not found.
129 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
133 (EFIAPI
*EFI_EAP_CONFIGURATION_GET_DATA
) (
134 IN EFI_EAP_CONFIGURATION_PROTOCOL
*This
,
135 IN EFI_EAP_TYPE EapType
,
136 IN EFI_EAP_CONFIG_DATA_TYPE DataType
,
138 IN OUT UINTN
*DataSize
142 /// The EFI_EAP_CONFIGURATION_PROTOCOL
143 /// is designed to provide a way to set and get EAP configuration, such as Certificate,
144 /// private key file.
146 struct _EFI_EAP_CONFIGURATION_PROTOCOL
{
147 EFI_EAP_CONFIGURATION_SET_DATA SetData
;
148 EFI_EAP_CONFIGURATION_GET_DATA GetData
;
151 extern EFI_GUID gEfiEapConfigurationProtocolGuid
;