eap_config.h revision 4530cfd4d14a77c58e35393b91e40f8dd9d62697
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/*
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * EAP peer configuration data
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi>
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * This software may be distributed under the terms of the BSD license.
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * See README for more details.
72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) */
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef EAP_CONFIG_H
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define EAP_CONFIG_H
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/**
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * struct eap_peer_config - EAP peer configuration/credentials
144e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) */
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)struct eap_peer_config {
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * identity - EAP Identity
184e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
194e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is used to set the real user identity or NAI (for
204e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-PSK/PAX/SAKE/GPSK).
212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 */
229ab5563a3196760eb381d102cbb2bc0f7abc6a50Ben Murdoch	u8 *identity;
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
254e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * identity_len - EAP Identity length
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	size_t identity_len;
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	/**
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * anonymous_identity -  Anonymous EAP Identity
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * This field is used for unencrypted use with EAP types that support
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * different tunnelled identity, e.g., EAP-TTLS, in order to reveal the
344e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * real identity (identity field) only to the authentication server.
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * If not set, the identity field will be used for both unencrypted and
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * protected fields.
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * This field can also be used with EAP-SIM/AKA/AKA' to store the
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * pseudonym identity.
412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 */
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	u8 *anonymous_identity;
434e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	/**
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * anonymous_identity_len - Length of anonymous_identity
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
474e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	size_t anonymous_identity_len;
484e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
494e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
504e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * password - Password string for EAP
514e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
524e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field can include either the plaintext password (default
534e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * option) or a NtPasswordHash (16-byte MD4 hash of the unicode
544e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * presentation of the password) if flags field has
554e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP_CONFIG_FLAGS_PASSWORD_NTHASH bit set to 1. NtPasswordHash can
564e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * only be used with authentication mechanism that use this hash as the
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * starting point for operation: MSCHAP and MSCHAPv2 (EAP-MSCHAPv2,
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP).
592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * In addition, this field is used to configure a pre-shared key for
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * EAP-PSK/PAX/SAKE/GPSK. The length of the PSK must be 16 for EAP-PSK
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * and EAP-PAX and 32 for EAP-SAKE. EAP-GPSK can use a variable length
634e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * PSK.
644e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
654e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *password;
664e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
674e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
684e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * password_len - Length of password field
694e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
704e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	size_t password_len;
714e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
724e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
734e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * ca_cert - File path to CA certificate file (PEM/DER)
744e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
754e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This file can have one or more trusted CA certificates. If ca_cert
764e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * and ca_path are not included, server certificate will not be
774e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * verified. This is insecure and a trusted CA certificate should
784e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * always be configured when using EAP-TLS/TTLS/PEAP. Full path to the
794e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * file should be used since working directory may change when
804e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * wpa_supplicant is run in the background.
814e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
824e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
834e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * this to blob://blob_name.
844e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
854e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, this can be used to only perform matching of the
864e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * server certificate (SHA-256 hash of the DER encoded X.509
874e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * certificate). In this case, the possible CA certificates in the
884e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * server certificate chain are ignored and only the server certificate
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * is verified. This is configured with the following format:
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * hash:://server/sha256/cert_hash_in_hex
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * For example: "hash://server/sha256/
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * 5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a"
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
944e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * On Windows, trusted CA certificates can be loaded from the system
952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * certificate store by setting this to cert_store://name, e.g.,
962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT".
972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Note that when running wpa_supplicant as an application, the user
982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * certificate store (My user account) is used, whereas computer store
992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * (Computer account) is used when running wpasvc as a service.
1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 */
1012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	u8 *ca_cert;
1022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
1042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * ca_path - Directory path for CA certificate files (PEM)
1052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
1062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * This path may contain multiple CA certificates in OpenSSL format.
1072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Common use for this is to point to system trusted CA list which is
1082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * often installed into directory like /etc/ssl/certs. If configured,
1090f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)	 * these certificates are added to the list of trusted CAs. ca_cert
1100f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)	 * may also be included in that case, but it is not required.
1112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 */
1122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	u8 *ca_path;
1132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	/**
1152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * client_cert - File path to client certificate file (PEM/DER)
116c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)	 *
1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * This field is used with EAP method that use TLS authentication.
1182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Usually, this is only configured for EAP-TLS, even though this could
1192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * in theory be used with EAP-TTLS and EAP-PEAP, too. Full path to the
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * file should be used since working directory may change when
1212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * wpa_supplicant is run in the background.
1222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
1232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
1242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * this to blob://blob_name.
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
1262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	u8 *client_cert;
1272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * private_key - File path to client private key file (PEM/DER/PFX)
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
1322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * commented out. Both the private key and certificate will be read
133c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)	 * from the PKCS#12 file in this case. Full path to the file should be
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * used since working directory may change when wpa_supplicant is run
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * in the background.
1362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
137cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	 * Windows certificate store can be used by leaving client_cert out and
138cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	 * configuring private_key in one of the following formats:
139cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	 *
140cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	 * cert://substring_to_match
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * hash://certificate_thumbprint_in_hex
143c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)	 *
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
1452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
1462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Note that when running wpa_supplicant as an application, the user
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * certificate store (My user account) is used, whereas computer store
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * (Computer account) is used when running wpasvc as a service.
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * this to blob://blob_name.
1522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 */
1532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	u8 *private_key;
1542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
156a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)	 * private_key_passwd - Password for private key file
1572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
1582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * If left out, this will be asked through control interface.
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	u8 *private_key_passwd;
1612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	/**
1632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * dh_file - File path to DH/DSA parameters file (in PEM format)
1642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 *
1652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * This is an optional configuration file for setting parameters for an
1662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * ephemeral DH key exchange. In most cases, the default RSA
1672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * authentication does not use this configuration. However, it is
1682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * possible setup RSA to use ephemeral DH key exchange. In addition,
1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * ciphers with DSA keys always use ephemeral DH keys. This can be used
1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * to achieve forward secrecy. If the file is in DSA parameters format,
1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * it will be automatically converted into DH params. Full path to the
172a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)	 * file should be used since working directory may change when
1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * wpa_supplicant is run in the background.
1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * this to blob://blob_name.
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	u8 *dh_file;
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * subject_match - Constraint for server certificate subject
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * This substring is matched against the subject of the authentication
1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * server certificate. If this string is set, the server sertificate is
1852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * only accepted if it contains this string in the subject. The subject
1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * string is in following format:
1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@n.example.com
1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	u8 *subject_match;
1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	/**
1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * altsubject_match - Constraint for server certificate alt. subject
1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 *
1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 * Semicolon separated string of entries to be matched against the
1964e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * alternative subject name of the authentication server certificate.
1974e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * If this string is set, the server sertificate is only accepted if it
1984e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * contains one of the entries in an alternative subject name
1994e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * extension.
2004e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2014e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * altSubjectName string is in following format: TYPE:VALUE
2024e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2034e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Example: EMAIL:server@example.com
2044e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Example: DNS:server.example.com;DNS:server2.example.com
2054e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2064e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Following types are supported: EMAIL, DNS, URI
2074e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2084e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *altsubject_match;
2094e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2104e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2114e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * ca_cert2 - File path to CA certificate file (PEM/DER) (Phase 2)
2124e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2134e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This file can have one or more trusted CA certificates. If ca_cert2
2144e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * and ca_path2 are not included, server certificate will not be
2154e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * verified. This is insecure and a trusted CA certificate should
2164e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * always be configured. Full path to the file should be used since
2174e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * working directory may change when wpa_supplicant is run in the
2184e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * background.
2194e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2204e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like ca_cert, but used for phase 2 (inside
2214e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
2224e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2234e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
2244e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * this to blob://blob_name.
2254e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2264e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *ca_cert2;
2274e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2284e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2294e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * ca_path2 - Directory path for CA certificate files (PEM) (Phase 2)
2304e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2314e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This path may contain multiple CA certificates in OpenSSL format.
2324e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Common use for this is to point to system trusted CA list which is
2334e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * often installed into directory like /etc/ssl/certs. If configured,
2344e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * these certificates are added to the list of trusted CAs. ca_cert
2354e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * may also be included in that case, but it is not required.
236cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	 *
23746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)	 * This field is like ca_path, but used for phase 2 (inside
23846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
2394e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
240cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)	u8 *ca_path2;
2414e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2424e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2434e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * client_cert2 - File path to client certificate file
2444e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2454e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like client_cert, but used for phase 2 (inside
2464e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
2474e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * file should be used since working directory may change when
2484e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * wpa_supplicant is run in the background.
2494e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2504e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
2514e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * this to blob://blob_name.
2524e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2534e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *client_cert2;
2544e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2554e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2564e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * private_key2 - File path to client private key file
2574e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2584e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like private_key, but used for phase 2 (inside
2594e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
2604e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * file should be used since working directory may change when
2614e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * wpa_supplicant is run in the background.
2624e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2634e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
2644e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * this to blob://blob_name.
2654e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2664e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *private_key2;
2674e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2684e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2694e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * private_key2_passwd -  Password for private key file
2704e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2714e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like private_key_passwd, but used for phase 2 (inside
2724e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
2734e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2744e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *private_key2_passwd;
2754e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2764e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2774e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * dh_file2 - File path to DH/DSA parameters file (in PEM format)
2784e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2794e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like dh_file, but used for phase 2 (inside
2800f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
2810f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)	 * file should be used since working directory may change when
2824e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * wpa_supplicant is run in the background.
2834e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2844e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Alternatively, a named configuration blob can be used by setting
2854e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * this to blob://blob_name.
2864e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2874e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *dh_file2;
2884e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2894e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2904e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * subject_match2 - Constraint for server certificate subject
2914e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
2924e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like subject_match, but used for phase 2 (inside
2934e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
2944e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
2954e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *subject_match2;
2964e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
2974e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
2984e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * altsubject_match2 - Constraint for server certificate alt. subject
2994e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3004e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * This field is like altsubject_match, but used for phase 2 (inside
3014e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
3024e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
3034e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	u8 *altsubject_match2;
3044e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
3054e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
3064e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * eap_methods - Allowed EAP methods
3074e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3084e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
3094e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * allowed EAP methods or %NULL if all methods are accepted.
3104e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
3114e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	struct eap_method_type *eap_methods;
3124e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
3134e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
3144e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * phase1 - Phase 1 (outer authentication) parameters
3154e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3164e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * String with field-value pairs, e.g., "peapver=0" or
3174e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * "peapver=1 peaplabel=1".
3184e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3194e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 'peapver' can be used to force which PEAP version (0 or 1) is used.
3204e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
321a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)	 * 'peaplabel=1' can be used to force new label, "client PEAP
3224e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * encryption",	to be used during key derivation when PEAPv1 or newer.
3234e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3244e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Most existing PEAPv1 implementation seem to be using the old label,
3254e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * "client EAP encryption", and wpa_supplicant is now using that as the
3264e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * default value.
3274e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3284e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Some servers, e.g., Radiator, may require peaplabel=1 configuration
3294e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * to interoperate with PEAPv1; see eap_testing.txt for more details.
330a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)	 *
3314e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 'peap_outer_success=0' can be used to terminate PEAP authentication
3324e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * on tunneled EAP-Success. This is required with some RADIUS servers
3334e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
3344e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
3354e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3364e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * include_tls_length=1 can be used to force wpa_supplicant to include
3374e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * TLS Message Length field in all TLS messages even if they are not
3384e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * fragmented.
3394e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3404e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
3414e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * challenges (by default, it accepts 2 or 3).
3424e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3434e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
3444e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * protected result indication.
3454e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3464e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * fast_provisioning option can be used to enable in-line provisioning
3474e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * of EAP-FAST credentials (PAC):
3484e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 0 = disabled,
3494e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 1 = allow unauthenticated provisioning,
3504e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 2 = allow authenticated provisioning,
3514e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 3 = allow both unauthenticated and authenticated provisioning
3524e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3534e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * fast_max_pac_list_len=num option can be used to set the maximum
3544e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * number of PAC entries to store in a PAC list (default: 10).
3554e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3564e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * fast_pac_format=binary option can be used to select binary format
3574e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * for storing PAC entries in order to save some space (the default
3584e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * text format uses about 2.5 times the size of minimal binary format).
3594e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3604e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * crypto_binding option can be used to control PEAPv0 cryptobinding
3614e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * behavior:
3624e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 0 = do not use cryptobinding (default)
3634e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 1 = use cryptobinding if server supports it
3644e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * 2 = require cryptobinding
3654e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3664e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * EAP-WSC (WPS) uses following options: pin=Device_Password and
3674e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * uuid=Device_UUID
3684e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 */
3694e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	char *phase1;
3704e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
3714e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	/**
3724e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
3734e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 *
3744e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)	 * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
3752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)	 * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS.
3765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	 */
3775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	char *phase2;
378
379	/**
380	 * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
381	 *
382	 * This field is used to configure PC/SC smartcard interface.
383	 * Currently, the only configuration is whether this field is %NULL (do
384	 * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
385	 *
386	 * This field is used for EAP-SIM and EAP-AKA.
387	 */
388	char *pcsc;
389
390	/**
391	 * pin - PIN for USIM, GSM SIM, and smartcards
392	 *
393	 * This field is used to configure PIN for SIM and smartcards for
394	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
395	 * smartcard is used for private key operations.
396	 *
397	 * If left out, this will be asked through control interface.
398	 */
399	char *pin;
400
401	/**
402	 * engine - Enable OpenSSL engine (e.g., for smartcard access)
403	 *
404	 * This is used if private key operations for EAP-TLS are performed
405	 * using a smartcard.
406	 */
407	int engine;
408
409	/**
410	 * engine_id - Engine ID for OpenSSL engine
411	 *
412	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
413	 * engine.
414	 *
415	 * This is used if private key operations for EAP-TLS are performed
416	 * using a smartcard.
417	 */
418	char *engine_id;
419
420	/**
421	 * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2)
422	 *
423	 * This is used if private key operations for EAP-TLS are performed
424	 * using a smartcard.
425	 *
426	 * This field is like engine, but used for phase 2 (inside
427	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
428	 */
429	int engine2;
430
431
432	/**
433	 * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2)
434	 *
435	 * This field is used to configure PIN for SIM and smartcards for
436	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
437	 * smartcard is used for private key operations.
438	 *
439	 * This field is like pin2, but used for phase 2 (inside
440	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
441	 *
442	 * If left out, this will be asked through control interface.
443	 */
444	char *pin2;
445
446	/**
447	 * engine2_id - Engine ID for OpenSSL engine (Phase 2)
448	 *
449	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
450	 * engine.
451	 *
452	 * This is used if private key operations for EAP-TLS are performed
453	 * using a smartcard.
454	 *
455	 * This field is like engine_id, but used for phase 2 (inside
456	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
457	 */
458	char *engine2_id;
459
460
461	/**
462	 * key_id - Key ID for OpenSSL engine
463	 *
464	 * This is used if private key operations for EAP-TLS are performed
465	 * using a smartcard.
466	 */
467	char *key_id;
468
469	/**
470	 * cert_id - Cert ID for OpenSSL engine
471	 *
472	 * This is used if the certificate operations for EAP-TLS are performed
473	 * using a smartcard.
474	 */
475	char *cert_id;
476
477	/**
478	 * ca_cert_id - CA Cert ID for OpenSSL engine
479	 *
480	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
481	 */
482	char *ca_cert_id;
483
484	/**
485	 * key2_id - Key ID for OpenSSL engine (phase2)
486	 *
487	 * This is used if private key operations for EAP-TLS are performed
488	 * using a smartcard.
489	 */
490	char *key2_id;
491
492	/**
493	 * cert2_id - Cert ID for OpenSSL engine (phase2)
494	 *
495	 * This is used if the certificate operations for EAP-TLS are performed
496	 * using a smartcard.
497	 */
498	char *cert2_id;
499
500	/**
501	 * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
502	 *
503	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
504	 */
505	char *ca_cert2_id;
506
507	/**
508	 * otp - One-time-password
509	 *
510	 * This field should not be set in configuration step. It is only used
511	 * internally when OTP is entered through the control interface.
512	 */
513	u8 *otp;
514
515	/**
516	 * otp_len - Length of the otp field
517	 */
518	size_t otp_len;
519
520	/**
521	 * pending_req_identity - Whether there is a pending identity request
522	 *
523	 * This field should not be set in configuration step. It is only used
524	 * internally when control interface is used to request needed
525	 * information.
526	 */
527	int pending_req_identity;
528
529	/**
530	 * pending_req_password - Whether there is a pending password request
531	 *
532	 * This field should not be set in configuration step. It is only used
533	 * internally when control interface is used to request needed
534	 * information.
535	 */
536	int pending_req_password;
537
538	/**
539	 * pending_req_pin - Whether there is a pending PIN request
540	 *
541	 * This field should not be set in configuration step. It is only used
542	 * internally when control interface is used to request needed
543	 * information.
544	 */
545	int pending_req_pin;
546
547	/**
548	 * pending_req_new_password - Pending password update request
549	 *
550	 * This field should not be set in configuration step. It is only used
551	 * internally when control interface is used to request needed
552	 * information.
553	 */
554	int pending_req_new_password;
555
556	/**
557	 * pending_req_passphrase - Pending passphrase request
558	 *
559	 * This field should not be set in configuration step. It is only used
560	 * internally when control interface is used to request needed
561	 * information.
562	 */
563	int pending_req_passphrase;
564
565	/**
566	 * pending_req_otp - Whether there is a pending OTP request
567	 *
568	 * This field should not be set in configuration step. It is only used
569	 * internally when control interface is used to request needed
570	 * information.
571	 */
572	char *pending_req_otp;
573
574	/**
575	 * pending_req_otp_len - Length of the pending OTP request
576	 */
577	size_t pending_req_otp_len;
578
579	/**
580	 * pac_file - File path or blob name for the PAC entries (EAP-FAST)
581	 *
582	 * wpa_supplicant will need to be able to create this file and write
583	 * updates to it when PAC is being provisioned or refreshed. Full path
584	 * to the file should be used since working directory may change when
585	 * wpa_supplicant is run in the background.
586	 * Alternatively, a named configuration blob can be used by setting
587	 * this to blob://blob_name.
588	 */
589	char *pac_file;
590
591	/**
592	 * mschapv2_retry - MSCHAPv2 retry in progress
593	 *
594	 * This field is used internally by EAP-MSCHAPv2 and should not be set
595	 * as part of configuration.
596	 */
597	int mschapv2_retry;
598
599	/**
600	 * new_password - New password for password update
601	 *
602	 * This field is used during MSCHAPv2 password update. This is normally
603	 * requested from the user through the control interface and not set
604	 * from configuration.
605	 */
606	u8 *new_password;
607
608	/**
609	 * new_password_len - Length of new_password field
610	 */
611	size_t new_password_len;
612
613	/**
614	 * fragment_size - Maximum EAP fragment size in bytes (default 1398)
615	 *
616	 * This value limits the fragment size for EAP methods that support
617	 * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
618	 * small enough to make the EAP messages fit in MTU of the network
619	 * interface used for EAPOL. The default value is suitable for most
620	 * cases.
621	 */
622	int fragment_size;
623
624#define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
625#define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
626	/**
627	 * flags - Network configuration flags (bitfield)
628	 *
629	 * This variable is used for internal flags to describe further details
630	 * for the network parameters.
631	 * bit 0 = password is represented as a 16-byte NtPasswordHash value
632	 *         instead of plaintext password
633	 * bit 1 = password is stored in external storage; the value in the
634	 *         password field is the name of that external entry
635	 */
636	u32 flags;
637};
638
639
640/**
641 * struct wpa_config_blob - Named configuration blob
642 *
643 * This data structure is used to provide storage for binary objects to store
644 * abstract information like certificates and private keys inlined with the
645 * configuration data.
646 */
647struct wpa_config_blob {
648	/**
649	 * name - Blob name
650	 */
651	char *name;
652
653	/**
654	 * data - Pointer to binary data
655	 */
656	u8 *data;
657
658	/**
659	 * len - Length of binary data
660	 */
661	size_t len;
662
663	/**
664	 * next - Pointer to next blob in the configuration
665	 */
666	struct wpa_config_blob *next;
667};
668
669#endif /* EAP_CONFIG_H */
670