iPXE
EapConfiguration.h
Go to the documentation of this file.
1/** @file
2 This file defines the EFI EAP Configuration protocol.
3
4 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 This Protocol is introduced in UEFI Specification 2.5
9
10**/
11
12#pragma once
13
14FILE_LICENCE ( BSD2_PATENT );
15FILE_SECBOOT ( PERMITTED );
16
17///
18/// EFI EAP Configuration protocol provides a way to set and get EAP configuration.
19///
20#define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \
21 { \
22 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \
23 }
24
26
27///
28/// Make sure it not conflict with any real EapTypeXXX
29///
30#define EFI_EAP_TYPE_ATTRIBUTE 0
31
32typedef enum {
33 ///
34 /// EFI_EAP_TYPE_ATTRIBUTE
35 ///
38 ///
39 /// EapTypeIdentity
40 ///
42 ///
43 /// EapTypeEAPTLS/EapTypePEAP
44 ///
51 ///
52 /// EapTypeMSChapV2
53 ///
54 EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile
55 ///
56 /// EapTypePEAP
57 ///
59 ///
60 /// More...
61 ///
63
64///
65/// EFI_EAP_TYPE
66///
68#define EFI_EAP_TYPE_ATTRIBUTE 0
69#define EFI_EAP_TYPE_IDENTITY 1
70#define EFI_EAP_TYPE_NOTIFICATION 2
71#define EFI_EAP_TYPE_NAK 3
72#define EFI_EAP_TYPE_MD5CHALLENGE 4
73#define EFI_EAP_TYPE_OTP 5
74#define EFI_EAP_TYPE_GTC 6
75#define EFI_EAP_TYPE_EAPTLS 13
76#define EFI_EAP_TYPE_EAPSIM 18
77#define EFI_EAP_TYPE_TTLS 21
78#define EFI_EAP_TYPE_PEAP 25
79#define EFI_EAP_TYPE_MSCHAPV2 26
80#define EFI_EAP_TYPE_EAP_EXTENSION 33
81
82/**
83 Set EAP configuration data.
84
85 The SetData() function sets EAP configuration to non-volatile storage or volatile
86 storage.
87
88 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
89 @param[in] EapType EAP type.
90 @param[in] DataType Configuration data type.
91 @param[in] Data Pointer to configuration data.
92 @param[in] DataSize Total size of configuration data.
93
94 @retval EFI_SUCCESS The EAP configuration data is set successfully.
95 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
96 Data is NULL.
97 DataSize is 0.
98 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
99 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
100**/
101typedef
105 IN EFI_EAP_TYPE EapType,
107 IN VOID *Data,
108 IN UINTN DataSize
109 );
110
111/**
112 Get EAP configuration data.
113
114 The GetData() function gets EAP configuration.
115
116 @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
117 @param[in] EapType EAP type.
118 @param[in] DataType Configuration data type.
119 @param[in, out] Data Pointer to configuration data.
120 @param[in, out] DataSize Total size of configuration data. On input, it means
121 the size of Data buffer. On output, it means the size
122 of copied Data buffer if EFI_SUCCESS, and means the
123 size of desired Data buffer if EFI_BUFFER_TOO_SMALL.
124
125 @retval EFI_SUCCESS The EAP configuration data is got successfully.
126 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
127 Data is NULL.
128 DataSize is NULL.
129 @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.
130 @retval EFI_NOT_FOUND The EAP configuration data is not found.
131 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
132**/
133typedef
137 IN EFI_EAP_TYPE EapType,
139 IN OUT VOID *Data,
140 IN OUT UINTN *DataSize
141 );
142
143///
144/// The EFI_EAP_CONFIGURATION_PROTOCOL
145/// is designed to provide a way to set and get EAP configuration, such as Certificate,
146/// private key file.
147///
152
UINT64 UINTN
Unsigned value of native width.
#define EFIAPI
unsigned char UINT8
1-byte unsigned value.
#define VOID
Undeclared type.
Definition Base.h:271
EFI_GUID gEfiEapConfigurationProtocolGuid
EFI_STATUS(EFIAPI * EFI_EAP_CONFIGURATION_GET_DATA)(IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, IN OUT VOID *Data, IN OUT UINTN *DataSize)
Get EAP configuration data.
EFI_STATUS(EFIAPI * EFI_EAP_CONFIGURATION_SET_DATA)(IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, IN VOID *Data, IN UINTN DataSize)
Set EAP configuration data.
struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL
EFI_EAP_CONFIG_DATA_TYPE
@ EfiEapConfigEapAuthMethod
EFI_EAP_TYPE_ATTRIBUTE.
@ EfiEapConfigEapTlsClientCert
@ EfiEapConfigEapTlsSupportedCipherSuite
@ EfiEapConfigEapMSChapV2Password
EapTypeMSChapV2.
@ EfiEapConfigEapTlsCACert
EapTypeEAPTLS/EapTypePEAP.
@ EfiEapConfigEap2ndAuthMethod
EapTypePEAP.
@ EfiEapConfigIdentityString
EapTypeIdentity.
@ EfiEapConfigEapSupportedAuthMethod
@ EfiEapConfigEapTlsClientPrivateKeyFilePassword
@ EfiEapConfigEapTlsCipherSuite
@ EfiEapConfigEapTlsClientPrivateKeyFile
UINT8 EFI_EAP_TYPE
EFI_EAP_TYPE.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
The EFI_EAP_CONFIGURATION_PROTOCOL is designed to provide a way to set and get EAP configuration,...
EFI_EAP_CONFIGURATION_GET_DATA GetData
EFI_EAP_CONFIGURATION_SET_DATA SetData