xref: /freebsd/contrib/wpa/src/eap_peer/eap_config.h (revision 206b73d0429edb7c49b612537544e677fa568e83)
139beb93cSSam Leffler /*
239beb93cSSam Leffler  * EAP peer configuration data
35b9c547cSRui Paulo  * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi>
439beb93cSSam Leffler  *
5f05cddf9SRui Paulo  * This software may be distributed under the terms of the BSD license.
6f05cddf9SRui Paulo  * See README for more details.
739beb93cSSam Leffler  */
839beb93cSSam Leffler 
939beb93cSSam Leffler #ifndef EAP_CONFIG_H
1039beb93cSSam Leffler #define EAP_CONFIG_H
1139beb93cSSam Leffler 
1239beb93cSSam Leffler /**
1339beb93cSSam Leffler  * struct eap_peer_config - EAP peer configuration/credentials
1439beb93cSSam Leffler  */
1539beb93cSSam Leffler struct eap_peer_config {
1639beb93cSSam Leffler 	/**
1739beb93cSSam Leffler 	 * identity - EAP Identity
1839beb93cSSam Leffler 	 *
1939beb93cSSam Leffler 	 * This field is used to set the real user identity or NAI (for
2039beb93cSSam Leffler 	 * EAP-PSK/PAX/SAKE/GPSK).
2139beb93cSSam Leffler 	 */
2239beb93cSSam Leffler 	u8 *identity;
2339beb93cSSam Leffler 
2439beb93cSSam Leffler 	/**
2539beb93cSSam Leffler 	 * identity_len - EAP Identity length
2639beb93cSSam Leffler 	 */
2739beb93cSSam Leffler 	size_t identity_len;
2839beb93cSSam Leffler 
2939beb93cSSam Leffler 	/**
3039beb93cSSam Leffler 	 * anonymous_identity -  Anonymous EAP Identity
3139beb93cSSam Leffler 	 *
3239beb93cSSam Leffler 	 * This field is used for unencrypted use with EAP types that support
3339beb93cSSam Leffler 	 * different tunnelled identity, e.g., EAP-TTLS, in order to reveal the
3439beb93cSSam Leffler 	 * real identity (identity field) only to the authentication server.
3539beb93cSSam Leffler 	 *
3639beb93cSSam Leffler 	 * If not set, the identity field will be used for both unencrypted and
3739beb93cSSam Leffler 	 * protected fields.
38f05cddf9SRui Paulo 	 *
39f05cddf9SRui Paulo 	 * This field can also be used with EAP-SIM/AKA/AKA' to store the
40f05cddf9SRui Paulo 	 * pseudonym identity.
4139beb93cSSam Leffler 	 */
4239beb93cSSam Leffler 	u8 *anonymous_identity;
4339beb93cSSam Leffler 
4439beb93cSSam Leffler 	/**
4539beb93cSSam Leffler 	 * anonymous_identity_len - Length of anonymous_identity
4639beb93cSSam Leffler 	 */
4739beb93cSSam Leffler 	size_t anonymous_identity_len;
4839beb93cSSam Leffler 
4985732ac8SCy Schubert 	u8 *imsi_identity;
5085732ac8SCy Schubert 	size_t imsi_identity_len;
5185732ac8SCy Schubert 
5239beb93cSSam Leffler 	/**
5339beb93cSSam Leffler 	 * password - Password string for EAP
5439beb93cSSam Leffler 	 *
5539beb93cSSam Leffler 	 * This field can include either the plaintext password (default
5639beb93cSSam Leffler 	 * option) or a NtPasswordHash (16-byte MD4 hash of the unicode
5739beb93cSSam Leffler 	 * presentation of the password) if flags field has
5839beb93cSSam Leffler 	 * EAP_CONFIG_FLAGS_PASSWORD_NTHASH bit set to 1. NtPasswordHash can
5939beb93cSSam Leffler 	 * only be used with authentication mechanism that use this hash as the
6039beb93cSSam Leffler 	 * starting point for operation: MSCHAP and MSCHAPv2 (EAP-MSCHAPv2,
6139beb93cSSam Leffler 	 * EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP).
6239beb93cSSam Leffler 	 *
6339beb93cSSam Leffler 	 * In addition, this field is used to configure a pre-shared key for
6439beb93cSSam Leffler 	 * EAP-PSK/PAX/SAKE/GPSK. The length of the PSK must be 16 for EAP-PSK
6539beb93cSSam Leffler 	 * and EAP-PAX and 32 for EAP-SAKE. EAP-GPSK can use a variable length
6639beb93cSSam Leffler 	 * PSK.
6739beb93cSSam Leffler 	 */
6839beb93cSSam Leffler 	u8 *password;
6939beb93cSSam Leffler 
7039beb93cSSam Leffler 	/**
7139beb93cSSam Leffler 	 * password_len - Length of password field
7239beb93cSSam Leffler 	 */
7339beb93cSSam Leffler 	size_t password_len;
7439beb93cSSam Leffler 
7539beb93cSSam Leffler 	/**
7639beb93cSSam Leffler 	 * ca_cert - File path to CA certificate file (PEM/DER)
7739beb93cSSam Leffler 	 *
7839beb93cSSam Leffler 	 * This file can have one or more trusted CA certificates. If ca_cert
7939beb93cSSam Leffler 	 * and ca_path are not included, server certificate will not be
8039beb93cSSam Leffler 	 * verified. This is insecure and a trusted CA certificate should
8139beb93cSSam Leffler 	 * always be configured when using EAP-TLS/TTLS/PEAP. Full path to the
8239beb93cSSam Leffler 	 * file should be used since working directory may change when
8339beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
8439beb93cSSam Leffler 	 *
8539beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
8639beb93cSSam Leffler 	 * this to blob://blob_name.
8739beb93cSSam Leffler 	 *
88e28a4053SRui Paulo 	 * Alternatively, this can be used to only perform matching of the
89e28a4053SRui Paulo 	 * server certificate (SHA-256 hash of the DER encoded X.509
90e28a4053SRui Paulo 	 * certificate). In this case, the possible CA certificates in the
91e28a4053SRui Paulo 	 * server certificate chain are ignored and only the server certificate
92e28a4053SRui Paulo 	 * is verified. This is configured with the following format:
93e28a4053SRui Paulo 	 * hash:://server/sha256/cert_hash_in_hex
94e28a4053SRui Paulo 	 * For example: "hash://server/sha256/
95e28a4053SRui Paulo 	 * 5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a"
96e28a4053SRui Paulo 	 *
9739beb93cSSam Leffler 	 * On Windows, trusted CA certificates can be loaded from the system
9839beb93cSSam Leffler 	 * certificate store by setting this to cert_store://name, e.g.,
9939beb93cSSam Leffler 	 * ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT".
10039beb93cSSam Leffler 	 * Note that when running wpa_supplicant as an application, the user
10139beb93cSSam Leffler 	 * certificate store (My user account) is used, whereas computer store
10239beb93cSSam Leffler 	 * (Computer account) is used when running wpasvc as a service.
10339beb93cSSam Leffler 	 */
1044bc52338SCy Schubert 	char *ca_cert;
10539beb93cSSam Leffler 
10639beb93cSSam Leffler 	/**
10739beb93cSSam Leffler 	 * ca_path - Directory path for CA certificate files (PEM)
10839beb93cSSam Leffler 	 *
10939beb93cSSam Leffler 	 * This path may contain multiple CA certificates in OpenSSL format.
11039beb93cSSam Leffler 	 * Common use for this is to point to system trusted CA list which is
11139beb93cSSam Leffler 	 * often installed into directory like /etc/ssl/certs. If configured,
11239beb93cSSam Leffler 	 * these certificates are added to the list of trusted CAs. ca_cert
11339beb93cSSam Leffler 	 * may also be included in that case, but it is not required.
11439beb93cSSam Leffler 	 */
1154bc52338SCy Schubert 	char *ca_path;
11639beb93cSSam Leffler 
11739beb93cSSam Leffler 	/**
11839beb93cSSam Leffler 	 * client_cert - File path to client certificate file (PEM/DER)
11939beb93cSSam Leffler 	 *
12039beb93cSSam Leffler 	 * This field is used with EAP method that use TLS authentication.
12139beb93cSSam Leffler 	 * Usually, this is only configured for EAP-TLS, even though this could
12239beb93cSSam Leffler 	 * in theory be used with EAP-TTLS and EAP-PEAP, too. Full path to the
12339beb93cSSam Leffler 	 * file should be used since working directory may change when
12439beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
12539beb93cSSam Leffler 	 *
12639beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
12739beb93cSSam Leffler 	 * this to blob://blob_name.
12839beb93cSSam Leffler 	 */
1294bc52338SCy Schubert 	char *client_cert;
13039beb93cSSam Leffler 
13139beb93cSSam Leffler 	/**
13239beb93cSSam Leffler 	 * private_key - File path to client private key file (PEM/DER/PFX)
13339beb93cSSam Leffler 	 *
13439beb93cSSam Leffler 	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
13539beb93cSSam Leffler 	 * commented out. Both the private key and certificate will be read
13639beb93cSSam Leffler 	 * from the PKCS#12 file in this case. Full path to the file should be
13739beb93cSSam Leffler 	 * used since working directory may change when wpa_supplicant is run
13839beb93cSSam Leffler 	 * in the background.
13939beb93cSSam Leffler 	 *
14039beb93cSSam Leffler 	 * Windows certificate store can be used by leaving client_cert out and
14139beb93cSSam Leffler 	 * configuring private_key in one of the following formats:
14239beb93cSSam Leffler 	 *
14339beb93cSSam Leffler 	 * cert://substring_to_match
14439beb93cSSam Leffler 	 *
14539beb93cSSam Leffler 	 * hash://certificate_thumbprint_in_hex
14639beb93cSSam Leffler 	 *
14739beb93cSSam Leffler 	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
14839beb93cSSam Leffler 	 *
14939beb93cSSam Leffler 	 * Note that when running wpa_supplicant as an application, the user
15039beb93cSSam Leffler 	 * certificate store (My user account) is used, whereas computer store
15139beb93cSSam Leffler 	 * (Computer account) is used when running wpasvc as a service.
15239beb93cSSam Leffler 	 *
15339beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
15439beb93cSSam Leffler 	 * this to blob://blob_name.
15539beb93cSSam Leffler 	 */
1564bc52338SCy Schubert 	char *private_key;
15739beb93cSSam Leffler 
15839beb93cSSam Leffler 	/**
15939beb93cSSam Leffler 	 * private_key_passwd - Password for private key file
16039beb93cSSam Leffler 	 *
16139beb93cSSam Leffler 	 * If left out, this will be asked through control interface.
16239beb93cSSam Leffler 	 */
1635b9c547cSRui Paulo 	char *private_key_passwd;
16439beb93cSSam Leffler 
16539beb93cSSam Leffler 	/**
16639beb93cSSam Leffler 	 * dh_file - File path to DH/DSA parameters file (in PEM format)
16739beb93cSSam Leffler 	 *
16839beb93cSSam Leffler 	 * This is an optional configuration file for setting parameters for an
16939beb93cSSam Leffler 	 * ephemeral DH key exchange. In most cases, the default RSA
17039beb93cSSam Leffler 	 * authentication does not use this configuration. However, it is
17139beb93cSSam Leffler 	 * possible setup RSA to use ephemeral DH key exchange. In addition,
17239beb93cSSam Leffler 	 * ciphers with DSA keys always use ephemeral DH keys. This can be used
17339beb93cSSam Leffler 	 * to achieve forward secrecy. If the file is in DSA parameters format,
17439beb93cSSam Leffler 	 * it will be automatically converted into DH params. Full path to the
17539beb93cSSam Leffler 	 * file should be used since working directory may change when
17639beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
17739beb93cSSam Leffler 	 *
17839beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
17939beb93cSSam Leffler 	 * this to blob://blob_name.
18039beb93cSSam Leffler 	 */
1814bc52338SCy Schubert 	char *dh_file;
18239beb93cSSam Leffler 
18339beb93cSSam Leffler 	/**
18439beb93cSSam Leffler 	 * subject_match - Constraint for server certificate subject
18539beb93cSSam Leffler 	 *
18639beb93cSSam Leffler 	 * This substring is matched against the subject of the authentication
187780fb4a2SCy Schubert 	 * server certificate. If this string is set, the server certificate is
18839beb93cSSam Leffler 	 * only accepted if it contains this string in the subject. The subject
18939beb93cSSam Leffler 	 * string is in following format:
19039beb93cSSam Leffler 	 *
19139beb93cSSam Leffler 	 * /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@n.example.com
1925b9c547cSRui Paulo 	 *
193780fb4a2SCy Schubert 	 * Note: Since this is a substring match, this cannot be used securely
1945b9c547cSRui Paulo 	 * to do a suffix match against a possible domain name in the CN entry.
1955b9c547cSRui Paulo 	 * For such a use case, domain_suffix_match should be used instead.
19639beb93cSSam Leffler 	 */
1974bc52338SCy Schubert 	char *subject_match;
1984bc52338SCy Schubert 
1994bc52338SCy Schubert 	/**
2004bc52338SCy Schubert 	 * check_cert_subject - Constraint for server certificate subject fields
2014bc52338SCy Schubert 	 *
2024bc52338SCy Schubert 	 * If check_cert_subject is set, the value of every field will be
2034bc52338SCy Schubert 	 * checked against the DN of the subject in the authentication server
2044bc52338SCy Schubert 	 * certificate. If the values do not match, the certificate verification
2054bc52338SCy Schubert 	 * will fail, rejecting the server. This option allows wpa_supplicant to
2064bc52338SCy Schubert 	 * match every individual field in the right order against the DN of the
2074bc52338SCy Schubert 	 * subject in the server certificate.
2084bc52338SCy Schubert 	 *
2094bc52338SCy Schubert 	 * For example, check_cert_subject=C=US/O=XX/OU=ABC/OU=XYZ/CN=1234 will
2104bc52338SCy Schubert 	 * check every individual DN field of the subject in the server
2114bc52338SCy Schubert 	 * certificate. If OU=XYZ comes first in terms of the order in the
2124bc52338SCy Schubert 	 * server certificate (DN field of server certificate
2134bc52338SCy Schubert 	 * C=US/O=XX/OU=XYZ/OU=ABC/CN=1234), wpa_supplicant will reject the
2144bc52338SCy Schubert 	 * server because the order of 'OU' is not matching the specified string
2154bc52338SCy Schubert 	 * in check_cert_subject.
2164bc52338SCy Schubert 	 *
2174bc52338SCy Schubert 	 * This option also allows '*' as a wildcard. This option has some
2184bc52338SCy Schubert 	 * limitation.
2194bc52338SCy Schubert 	 * It can only be used as per the following example.
2204bc52338SCy Schubert 	 *
2214bc52338SCy Schubert 	 * For example, check_cert_subject=C=US/O=XX/OU=Production* and we have
2224bc52338SCy Schubert 	 * two servers and DN of the subject in the first server certificate is
2234bc52338SCy Schubert 	 * (C=US/O=XX/OU=Production Unit) and DN of the subject in the second
2244bc52338SCy Schubert 	 * server is (C=US/O=XX/OU=Production Factory). In this case,
2254bc52338SCy Schubert 	 * wpa_supplicant will allow both servers because the value of 'OU'
2264bc52338SCy Schubert 	 * field in both server certificates matches 'OU' value in
2274bc52338SCy Schubert 	 * 'check_cert_subject' up to 'wildcard'.
2284bc52338SCy Schubert 	 *
2294bc52338SCy Schubert 	 * (Allow all servers, e.g., check_cert_subject=*)
2304bc52338SCy Schubert 	 */
2314bc52338SCy Schubert 	char *check_cert_subject;
2324bc52338SCy Schubert 
2334bc52338SCy Schubert 	/**
2344bc52338SCy Schubert 	 * check_cert_subject2 - Constraint for server certificate subject fields
2354bc52338SCy Schubert 	 *
2364bc52338SCy Schubert 	 * This field is like check_cert_subject, but used for phase 2 (inside
2374bc52338SCy Schubert 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
2384bc52338SCy Schubert 	 */
2394bc52338SCy Schubert 	char *check_cert_subject2;
24039beb93cSSam Leffler 
24139beb93cSSam Leffler 	/**
24239beb93cSSam Leffler 	 * altsubject_match - Constraint for server certificate alt. subject
24339beb93cSSam Leffler 	 *
24439beb93cSSam Leffler 	 * Semicolon separated string of entries to be matched against the
24539beb93cSSam Leffler 	 * alternative subject name of the authentication server certificate.
246780fb4a2SCy Schubert 	 * If this string is set, the server certificate is only accepted if it
24739beb93cSSam Leffler 	 * contains one of the entries in an alternative subject name
24839beb93cSSam Leffler 	 * extension.
24939beb93cSSam Leffler 	 *
25039beb93cSSam Leffler 	 * altSubjectName string is in following format: TYPE:VALUE
25139beb93cSSam Leffler 	 *
25239beb93cSSam Leffler 	 * Example: EMAIL:server@example.com
25339beb93cSSam Leffler 	 * Example: DNS:server.example.com;DNS:server2.example.com
25439beb93cSSam Leffler 	 *
25539beb93cSSam Leffler 	 * Following types are supported: EMAIL, DNS, URI
25639beb93cSSam Leffler 	 */
2574bc52338SCy Schubert 	char *altsubject_match;
25839beb93cSSam Leffler 
25939beb93cSSam Leffler 	/**
2605b9c547cSRui Paulo 	 * domain_suffix_match - Constraint for server domain name
2615b9c547cSRui Paulo 	 *
2624bc52338SCy Schubert 	 * If set, this semicolon deliminated list of FQDNs is used as suffix
2634bc52338SCy Schubert 	 * match requirements for the server certificate in SubjectAltName
2644bc52338SCy Schubert 	 * dNSName element(s). If a matching dNSName is found against any of the
2654bc52338SCy Schubert 	 * specified values, this constraint is met. If no dNSName values are
2664bc52338SCy Schubert 	 * present, this constraint is matched against SubjectName CN using same
2674bc52338SCy Schubert 	 * suffix match comparison. Suffix match here means that the host/domain
2684bc52338SCy Schubert 	 * name is compared case-insentively one label at a time starting from
2694bc52338SCy Schubert 	 * the top-level domain and all the labels in domain_suffix_match shall
2704bc52338SCy Schubert 	 * be included in the certificate. The certificate may include
2714bc52338SCy Schubert 	 * additional sub-level labels in addition to the required labels.
2725b9c547cSRui Paulo 	 *
2735b9c547cSRui Paulo 	 * For example, domain_suffix_match=example.com would match
2744bc52338SCy Schubert 	 * test.example.com but would not match test-example.com. Multiple
2754bc52338SCy Schubert 	 * match options can be specified in following manner:
2764bc52338SCy Schubert 	 * example.org;example.com.
2775b9c547cSRui Paulo 	 */
2785b9c547cSRui Paulo 	char *domain_suffix_match;
2795b9c547cSRui Paulo 
2805b9c547cSRui Paulo 	/**
2815b9c547cSRui Paulo 	 * domain_match - Constraint for server domain name
2825b9c547cSRui Paulo 	 *
2835b9c547cSRui Paulo 	 * If set, this FQDN is used as a full match requirement for the
2845b9c547cSRui Paulo 	 * server certificate in SubjectAltName dNSName element(s). If a
2855b9c547cSRui Paulo 	 * matching dNSName is found, this constraint is met. If no dNSName
2865b9c547cSRui Paulo 	 * values are present, this constraint is matched against SubjectName CN
2875b9c547cSRui Paulo 	 * using same full match comparison. This behavior is similar to
2885b9c547cSRui Paulo 	 * domain_suffix_match, but has the requirement of a full match, i.e.,
2895b9c547cSRui Paulo 	 * no subdomains or wildcard matches are allowed. Case-insensitive
2905b9c547cSRui Paulo 	 * comparison is used, so "Example.com" matches "example.com", but would
2915b9c547cSRui Paulo 	 * not match "test.Example.com".
2924bc52338SCy Schubert 	 *
2934bc52338SCy Schubert 	 * More than one match string can be provided by using semicolons to
2944bc52338SCy Schubert 	 * separate the strings (e.g., example.org;example.com). When multiple
2954bc52338SCy Schubert 	 * strings are specified, a match with any one of the values is
2964bc52338SCy Schubert 	 * considered a sufficient match for the certificate, i.e., the
2974bc52338SCy Schubert 	 * conditions are ORed together.
2985b9c547cSRui Paulo 	 */
2995b9c547cSRui Paulo 	char *domain_match;
3005b9c547cSRui Paulo 
3015b9c547cSRui Paulo 	/**
30239beb93cSSam Leffler 	 * ca_cert2 - File path to CA certificate file (PEM/DER) (Phase 2)
30339beb93cSSam Leffler 	 *
30439beb93cSSam Leffler 	 * This file can have one or more trusted CA certificates. If ca_cert2
30539beb93cSSam Leffler 	 * and ca_path2 are not included, server certificate will not be
30639beb93cSSam Leffler 	 * verified. This is insecure and a trusted CA certificate should
30739beb93cSSam Leffler 	 * always be configured. Full path to the file should be used since
30839beb93cSSam Leffler 	 * working directory may change when wpa_supplicant is run in the
30939beb93cSSam Leffler 	 * background.
31039beb93cSSam Leffler 	 *
31139beb93cSSam Leffler 	 * This field is like ca_cert, but used for phase 2 (inside
31239beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
31339beb93cSSam Leffler 	 *
31439beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
31539beb93cSSam Leffler 	 * this to blob://blob_name.
31639beb93cSSam Leffler 	 */
3174bc52338SCy Schubert 	char *ca_cert2;
31839beb93cSSam Leffler 
31939beb93cSSam Leffler 	/**
32039beb93cSSam Leffler 	 * ca_path2 - Directory path for CA certificate files (PEM) (Phase 2)
32139beb93cSSam Leffler 	 *
32239beb93cSSam Leffler 	 * This path may contain multiple CA certificates in OpenSSL format.
32339beb93cSSam Leffler 	 * Common use for this is to point to system trusted CA list which is
32439beb93cSSam Leffler 	 * often installed into directory like /etc/ssl/certs. If configured,
32539beb93cSSam Leffler 	 * these certificates are added to the list of trusted CAs. ca_cert
32639beb93cSSam Leffler 	 * may also be included in that case, but it is not required.
32739beb93cSSam Leffler 	 *
32839beb93cSSam Leffler 	 * This field is like ca_path, but used for phase 2 (inside
32939beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
33039beb93cSSam Leffler 	 */
3314bc52338SCy Schubert 	char *ca_path2;
33239beb93cSSam Leffler 
33339beb93cSSam Leffler 	/**
33439beb93cSSam Leffler 	 * client_cert2 - File path to client certificate file
33539beb93cSSam Leffler 	 *
33639beb93cSSam Leffler 	 * This field is like client_cert, but used for phase 2 (inside
33739beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
33839beb93cSSam Leffler 	 * file should be used since working directory may change when
33939beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
34039beb93cSSam Leffler 	 *
34139beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
34239beb93cSSam Leffler 	 * this to blob://blob_name.
34339beb93cSSam Leffler 	 */
3444bc52338SCy Schubert 	char *client_cert2;
34539beb93cSSam Leffler 
34639beb93cSSam Leffler 	/**
34739beb93cSSam Leffler 	 * private_key2 - File path to client private key file
34839beb93cSSam Leffler 	 *
34939beb93cSSam Leffler 	 * This field is like private_key, but used for phase 2 (inside
35039beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
35139beb93cSSam Leffler 	 * file should be used since working directory may change when
35239beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
35339beb93cSSam Leffler 	 *
35439beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
35539beb93cSSam Leffler 	 * this to blob://blob_name.
35639beb93cSSam Leffler 	 */
3574bc52338SCy Schubert 	char *private_key2;
35839beb93cSSam Leffler 
35939beb93cSSam Leffler 	/**
36039beb93cSSam Leffler 	 * private_key2_passwd -  Password for private key file
36139beb93cSSam Leffler 	 *
36239beb93cSSam Leffler 	 * This field is like private_key_passwd, but used for phase 2 (inside
36339beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
36439beb93cSSam Leffler 	 */
3655b9c547cSRui Paulo 	char *private_key2_passwd;
36639beb93cSSam Leffler 
36739beb93cSSam Leffler 	/**
36839beb93cSSam Leffler 	 * dh_file2 - File path to DH/DSA parameters file (in PEM format)
36939beb93cSSam Leffler 	 *
37039beb93cSSam Leffler 	 * This field is like dh_file, but used for phase 2 (inside
37139beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
37239beb93cSSam Leffler 	 * file should be used since working directory may change when
37339beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
37439beb93cSSam Leffler 	 *
37539beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
37639beb93cSSam Leffler 	 * this to blob://blob_name.
37739beb93cSSam Leffler 	 */
3784bc52338SCy Schubert 	char *dh_file2;
37939beb93cSSam Leffler 
38039beb93cSSam Leffler 	/**
38139beb93cSSam Leffler 	 * subject_match2 - Constraint for server certificate subject
38239beb93cSSam Leffler 	 *
38339beb93cSSam Leffler 	 * This field is like subject_match, but used for phase 2 (inside
38439beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
38539beb93cSSam Leffler 	 */
3864bc52338SCy Schubert 	char *subject_match2;
38739beb93cSSam Leffler 
38839beb93cSSam Leffler 	/**
38939beb93cSSam Leffler 	 * altsubject_match2 - Constraint for server certificate alt. subject
39039beb93cSSam Leffler 	 *
39139beb93cSSam Leffler 	 * This field is like altsubject_match, but used for phase 2 (inside
39239beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
39339beb93cSSam Leffler 	 */
3944bc52338SCy Schubert 	char *altsubject_match2;
39539beb93cSSam Leffler 
39639beb93cSSam Leffler 	/**
3975b9c547cSRui Paulo 	 * domain_suffix_match2 - Constraint for server domain name
3985b9c547cSRui Paulo 	 *
3995b9c547cSRui Paulo 	 * This field is like domain_suffix_match, but used for phase 2 (inside
4005b9c547cSRui Paulo 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
4015b9c547cSRui Paulo 	 */
4025b9c547cSRui Paulo 	char *domain_suffix_match2;
4035b9c547cSRui Paulo 
4045b9c547cSRui Paulo 	/**
4055b9c547cSRui Paulo 	 * domain_match2 - Constraint for server domain name
4065b9c547cSRui Paulo 	 *
4075b9c547cSRui Paulo 	 * This field is like domain_match, but used for phase 2 (inside
4085b9c547cSRui Paulo 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
4095b9c547cSRui Paulo 	 */
4105b9c547cSRui Paulo 	char *domain_match2;
4115b9c547cSRui Paulo 
4125b9c547cSRui Paulo 	/**
41339beb93cSSam Leffler 	 * eap_methods - Allowed EAP methods
41439beb93cSSam Leffler 	 *
41539beb93cSSam Leffler 	 * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
41639beb93cSSam Leffler 	 * allowed EAP methods or %NULL if all methods are accepted.
41739beb93cSSam Leffler 	 */
41839beb93cSSam Leffler 	struct eap_method_type *eap_methods;
41939beb93cSSam Leffler 
42039beb93cSSam Leffler 	/**
42139beb93cSSam Leffler 	 * phase1 - Phase 1 (outer authentication) parameters
42239beb93cSSam Leffler 	 *
42339beb93cSSam Leffler 	 * String with field-value pairs, e.g., "peapver=0" or
42439beb93cSSam Leffler 	 * "peapver=1 peaplabel=1".
42539beb93cSSam Leffler 	 *
42639beb93cSSam Leffler 	 * 'peapver' can be used to force which PEAP version (0 or 1) is used.
42739beb93cSSam Leffler 	 *
42839beb93cSSam Leffler 	 * 'peaplabel=1' can be used to force new label, "client PEAP
42939beb93cSSam Leffler 	 * encryption",	to be used during key derivation when PEAPv1 or newer.
43039beb93cSSam Leffler 	 *
43139beb93cSSam Leffler 	 * Most existing PEAPv1 implementation seem to be using the old label,
43239beb93cSSam Leffler 	 * "client EAP encryption", and wpa_supplicant is now using that as the
43339beb93cSSam Leffler 	 * default value.
43439beb93cSSam Leffler 	 *
43539beb93cSSam Leffler 	 * Some servers, e.g., Radiator, may require peaplabel=1 configuration
43639beb93cSSam Leffler 	 * to interoperate with PEAPv1; see eap_testing.txt for more details.
43739beb93cSSam Leffler 	 *
43839beb93cSSam Leffler 	 * 'peap_outer_success=0' can be used to terminate PEAP authentication
43939beb93cSSam Leffler 	 * on tunneled EAP-Success. This is required with some RADIUS servers
44039beb93cSSam Leffler 	 * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
44139beb93cSSam Leffler 	 * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
44239beb93cSSam Leffler 	 *
44339beb93cSSam Leffler 	 * include_tls_length=1 can be used to force wpa_supplicant to include
44439beb93cSSam Leffler 	 * TLS Message Length field in all TLS messages even if they are not
44539beb93cSSam Leffler 	 * fragmented.
44639beb93cSSam Leffler 	 *
44739beb93cSSam Leffler 	 * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
44839beb93cSSam Leffler 	 * challenges (by default, it accepts 2 or 3).
44939beb93cSSam Leffler 	 *
45039beb93cSSam Leffler 	 * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
45139beb93cSSam Leffler 	 * protected result indication.
45239beb93cSSam Leffler 	 *
45339beb93cSSam Leffler 	 * fast_provisioning option can be used to enable in-line provisioning
45439beb93cSSam Leffler 	 * of EAP-FAST credentials (PAC):
45539beb93cSSam Leffler 	 * 0 = disabled,
45639beb93cSSam Leffler 	 * 1 = allow unauthenticated provisioning,
45739beb93cSSam Leffler 	 * 2 = allow authenticated provisioning,
45839beb93cSSam Leffler 	 * 3 = allow both unauthenticated and authenticated provisioning
45939beb93cSSam Leffler 	 *
46039beb93cSSam Leffler 	 * fast_max_pac_list_len=num option can be used to set the maximum
46139beb93cSSam Leffler 	 * number of PAC entries to store in a PAC list (default: 10).
46239beb93cSSam Leffler 	 *
46339beb93cSSam Leffler 	 * fast_pac_format=binary option can be used to select binary format
46439beb93cSSam Leffler 	 * for storing PAC entries in order to save some space (the default
46539beb93cSSam Leffler 	 * text format uses about 2.5 times the size of minimal binary format).
46639beb93cSSam Leffler 	 *
46739beb93cSSam Leffler 	 * crypto_binding option can be used to control PEAPv0 cryptobinding
46839beb93cSSam Leffler 	 * behavior:
46939beb93cSSam Leffler 	 * 0 = do not use cryptobinding (default)
47039beb93cSSam Leffler 	 * 1 = use cryptobinding if server supports it
47139beb93cSSam Leffler 	 * 2 = require cryptobinding
47239beb93cSSam Leffler 	 *
47339beb93cSSam Leffler 	 * EAP-WSC (WPS) uses following options: pin=Device_Password and
47439beb93cSSam Leffler 	 * uuid=Device_UUID
4755b9c547cSRui Paulo 	 *
4765b9c547cSRui Paulo 	 * For wired IEEE 802.1X authentication, "allow_canned_success=1" can be
4775b9c547cSRui Paulo 	 * used to configure a mode that allows EAP-Success (and EAP-Failure)
4785b9c547cSRui Paulo 	 * without going through authentication step. Some switches use such
4795b9c547cSRui Paulo 	 * sequence when forcing the port to be authorized/unauthorized or as a
4805b9c547cSRui Paulo 	 * fallback option if the authentication server is unreachable. By
4815b9c547cSRui Paulo 	 * default, wpa_supplicant discards such frames to protect against
4825b9c547cSRui Paulo 	 * potential attacks by rogue devices, but this option can be used to
4835b9c547cSRui Paulo 	 * disable that protection for cases where the server/authenticator does
4845b9c547cSRui Paulo 	 * not need to be authenticated.
48539beb93cSSam Leffler 	 */
48639beb93cSSam Leffler 	char *phase1;
48739beb93cSSam Leffler 
48839beb93cSSam Leffler 	/**
48939beb93cSSam Leffler 	 * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
49039beb93cSSam Leffler 	 *
49139beb93cSSam Leffler 	 * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
4925b9c547cSRui Paulo 	 * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can
4935b9c547cSRui Paulo 	 * be used to disable MSCHAPv2 password retry in authentication failure
4945b9c547cSRui Paulo 	 * cases.
49539beb93cSSam Leffler 	 */
49639beb93cSSam Leffler 	char *phase2;
49739beb93cSSam Leffler 
49839beb93cSSam Leffler 	/**
49939beb93cSSam Leffler 	 * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
50039beb93cSSam Leffler 	 *
50139beb93cSSam Leffler 	 * This field is used to configure PC/SC smartcard interface.
50239beb93cSSam Leffler 	 * Currently, the only configuration is whether this field is %NULL (do
50339beb93cSSam Leffler 	 * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
50439beb93cSSam Leffler 	 *
50539beb93cSSam Leffler 	 * This field is used for EAP-SIM and EAP-AKA.
50639beb93cSSam Leffler 	 */
50739beb93cSSam Leffler 	char *pcsc;
50839beb93cSSam Leffler 
50939beb93cSSam Leffler 	/**
51039beb93cSSam Leffler 	 * pin - PIN for USIM, GSM SIM, and smartcards
51139beb93cSSam Leffler 	 *
51239beb93cSSam Leffler 	 * This field is used to configure PIN for SIM and smartcards for
51339beb93cSSam Leffler 	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
51439beb93cSSam Leffler 	 * smartcard is used for private key operations.
51539beb93cSSam Leffler 	 *
51639beb93cSSam Leffler 	 * If left out, this will be asked through control interface.
51739beb93cSSam Leffler 	 */
51839beb93cSSam Leffler 	char *pin;
51939beb93cSSam Leffler 
52039beb93cSSam Leffler 	/**
52139beb93cSSam Leffler 	 * engine - Enable OpenSSL engine (e.g., for smartcard access)
52239beb93cSSam Leffler 	 *
52339beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
52439beb93cSSam Leffler 	 * using a smartcard.
52539beb93cSSam Leffler 	 */
52639beb93cSSam Leffler 	int engine;
52739beb93cSSam Leffler 
52839beb93cSSam Leffler 	/**
52939beb93cSSam Leffler 	 * engine_id - Engine ID for OpenSSL engine
53039beb93cSSam Leffler 	 *
53139beb93cSSam Leffler 	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
53239beb93cSSam Leffler 	 * engine.
53339beb93cSSam Leffler 	 *
53439beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
53539beb93cSSam Leffler 	 * using a smartcard.
53639beb93cSSam Leffler 	 */
53739beb93cSSam Leffler 	char *engine_id;
53839beb93cSSam Leffler 
53939beb93cSSam Leffler 	/**
54039beb93cSSam Leffler 	 * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2)
54139beb93cSSam Leffler 	 *
54239beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
54339beb93cSSam Leffler 	 * using a smartcard.
54439beb93cSSam Leffler 	 *
54539beb93cSSam Leffler 	 * This field is like engine, but used for phase 2 (inside
54639beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
54739beb93cSSam Leffler 	 */
54839beb93cSSam Leffler 	int engine2;
54939beb93cSSam Leffler 
55039beb93cSSam Leffler 
55139beb93cSSam Leffler 	/**
55239beb93cSSam Leffler 	 * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2)
55339beb93cSSam Leffler 	 *
55439beb93cSSam Leffler 	 * This field is used to configure PIN for SIM and smartcards for
55539beb93cSSam Leffler 	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
55639beb93cSSam Leffler 	 * smartcard is used for private key operations.
55739beb93cSSam Leffler 	 *
55839beb93cSSam Leffler 	 * This field is like pin2, but used for phase 2 (inside
55939beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
56039beb93cSSam Leffler 	 *
56139beb93cSSam Leffler 	 * If left out, this will be asked through control interface.
56239beb93cSSam Leffler 	 */
56339beb93cSSam Leffler 	char *pin2;
56439beb93cSSam Leffler 
56539beb93cSSam Leffler 	/**
56639beb93cSSam Leffler 	 * engine2_id - Engine ID for OpenSSL engine (Phase 2)
56739beb93cSSam Leffler 	 *
56839beb93cSSam Leffler 	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
56939beb93cSSam Leffler 	 * engine.
57039beb93cSSam Leffler 	 *
57139beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
57239beb93cSSam Leffler 	 * using a smartcard.
57339beb93cSSam Leffler 	 *
57439beb93cSSam Leffler 	 * This field is like engine_id, but used for phase 2 (inside
57539beb93cSSam Leffler 	 * EAP-TTLS/PEAP/FAST tunnel) authentication.
57639beb93cSSam Leffler 	 */
57739beb93cSSam Leffler 	char *engine2_id;
57839beb93cSSam Leffler 
57939beb93cSSam Leffler 
58039beb93cSSam Leffler 	/**
58139beb93cSSam Leffler 	 * key_id - Key ID for OpenSSL engine
58239beb93cSSam Leffler 	 *
58339beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
58439beb93cSSam Leffler 	 * using a smartcard.
58539beb93cSSam Leffler 	 */
58639beb93cSSam Leffler 	char *key_id;
58739beb93cSSam Leffler 
58839beb93cSSam Leffler 	/**
58939beb93cSSam Leffler 	 * cert_id - Cert ID for OpenSSL engine
59039beb93cSSam Leffler 	 *
59139beb93cSSam Leffler 	 * This is used if the certificate operations for EAP-TLS are performed
59239beb93cSSam Leffler 	 * using a smartcard.
59339beb93cSSam Leffler 	 */
59439beb93cSSam Leffler 	char *cert_id;
59539beb93cSSam Leffler 
59639beb93cSSam Leffler 	/**
59739beb93cSSam Leffler 	 * ca_cert_id - CA Cert ID for OpenSSL engine
59839beb93cSSam Leffler 	 *
59939beb93cSSam Leffler 	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
60039beb93cSSam Leffler 	 */
60139beb93cSSam Leffler 	char *ca_cert_id;
60239beb93cSSam Leffler 
60339beb93cSSam Leffler 	/**
60439beb93cSSam Leffler 	 * key2_id - Key ID for OpenSSL engine (phase2)
60539beb93cSSam Leffler 	 *
60639beb93cSSam Leffler 	 * This is used if private key operations for EAP-TLS are performed
60739beb93cSSam Leffler 	 * using a smartcard.
60839beb93cSSam Leffler 	 */
60939beb93cSSam Leffler 	char *key2_id;
61039beb93cSSam Leffler 
61139beb93cSSam Leffler 	/**
61239beb93cSSam Leffler 	 * cert2_id - Cert ID for OpenSSL engine (phase2)
61339beb93cSSam Leffler 	 *
61439beb93cSSam Leffler 	 * This is used if the certificate operations for EAP-TLS are performed
61539beb93cSSam Leffler 	 * using a smartcard.
61639beb93cSSam Leffler 	 */
61739beb93cSSam Leffler 	char *cert2_id;
61839beb93cSSam Leffler 
61939beb93cSSam Leffler 	/**
62039beb93cSSam Leffler 	 * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
62139beb93cSSam Leffler 	 *
62239beb93cSSam Leffler 	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
62339beb93cSSam Leffler 	 */
62439beb93cSSam Leffler 	char *ca_cert2_id;
62539beb93cSSam Leffler 
62639beb93cSSam Leffler 	/**
62739beb93cSSam Leffler 	 * otp - One-time-password
62839beb93cSSam Leffler 	 *
62939beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
63039beb93cSSam Leffler 	 * internally when OTP is entered through the control interface.
63139beb93cSSam Leffler 	 */
63239beb93cSSam Leffler 	u8 *otp;
63339beb93cSSam Leffler 
63439beb93cSSam Leffler 	/**
63539beb93cSSam Leffler 	 * otp_len - Length of the otp field
63639beb93cSSam Leffler 	 */
63739beb93cSSam Leffler 	size_t otp_len;
63839beb93cSSam Leffler 
63939beb93cSSam Leffler 	/**
64039beb93cSSam Leffler 	 * pending_req_identity - Whether there is a pending identity request
64139beb93cSSam Leffler 	 *
64239beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
64339beb93cSSam Leffler 	 * internally when control interface is used to request needed
64439beb93cSSam Leffler 	 * information.
64539beb93cSSam Leffler 	 */
64639beb93cSSam Leffler 	int pending_req_identity;
64739beb93cSSam Leffler 
64839beb93cSSam Leffler 	/**
64939beb93cSSam Leffler 	 * pending_req_password - Whether there is a pending password request
65039beb93cSSam Leffler 	 *
65139beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
65239beb93cSSam Leffler 	 * internally when control interface is used to request needed
65339beb93cSSam Leffler 	 * information.
65439beb93cSSam Leffler 	 */
65539beb93cSSam Leffler 	int pending_req_password;
65639beb93cSSam Leffler 
65739beb93cSSam Leffler 	/**
65839beb93cSSam Leffler 	 * pending_req_pin - Whether there is a pending PIN request
65939beb93cSSam Leffler 	 *
66039beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
66139beb93cSSam Leffler 	 * internally when control interface is used to request needed
66239beb93cSSam Leffler 	 * information.
66339beb93cSSam Leffler 	 */
66439beb93cSSam Leffler 	int pending_req_pin;
66539beb93cSSam Leffler 
66639beb93cSSam Leffler 	/**
66739beb93cSSam Leffler 	 * pending_req_new_password - Pending password update request
66839beb93cSSam Leffler 	 *
66939beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
67039beb93cSSam Leffler 	 * internally when control interface is used to request needed
67139beb93cSSam Leffler 	 * information.
67239beb93cSSam Leffler 	 */
67339beb93cSSam Leffler 	int pending_req_new_password;
67439beb93cSSam Leffler 
67539beb93cSSam Leffler 	/**
67639beb93cSSam Leffler 	 * pending_req_passphrase - Pending passphrase request
67739beb93cSSam Leffler 	 *
67839beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
67939beb93cSSam Leffler 	 * internally when control interface is used to request needed
68039beb93cSSam Leffler 	 * information.
68139beb93cSSam Leffler 	 */
68239beb93cSSam Leffler 	int pending_req_passphrase;
68339beb93cSSam Leffler 
68439beb93cSSam Leffler 	/**
68585732ac8SCy Schubert 	 * pending_req_sim - Pending SIM request
68685732ac8SCy Schubert 	 *
68785732ac8SCy Schubert 	 * This field should not be set in configuration step. It is only used
68885732ac8SCy Schubert 	 * internally when control interface is used to request needed
68985732ac8SCy Schubert 	 * information.
69085732ac8SCy Schubert 	 */
69185732ac8SCy Schubert 	int pending_req_sim;
69285732ac8SCy Schubert 
69385732ac8SCy Schubert 	/**
69439beb93cSSam Leffler 	 * pending_req_otp - Whether there is a pending OTP request
69539beb93cSSam Leffler 	 *
69639beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
69739beb93cSSam Leffler 	 * internally when control interface is used to request needed
69839beb93cSSam Leffler 	 * information.
69939beb93cSSam Leffler 	 */
70039beb93cSSam Leffler 	char *pending_req_otp;
70139beb93cSSam Leffler 
70239beb93cSSam Leffler 	/**
70339beb93cSSam Leffler 	 * pending_req_otp_len - Length of the pending OTP request
70439beb93cSSam Leffler 	 */
70539beb93cSSam Leffler 	size_t pending_req_otp_len;
70639beb93cSSam Leffler 
70739beb93cSSam Leffler 	/**
70839beb93cSSam Leffler 	 * pac_file - File path or blob name for the PAC entries (EAP-FAST)
70939beb93cSSam Leffler 	 *
71039beb93cSSam Leffler 	 * wpa_supplicant will need to be able to create this file and write
71139beb93cSSam Leffler 	 * updates to it when PAC is being provisioned or refreshed. Full path
71239beb93cSSam Leffler 	 * to the file should be used since working directory may change when
71339beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
71439beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
71539beb93cSSam Leffler 	 * this to blob://blob_name.
71639beb93cSSam Leffler 	 */
71739beb93cSSam Leffler 	char *pac_file;
71839beb93cSSam Leffler 
71939beb93cSSam Leffler 	/**
72039beb93cSSam Leffler 	 * mschapv2_retry - MSCHAPv2 retry in progress
72139beb93cSSam Leffler 	 *
72239beb93cSSam Leffler 	 * This field is used internally by EAP-MSCHAPv2 and should not be set
72339beb93cSSam Leffler 	 * as part of configuration.
72439beb93cSSam Leffler 	 */
72539beb93cSSam Leffler 	int mschapv2_retry;
72639beb93cSSam Leffler 
72739beb93cSSam Leffler 	/**
72839beb93cSSam Leffler 	 * new_password - New password for password update
72939beb93cSSam Leffler 	 *
73039beb93cSSam Leffler 	 * This field is used during MSCHAPv2 password update. This is normally
73139beb93cSSam Leffler 	 * requested from the user through the control interface and not set
73239beb93cSSam Leffler 	 * from configuration.
73339beb93cSSam Leffler 	 */
73439beb93cSSam Leffler 	u8 *new_password;
73539beb93cSSam Leffler 
73639beb93cSSam Leffler 	/**
73739beb93cSSam Leffler 	 * new_password_len - Length of new_password field
73839beb93cSSam Leffler 	 */
73939beb93cSSam Leffler 	size_t new_password_len;
74039beb93cSSam Leffler 
74139beb93cSSam Leffler 	/**
74239beb93cSSam Leffler 	 * fragment_size - Maximum EAP fragment size in bytes (default 1398)
74339beb93cSSam Leffler 	 *
74439beb93cSSam Leffler 	 * This value limits the fragment size for EAP methods that support
74539beb93cSSam Leffler 	 * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
74639beb93cSSam Leffler 	 * small enough to make the EAP messages fit in MTU of the network
74739beb93cSSam Leffler 	 * interface used for EAPOL. The default value is suitable for most
74839beb93cSSam Leffler 	 * cases.
74939beb93cSSam Leffler 	 */
75039beb93cSSam Leffler 	int fragment_size;
75139beb93cSSam Leffler 
75239beb93cSSam Leffler #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
753f05cddf9SRui Paulo #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
75439beb93cSSam Leffler 	/**
75539beb93cSSam Leffler 	 * flags - Network configuration flags (bitfield)
75639beb93cSSam Leffler 	 *
75739beb93cSSam Leffler 	 * This variable is used for internal flags to describe further details
75839beb93cSSam Leffler 	 * for the network parameters.
75939beb93cSSam Leffler 	 * bit 0 = password is represented as a 16-byte NtPasswordHash value
76039beb93cSSam Leffler 	 *         instead of plaintext password
761f05cddf9SRui Paulo 	 * bit 1 = password is stored in external storage; the value in the
762f05cddf9SRui Paulo 	 *         password field is the name of that external entry
76339beb93cSSam Leffler 	 */
76439beb93cSSam Leffler 	u32 flags;
7655b9c547cSRui Paulo 
7665b9c547cSRui Paulo 	/**
7675b9c547cSRui Paulo 	 * ocsp - Whether to use/require OCSP to check server certificate
7685b9c547cSRui Paulo 	 *
7695b9c547cSRui Paulo 	 * 0 = do not use OCSP stapling (TLS certificate status extension)
7705b9c547cSRui Paulo 	 * 1 = try to use OCSP stapling, but not require response
7715b9c547cSRui Paulo 	 * 2 = require valid OCSP stapling response
7725b9c547cSRui Paulo 	 */
7735b9c547cSRui Paulo 	int ocsp;
7745b9c547cSRui Paulo 
7755b9c547cSRui Paulo 	/**
7765b9c547cSRui Paulo 	 * external_sim_resp - Response from external SIM processing
7775b9c547cSRui Paulo 	 *
7785b9c547cSRui Paulo 	 * This field should not be set in configuration step. It is only used
7795b9c547cSRui Paulo 	 * internally when control interface is used to request external
7805b9c547cSRui Paulo 	 * SIM/USIM processing.
7815b9c547cSRui Paulo 	 */
7825b9c547cSRui Paulo 	char *external_sim_resp;
7835b9c547cSRui Paulo 
7845b9c547cSRui Paulo 	/**
7855b9c547cSRui Paulo 	 * sim_num - User selected SIM identifier
7865b9c547cSRui Paulo 	 *
7875b9c547cSRui Paulo 	 * This variable is used for identifying which SIM is used if the system
7885b9c547cSRui Paulo 	 * has more than one.
7895b9c547cSRui Paulo 	 */
7905b9c547cSRui Paulo 	int sim_num;
7915b9c547cSRui Paulo 
7925b9c547cSRui Paulo 	/**
7935b9c547cSRui Paulo 	 * openssl_ciphers - OpenSSL cipher string
7945b9c547cSRui Paulo 	 *
7955b9c547cSRui Paulo 	 * This is an OpenSSL specific configuration option for configuring the
7965b9c547cSRui Paulo 	 * ciphers for this connection. If not set, the default cipher suite
7975b9c547cSRui Paulo 	 * list is used.
7985b9c547cSRui Paulo 	 */
7995b9c547cSRui Paulo 	char *openssl_ciphers;
8005b9c547cSRui Paulo 
8015b9c547cSRui Paulo 	/**
8025b9c547cSRui Paulo 	 * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
8035b9c547cSRui Paulo 	 */
8045b9c547cSRui Paulo 	int erp;
805780fb4a2SCy Schubert 
806780fb4a2SCy Schubert 	/**
807780fb4a2SCy Schubert 	 * pending_ext_cert_check - External server certificate check status
808780fb4a2SCy Schubert 	 *
809780fb4a2SCy Schubert 	 * This field should not be set in configuration step. It is only used
810780fb4a2SCy Schubert 	 * internally when control interface is used to request external
811780fb4a2SCy Schubert 	 * validation of server certificate chain.
812780fb4a2SCy Schubert 	 */
813780fb4a2SCy Schubert 	enum {
814780fb4a2SCy Schubert 		NO_CHECK = 0,
815780fb4a2SCy Schubert 		PENDING_CHECK,
816780fb4a2SCy Schubert 		EXT_CERT_CHECK_GOOD,
817780fb4a2SCy Schubert 		EXT_CERT_CHECK_BAD,
818780fb4a2SCy Schubert 	} pending_ext_cert_check;
819*206b73d0SCy Schubert 
820*206b73d0SCy Schubert 	int teap_anon_dh;
82139beb93cSSam Leffler };
82239beb93cSSam Leffler 
82339beb93cSSam Leffler 
82439beb93cSSam Leffler /**
82539beb93cSSam Leffler  * struct wpa_config_blob - Named configuration blob
82639beb93cSSam Leffler  *
82739beb93cSSam Leffler  * This data structure is used to provide storage for binary objects to store
82839beb93cSSam Leffler  * abstract information like certificates and private keys inlined with the
82939beb93cSSam Leffler  * configuration data.
83039beb93cSSam Leffler  */
83139beb93cSSam Leffler struct wpa_config_blob {
83239beb93cSSam Leffler 	/**
83339beb93cSSam Leffler 	 * name - Blob name
83439beb93cSSam Leffler 	 */
83539beb93cSSam Leffler 	char *name;
83639beb93cSSam Leffler 
83739beb93cSSam Leffler 	/**
83839beb93cSSam Leffler 	 * data - Pointer to binary data
83939beb93cSSam Leffler 	 */
84039beb93cSSam Leffler 	u8 *data;
84139beb93cSSam Leffler 
84239beb93cSSam Leffler 	/**
84339beb93cSSam Leffler 	 * len - Length of binary data
84439beb93cSSam Leffler 	 */
84539beb93cSSam Leffler 	size_t len;
84639beb93cSSam Leffler 
84739beb93cSSam Leffler 	/**
84839beb93cSSam Leffler 	 * next - Pointer to next blob in the configuration
84939beb93cSSam Leffler 	 */
85039beb93cSSam Leffler 	struct wpa_config_blob *next;
85139beb93cSSam Leffler };
85239beb93cSSam Leffler 
85339beb93cSSam Leffler #endif /* EAP_CONFIG_H */
854