--- /dev/null
+/** @file\r
+ This file defines the EFI EAP Configuration protocol.\r
+\r
+ Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This Protocol is introduced in UEFI Specification 2.5\r
+\r
+**/\r
+\r
+#ifndef __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r
+#define __EFI_EAP_CONFIGURATION_PROTOCOL_H__\r
+\r
+///\r
+/// EFI EAP Configuration protocol provides a way to set and get EAP configuration.\r
+///\r
+#define EFI_EAP_CONFIGURATION_PROTOCOL_GUID \\r
+ { \\r
+ 0xe5b58dbb, 0x7688, 0x44b4, {0x97, 0xbf, 0x5f, 0x1d, 0x4b, 0x7c, 0xc8, 0xdb } \\r
+ }\r
+\r
+typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL;\r
+\r
+///\r
+/// Make sure it not conflict with any real EapTypeXXX\r
+///\r
+#define EFI_EAP_TYPE_ATTRIBUTE 0\r
+\r
+typedef enum {\r
+ ///\r
+ /// EFI_EAP_TYPE_ATTRIBUTE\r
+ ///\r
+ EfiEapConfigEapAuthMethod,\r
+ EfiEapConfigEapSupportedAuthMethod,\r
+ ///\r
+ /// EapTypeIdentity\r
+ ///\r
+ EfiEapConfigIdentityString,\r
+ ///\r
+ /// EapTypeEAPTLS/EapTypePEAP\r
+ ///\r
+ EfiEapConfigEapTlsCACert,\r
+ EfiEapConfigEapTlsClientCert,\r
+ EfiEapConfigEapTlsClientPrivateKeyFile,\r
+ EfiEapConfigEapTlsClientPrivateKeyFilePassword, // ASCII format, Volatile\r
+ EfiEapConfigEapTlsCipherSuite,\r
+ EfiEapConfigEapTlsSupportedCipherSuite,\r
+ ///\r
+ /// EapTypeMSChapV2\r
+ ///\r
+ EfiEapConfigEapMSChapV2Password, // UNICODE format, Volatile\r
+ ///\r
+ /// EapTypePEAP\r
+ ///\r
+ EfiEapConfigEap2ndAuthMethod,\r
+ ///\r
+ /// More...\r
+ ///\r
+} EFI_EAP_CONFIG_DATA_TYPE;\r
+\r
+///\r
+/// EFI_EAP_TYPE\r
+///\r
+typedef UINT8 EFI_EAP_TYPE;\r
+#define EFI_EAP_TYPE_ATTRIBUTE 0\r
+#define EFI_EAP_TYPE_IDENTITY 1\r
+#define EFI_EAP_TYPE_NOTIFICATION 2\r
+#define EFI_EAP_TYPE_NAK 3\r
+#define EFI_EAP_TYPE_MD5CHALLENGE 4\r
+#define EFI_EAP_TYPE_OTP 5\r
+#define EFI_EAP_TYPE_GTC 6\r
+#define EFI_EAP_TYPE_EAPTLS 13\r
+#define EFI_EAP_TYPE_EAPSIM 18\r
+#define EFI_EAP_TYPE_TTLS 21\r
+#define EFI_EAP_TYPE_PEAP 25\r
+#define EFI_EAP_TYPE_MSCHAPV2 26\r
+#define EFI_EAP_TYPE_EAP_EXTENSION 33\r
+\r
+/**\r
+ Set EAP configuration data.\r
+\r
+ The SetData() function sets EAP configuration to non-volatile storage or volatile\r
+ storage.\r
+\r
+ @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r
+ @param[in] EapType EAP type.\r
+ @param[in] DataType Configuration data type.\r
+ @param[in] Data Pointer to configuration data.\r
+ @param[in] DataSize Total size of configuration data.\r
+\r
+ @retval EFI_SUCCESS The EAP configuration data is set successfully.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ Data is NULL.\r
+ DataSize is 0.\r
+ @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r
+ @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_CONFIGURATION_SET_DATA) (\r
+ IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r
+ IN EFI_EAP_TYPE EapType,\r
+ IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r
+ IN VOID *Data,\r
+ IN UINTN DataSize\r
+ );\r
+\r
+/**\r
+ Get EAP configuration data.\r
+\r
+ The GetData() function gets EAP configuration.\r
+\r
+ @param[in] This Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.\r
+ @param[in] EapType EAP type.\r
+ @param[in] DataType Configuration data type.\r
+ @param[in, out] Data Pointer to configuration data.\r
+ @param[in, out] DataSize Total size of configuration data. On input, it means\r
+ the size of Data buffer. On output, it means the size\r
+ of copied Data buffer if EFI_SUCCESS, and means the\r
+ size of desired Data buffer if EFI_BUFFER_TOO_SMALL.\r
+\r
+ @retval EFI_SUCCESS The EAP configuration data is got successfully.\r
+ @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
+ Data is NULL.\r
+ DataSize is NULL.\r
+ @retval EFI_UNSUPPORTED The EapType or DataType is unsupported.\r
+ @retval EFI_NOT_FOUND The EAP configuration data is not found.\r
+ @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EAP_CONFIGURATION_GET_DATA) (\r
+ IN EFI_EAP_CONFIGURATION_PROTOCOL *This,\r
+ IN EFI_EAP_TYPE EapType,\r
+ IN EFI_EAP_CONFIG_DATA_TYPE DataType,\r
+ IN OUT VOID *Data,\r
+ IN OUT UINTN *DataSize\r
+ );\r
+\r
+///\r
+/// The EFI_EAP_CONFIGURATION_PROTOCOL\r
+/// is designed to provide a way to set and get EAP configuration, such as Certificate,\r
+/// private key file.\r
+///\r
+struct _EFI_EAP_CONFIGURATION_PROTOCOL {\r
+ EFI_EAP_CONFIGURATION_SET_DATA SetData;\r
+ EFI_EAP_CONFIGURATION_GET_DATA GetData;\r
+};\r
+\r
+extern EFI_GUID gEfiEapConfigurationProtocolGuid;\r
+\r
+#endif
\ No newline at end of file