xref: /freebsd/contrib/wpa/src/eap_peer/eap_config.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
139beb93cSSam Leffler /*
239beb93cSSam Leffler  * EAP peer configuration data
3c1d255d3SCy Schubert  * Copyright (c) 2003-2019, 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 /**
13c1d255d3SCy Schubert  * struct eap_peer_cert_config - EAP peer certificate configuration/credential
1439beb93cSSam Leffler  */
15c1d255d3SCy Schubert struct eap_peer_cert_config {
1639beb93cSSam Leffler 	/**
1739beb93cSSam Leffler 	 * ca_cert - File path to CA certificate file (PEM/DER)
1839beb93cSSam Leffler 	 *
1939beb93cSSam Leffler 	 * This file can have one or more trusted CA certificates. If ca_cert
2039beb93cSSam Leffler 	 * and ca_path are not included, server certificate will not be
2139beb93cSSam Leffler 	 * verified. This is insecure and a trusted CA certificate should
2239beb93cSSam Leffler 	 * always be configured when using EAP-TLS/TTLS/PEAP. Full path to the
2339beb93cSSam Leffler 	 * file should be used since working directory may change when
2439beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
2539beb93cSSam Leffler 	 *
2639beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
2739beb93cSSam Leffler 	 * this to blob://blob_name.
2839beb93cSSam Leffler 	 *
29e28a4053SRui Paulo 	 * Alternatively, this can be used to only perform matching of the
30e28a4053SRui Paulo 	 * server certificate (SHA-256 hash of the DER encoded X.509
31e28a4053SRui Paulo 	 * certificate). In this case, the possible CA certificates in the
32e28a4053SRui Paulo 	 * server certificate chain are ignored and only the server certificate
33e28a4053SRui Paulo 	 * is verified. This is configured with the following format:
34e28a4053SRui Paulo 	 * hash:://server/sha256/cert_hash_in_hex
35e28a4053SRui Paulo 	 * For example: "hash://server/sha256/
36e28a4053SRui Paulo 	 * 5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a"
37e28a4053SRui Paulo 	 *
3839beb93cSSam Leffler 	 * On Windows, trusted CA certificates can be loaded from the system
3939beb93cSSam Leffler 	 * certificate store by setting this to cert_store://name, e.g.,
4039beb93cSSam Leffler 	 * ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT".
4139beb93cSSam Leffler 	 * Note that when running wpa_supplicant as an application, the user
4239beb93cSSam Leffler 	 * certificate store (My user account) is used, whereas computer store
4339beb93cSSam Leffler 	 * (Computer account) is used when running wpasvc as a service.
4439beb93cSSam Leffler 	 */
454bc52338SCy Schubert 	char *ca_cert;
4639beb93cSSam Leffler 
4739beb93cSSam Leffler 	/**
4839beb93cSSam Leffler 	 * ca_path - Directory path for CA certificate files (PEM)
4939beb93cSSam Leffler 	 *
5039beb93cSSam Leffler 	 * This path may contain multiple CA certificates in OpenSSL format.
5139beb93cSSam Leffler 	 * Common use for this is to point to system trusted CA list which is
5239beb93cSSam Leffler 	 * often installed into directory like /etc/ssl/certs. If configured,
5339beb93cSSam Leffler 	 * these certificates are added to the list of trusted CAs. ca_cert
5439beb93cSSam Leffler 	 * may also be included in that case, but it is not required.
5539beb93cSSam Leffler 	 */
564bc52338SCy Schubert 	char *ca_path;
5739beb93cSSam Leffler 
5839beb93cSSam Leffler 	/**
5939beb93cSSam Leffler 	 * client_cert - File path to client certificate file (PEM/DER)
6039beb93cSSam Leffler 	 *
6139beb93cSSam Leffler 	 * This field is used with EAP method that use TLS authentication.
6239beb93cSSam Leffler 	 * Usually, this is only configured for EAP-TLS, even though this could
6339beb93cSSam Leffler 	 * in theory be used with EAP-TTLS and EAP-PEAP, too. Full path to the
6439beb93cSSam Leffler 	 * file should be used since working directory may change when
6539beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
6639beb93cSSam Leffler 	 *
6739beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
6839beb93cSSam Leffler 	 * this to blob://blob_name.
6939beb93cSSam Leffler 	 */
704bc52338SCy Schubert 	char *client_cert;
7139beb93cSSam Leffler 
7239beb93cSSam Leffler 	/**
7339beb93cSSam Leffler 	 * private_key - File path to client private key file (PEM/DER/PFX)
7439beb93cSSam Leffler 	 *
7539beb93cSSam Leffler 	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
7639beb93cSSam Leffler 	 * commented out. Both the private key and certificate will be read
7739beb93cSSam Leffler 	 * from the PKCS#12 file in this case. Full path to the file should be
7839beb93cSSam Leffler 	 * used since working directory may change when wpa_supplicant is run
7939beb93cSSam Leffler 	 * in the background.
8039beb93cSSam Leffler 	 *
8139beb93cSSam Leffler 	 * Windows certificate store can be used by leaving client_cert out and
8239beb93cSSam Leffler 	 * configuring private_key in one of the following formats:
8339beb93cSSam Leffler 	 *
8439beb93cSSam Leffler 	 * cert://substring_to_match
8539beb93cSSam Leffler 	 *
8639beb93cSSam Leffler 	 * hash://certificate_thumbprint_in_hex
8739beb93cSSam Leffler 	 *
8839beb93cSSam Leffler 	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
8939beb93cSSam Leffler 	 *
9039beb93cSSam Leffler 	 * Note that when running wpa_supplicant as an application, the user
9139beb93cSSam Leffler 	 * certificate store (My user account) is used, whereas computer store
9239beb93cSSam Leffler 	 * (Computer account) is used when running wpasvc as a service.
9339beb93cSSam Leffler 	 *
9439beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
9539beb93cSSam Leffler 	 * this to blob://blob_name.
9639beb93cSSam Leffler 	 */
974bc52338SCy Schubert 	char *private_key;
9839beb93cSSam Leffler 
9939beb93cSSam Leffler 	/**
10039beb93cSSam Leffler 	 * private_key_passwd - Password for private key file
10139beb93cSSam Leffler 	 *
10239beb93cSSam Leffler 	 * If left out, this will be asked through control interface.
10339beb93cSSam Leffler 	 */
1045b9c547cSRui Paulo 	char *private_key_passwd;
10539beb93cSSam Leffler 
10639beb93cSSam Leffler 	/**
10739beb93cSSam Leffler 	 * subject_match - Constraint for server certificate subject
10839beb93cSSam Leffler 	 *
10939beb93cSSam Leffler 	 * This substring is matched against the subject of the authentication
110780fb4a2SCy Schubert 	 * server certificate. If this string is set, the server certificate is
11139beb93cSSam Leffler 	 * only accepted if it contains this string in the subject. The subject
11239beb93cSSam Leffler 	 * string is in following format:
11339beb93cSSam Leffler 	 *
11439beb93cSSam Leffler 	 * /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@n.example.com
1155b9c547cSRui Paulo 	 *
116780fb4a2SCy Schubert 	 * Note: Since this is a substring match, this cannot be used securely
1175b9c547cSRui Paulo 	 * to do a suffix match against a possible domain name in the CN entry.
1185b9c547cSRui Paulo 	 * For such a use case, domain_suffix_match should be used instead.
11939beb93cSSam Leffler 	 */
1204bc52338SCy Schubert 	char *subject_match;
1214bc52338SCy Schubert 
1224bc52338SCy Schubert 	/**
1234bc52338SCy Schubert 	 * check_cert_subject - Constraint for server certificate subject fields
1244bc52338SCy Schubert 	 *
1254bc52338SCy Schubert 	 * If check_cert_subject is set, the value of every field will be
1264bc52338SCy Schubert 	 * checked against the DN of the subject in the authentication server
1274bc52338SCy Schubert 	 * certificate. If the values do not match, the certificate verification
1284bc52338SCy Schubert 	 * will fail, rejecting the server. This option allows wpa_supplicant to
1294bc52338SCy Schubert 	 * match every individual field in the right order against the DN of the
1304bc52338SCy Schubert 	 * subject in the server certificate.
1314bc52338SCy Schubert 	 *
1324bc52338SCy Schubert 	 * For example, check_cert_subject=C=US/O=XX/OU=ABC/OU=XYZ/CN=1234 will
1334bc52338SCy Schubert 	 * check every individual DN field of the subject in the server
1344bc52338SCy Schubert 	 * certificate. If OU=XYZ comes first in terms of the order in the
1354bc52338SCy Schubert 	 * server certificate (DN field of server certificate
1364bc52338SCy Schubert 	 * C=US/O=XX/OU=XYZ/OU=ABC/CN=1234), wpa_supplicant will reject the
1374bc52338SCy Schubert 	 * server because the order of 'OU' is not matching the specified string
1384bc52338SCy Schubert 	 * in check_cert_subject.
1394bc52338SCy Schubert 	 *
1404bc52338SCy Schubert 	 * This option also allows '*' as a wildcard. This option has some
1414bc52338SCy Schubert 	 * limitation.
1424bc52338SCy Schubert 	 * It can only be used as per the following example.
1434bc52338SCy Schubert 	 *
1444bc52338SCy Schubert 	 * For example, check_cert_subject=C=US/O=XX/OU=Production* and we have
1454bc52338SCy Schubert 	 * two servers and DN of the subject in the first server certificate is
1464bc52338SCy Schubert 	 * (C=US/O=XX/OU=Production Unit) and DN of the subject in the second
1474bc52338SCy Schubert 	 * server is (C=US/O=XX/OU=Production Factory). In this case,
1484bc52338SCy Schubert 	 * wpa_supplicant will allow both servers because the value of 'OU'
1494bc52338SCy Schubert 	 * field in both server certificates matches 'OU' value in
1504bc52338SCy Schubert 	 * 'check_cert_subject' up to 'wildcard'.
1514bc52338SCy Schubert 	 *
1524bc52338SCy Schubert 	 * (Allow all servers, e.g., check_cert_subject=*)
1534bc52338SCy Schubert 	 */
1544bc52338SCy Schubert 	char *check_cert_subject;
1554bc52338SCy Schubert 
1564bc52338SCy Schubert 	/**
15739beb93cSSam Leffler 	 * altsubject_match - Constraint for server certificate alt. subject
15839beb93cSSam Leffler 	 *
15939beb93cSSam Leffler 	 * Semicolon separated string of entries to be matched against the
16039beb93cSSam Leffler 	 * alternative subject name of the authentication server certificate.
161780fb4a2SCy Schubert 	 * If this string is set, the server certificate is only accepted if it
16239beb93cSSam Leffler 	 * contains one of the entries in an alternative subject name
16339beb93cSSam Leffler 	 * extension.
16439beb93cSSam Leffler 	 *
16539beb93cSSam Leffler 	 * altSubjectName string is in following format: TYPE:VALUE
16639beb93cSSam Leffler 	 *
16739beb93cSSam Leffler 	 * Example: EMAIL:server@example.com
16839beb93cSSam Leffler 	 * Example: DNS:server.example.com;DNS:server2.example.com
16939beb93cSSam Leffler 	 *
17039beb93cSSam Leffler 	 * Following types are supported: EMAIL, DNS, URI
17139beb93cSSam Leffler 	 */
1724bc52338SCy Schubert 	char *altsubject_match;
17339beb93cSSam Leffler 
17439beb93cSSam Leffler 	/**
1755b9c547cSRui Paulo 	 * domain_suffix_match - Constraint for server domain name
1765b9c547cSRui Paulo 	 *
1774bc52338SCy Schubert 	 * If set, this semicolon deliminated list of FQDNs is used as suffix
1784bc52338SCy Schubert 	 * match requirements for the server certificate in SubjectAltName
1794bc52338SCy Schubert 	 * dNSName element(s). If a matching dNSName is found against any of the
1804bc52338SCy Schubert 	 * specified values, this constraint is met. If no dNSName values are
1814bc52338SCy Schubert 	 * present, this constraint is matched against SubjectName CN using same
1824bc52338SCy Schubert 	 * suffix match comparison. Suffix match here means that the host/domain
1834bc52338SCy Schubert 	 * name is compared case-insentively one label at a time starting from
1844bc52338SCy Schubert 	 * the top-level domain and all the labels in domain_suffix_match shall
1854bc52338SCy Schubert 	 * be included in the certificate. The certificate may include
1864bc52338SCy Schubert 	 * additional sub-level labels in addition to the required labels.
1875b9c547cSRui Paulo 	 *
1885b9c547cSRui Paulo 	 * For example, domain_suffix_match=example.com would match
1894bc52338SCy Schubert 	 * test.example.com but would not match test-example.com. Multiple
1904bc52338SCy Schubert 	 * match options can be specified in following manner:
1914bc52338SCy Schubert 	 * example.org;example.com.
1925b9c547cSRui Paulo 	 */
1935b9c547cSRui Paulo 	char *domain_suffix_match;
1945b9c547cSRui Paulo 
1955b9c547cSRui Paulo 	/**
1965b9c547cSRui Paulo 	 * domain_match - Constraint for server domain name
1975b9c547cSRui Paulo 	 *
1985b9c547cSRui Paulo 	 * If set, this FQDN is used as a full match requirement for the
1995b9c547cSRui Paulo 	 * server certificate in SubjectAltName dNSName element(s). If a
2005b9c547cSRui Paulo 	 * matching dNSName is found, this constraint is met. If no dNSName
2015b9c547cSRui Paulo 	 * values are present, this constraint is matched against SubjectName CN
2025b9c547cSRui Paulo 	 * using same full match comparison. This behavior is similar to
2035b9c547cSRui Paulo 	 * domain_suffix_match, but has the requirement of a full match, i.e.,
2045b9c547cSRui Paulo 	 * no subdomains or wildcard matches are allowed. Case-insensitive
2055b9c547cSRui Paulo 	 * comparison is used, so "Example.com" matches "example.com", but would
2065b9c547cSRui Paulo 	 * not match "test.Example.com".
2074bc52338SCy Schubert 	 *
2084bc52338SCy Schubert 	 * More than one match string can be provided by using semicolons to
2094bc52338SCy Schubert 	 * separate the strings (e.g., example.org;example.com). When multiple
2104bc52338SCy Schubert 	 * strings are specified, a match with any one of the values is
2114bc52338SCy Schubert 	 * considered a sufficient match for the certificate, i.e., the
2124bc52338SCy Schubert 	 * conditions are ORed together.
2135b9c547cSRui Paulo 	 */
2145b9c547cSRui Paulo 	char *domain_match;
2155b9c547cSRui Paulo 
2165b9c547cSRui Paulo 	/**
217c1d255d3SCy Schubert 	 * pin - PIN for USIM, GSM SIM, and smartcards
21839beb93cSSam Leffler 	 *
219c1d255d3SCy Schubert 	 * This field is used to configure PIN for SIM and smartcards for
220c1d255d3SCy Schubert 	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
221c1d255d3SCy Schubert 	 * smartcard is used for private key operations.
22239beb93cSSam Leffler 	 *
223c1d255d3SCy Schubert 	 * If left out, this will be asked through control interface.
22439beb93cSSam Leffler 	 */
225c1d255d3SCy Schubert 	char *pin;
22639beb93cSSam Leffler 
22739beb93cSSam Leffler 	/**
228c1d255d3SCy Schubert 	 * engine - Enable OpenSSL engine (e.g., for smartcard access)
22939beb93cSSam Leffler 	 *
230c1d255d3SCy Schubert 	 * This is used if private key operations for EAP-TLS are performed
231c1d255d3SCy Schubert 	 * using a smartcard.
23239beb93cSSam Leffler 	 */
233c1d255d3SCy Schubert 	int engine;
23439beb93cSSam Leffler 
23539beb93cSSam Leffler 	/**
236c1d255d3SCy Schubert 	 * engine_id - Engine ID for OpenSSL engine
23739beb93cSSam Leffler 	 *
238c1d255d3SCy Schubert 	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
239c1d255d3SCy Schubert 	 * engine.
24039beb93cSSam Leffler 	 *
241c1d255d3SCy Schubert 	 * This is used if private key operations for EAP-TLS are performed
242c1d255d3SCy Schubert 	 * using a smartcard.
24339beb93cSSam Leffler 	 */
244c1d255d3SCy Schubert 	char *engine_id;
245c1d255d3SCy Schubert 
24639beb93cSSam Leffler 
24739beb93cSSam Leffler 	/**
248c1d255d3SCy Schubert 	 * key_id - Key ID for OpenSSL engine
24939beb93cSSam Leffler 	 *
250c1d255d3SCy Schubert 	 * This is used if private key operations for EAP-TLS are performed
251c1d255d3SCy Schubert 	 * using a smartcard.
25239beb93cSSam Leffler 	 */
253c1d255d3SCy Schubert 	char *key_id;
25439beb93cSSam Leffler 
25539beb93cSSam Leffler 	/**
256c1d255d3SCy Schubert 	 * cert_id - Cert ID for OpenSSL engine
25739beb93cSSam Leffler 	 *
258c1d255d3SCy Schubert 	 * This is used if the certificate operations for EAP-TLS are performed
259c1d255d3SCy Schubert 	 * using a smartcard.
26039beb93cSSam Leffler 	 */
261c1d255d3SCy Schubert 	char *cert_id;
26239beb93cSSam Leffler 
26339beb93cSSam Leffler 	/**
264c1d255d3SCy Schubert 	 * ca_cert_id - CA Cert ID for OpenSSL engine
26539beb93cSSam Leffler 	 *
266c1d255d3SCy Schubert 	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
26739beb93cSSam Leffler 	 */
268c1d255d3SCy Schubert 	char *ca_cert_id;
26939beb93cSSam Leffler 
27039beb93cSSam Leffler 	/**
271c1d255d3SCy Schubert 	 * ocsp - Whether to use/require OCSP to check server certificate
27239beb93cSSam Leffler 	 *
273c1d255d3SCy Schubert 	 * 0 = do not use OCSP stapling (TLS certificate status extension)
274c1d255d3SCy Schubert 	 * 1 = try to use OCSP stapling, but not require response
275c1d255d3SCy Schubert 	 * 2 = require valid OCSP stapling response
27639beb93cSSam Leffler 	 */
277c1d255d3SCy Schubert 	int ocsp;
278c1d255d3SCy Schubert };
27939beb93cSSam Leffler 
28039beb93cSSam Leffler /**
281c1d255d3SCy Schubert  * struct eap_peer_config - EAP peer configuration/credentials
28239beb93cSSam Leffler  */
283c1d255d3SCy Schubert struct eap_peer_config {
284c1d255d3SCy Schubert 	/**
285c1d255d3SCy Schubert 	 * identity - EAP Identity
286c1d255d3SCy Schubert 	 *
287c1d255d3SCy Schubert 	 * This field is used to set the real user identity or NAI (for
288c1d255d3SCy Schubert 	 * EAP-PSK/PAX/SAKE/GPSK).
289c1d255d3SCy Schubert 	 */
290c1d255d3SCy Schubert 	u8 *identity;
29139beb93cSSam Leffler 
29239beb93cSSam Leffler 	/**
293c1d255d3SCy Schubert 	 * identity_len - EAP Identity length
2945b9c547cSRui Paulo 	 */
295c1d255d3SCy Schubert 	size_t identity_len;
2965b9c547cSRui Paulo 
2975b9c547cSRui Paulo 	/**
298c1d255d3SCy Schubert 	 * anonymous_identity -  Anonymous EAP Identity
2995b9c547cSRui Paulo 	 *
300c1d255d3SCy Schubert 	 * This field is used for unencrypted use with EAP types that support
301c1d255d3SCy Schubert 	 * different tunnelled identity, e.g., EAP-TTLS, in order to reveal the
302c1d255d3SCy Schubert 	 * real identity (identity field) only to the authentication server.
303c1d255d3SCy Schubert 	 *
304c1d255d3SCy Schubert 	 * If not set, the identity field will be used for both unencrypted and
305c1d255d3SCy Schubert 	 * protected fields.
306c1d255d3SCy Schubert 	 *
307c1d255d3SCy Schubert 	 * This field can also be used with EAP-SIM/AKA/AKA' to store the
308c1d255d3SCy Schubert 	 * pseudonym identity.
3095b9c547cSRui Paulo 	 */
310c1d255d3SCy Schubert 	u8 *anonymous_identity;
311c1d255d3SCy Schubert 
312c1d255d3SCy Schubert 	/**
313c1d255d3SCy Schubert 	 * anonymous_identity_len - Length of anonymous_identity
314c1d255d3SCy Schubert 	 */
315c1d255d3SCy Schubert 	size_t anonymous_identity_len;
316c1d255d3SCy Schubert 
317c1d255d3SCy Schubert 	u8 *imsi_identity;
318c1d255d3SCy Schubert 	size_t imsi_identity_len;
319c1d255d3SCy Schubert 
320c1d255d3SCy Schubert 	/**
321*a90b9d01SCy Schubert 	 * imsi_privacy_cert - IMSI privacy certificate
322*a90b9d01SCy Schubert 	 *
323*a90b9d01SCy Schubert 	 * This field is used with EAP-SIM/AKA/AKA' to encrypt the permanent
324*a90b9d01SCy Schubert 	 * identity (IMSI) to improve privacy. The referenced PEM-encoded
325*a90b9d01SCy Schubert 	 * X.509v3 certificate needs to include a 2048-bit RSA public key and
326*a90b9d01SCy Schubert 	 * this is from the operator who authenticates the SIM/USIM.
327*a90b9d01SCy Schubert 	 */
328*a90b9d01SCy Schubert 	char *imsi_privacy_cert;
329*a90b9d01SCy Schubert 
330*a90b9d01SCy Schubert 	/**
331*a90b9d01SCy Schubert 	 * imsi_privacy_attr - IMSI privacy attribute
332*a90b9d01SCy Schubert 	 *
333*a90b9d01SCy Schubert 	 * This field is used to help the EAP-SIM/AKA/AKA' server to identify
334*a90b9d01SCy Schubert 	 * the used certificate (and as such, the matching private key). This
335*a90b9d01SCy Schubert 	 * is set to an attribute in name=value format if the operator needs
336*a90b9d01SCy Schubert 	 * this information.
337*a90b9d01SCy Schubert 	 */
338*a90b9d01SCy Schubert 	char *imsi_privacy_attr;
339*a90b9d01SCy Schubert 
340*a90b9d01SCy Schubert 	/**
341c1d255d3SCy Schubert 	 * machine_identity - EAP Identity for machine credential
342c1d255d3SCy Schubert 	 *
343c1d255d3SCy Schubert 	 * This field is used to set the machine identity or NAI for cases where
344c1d255d3SCy Schubert 	 * and explicit machine credential (instead of or in addition to a user
345c1d255d3SCy Schubert 	 * credential (from %identity) is needed.
346c1d255d3SCy Schubert 	 */
347c1d255d3SCy Schubert 	u8 *machine_identity;
348c1d255d3SCy Schubert 
349c1d255d3SCy Schubert 	/**
350c1d255d3SCy Schubert 	 * machine_identity_len - EAP Identity length for machine credential
351c1d255d3SCy Schubert 	 */
352c1d255d3SCy Schubert 	size_t machine_identity_len;
353c1d255d3SCy Schubert 
354c1d255d3SCy Schubert 	/**
355c1d255d3SCy Schubert 	 * password - Password string for EAP
356c1d255d3SCy Schubert 	 *
357c1d255d3SCy Schubert 	 * This field can include either the plaintext password (default
358c1d255d3SCy Schubert 	 * option) or a NtPasswordHash (16-byte MD4 hash of the unicode
359c1d255d3SCy Schubert 	 * presentation of the password) if flags field has
360c1d255d3SCy Schubert 	 * EAP_CONFIG_FLAGS_PASSWORD_NTHASH bit set to 1. NtPasswordHash can
361c1d255d3SCy Schubert 	 * only be used with authentication mechanism that use this hash as the
362c1d255d3SCy Schubert 	 * starting point for operation: MSCHAP and MSCHAPv2 (EAP-MSCHAPv2,
363c1d255d3SCy Schubert 	 * EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP).
364c1d255d3SCy Schubert 	 *
365c1d255d3SCy Schubert 	 * In addition, this field is used to configure a pre-shared key for
366c1d255d3SCy Schubert 	 * EAP-PSK/PAX/SAKE/GPSK. The length of the PSK must be 16 for EAP-PSK
367c1d255d3SCy Schubert 	 * and EAP-PAX and 32 for EAP-SAKE. EAP-GPSK can use a variable length
368c1d255d3SCy Schubert 	 * PSK.
369c1d255d3SCy Schubert 	 */
370c1d255d3SCy Schubert 	u8 *password;
371c1d255d3SCy Schubert 
372c1d255d3SCy Schubert 	/**
373c1d255d3SCy Schubert 	 * password_len - Length of password field
374c1d255d3SCy Schubert 	 */
375c1d255d3SCy Schubert 	size_t password_len;
376c1d255d3SCy Schubert 
377c1d255d3SCy Schubert 	/**
378c1d255d3SCy Schubert 	 * machine_password - Password string for EAP machine credential
379c1d255d3SCy Schubert 	 *
380c1d255d3SCy Schubert 	 * This field is used when machine credential based on username/password
381c1d255d3SCy Schubert 	 * is needed instead of a user credential (from %password). See
382c1d255d3SCy Schubert 	 * %password for more details on the format.
383c1d255d3SCy Schubert 	 */
384c1d255d3SCy Schubert 	u8 *machine_password;
385c1d255d3SCy Schubert 
386c1d255d3SCy Schubert 	/**
387c1d255d3SCy Schubert 	 * machine_password_len - Length of machine credential password field
388c1d255d3SCy Schubert 	 */
389c1d255d3SCy Schubert 	size_t machine_password_len;
390c1d255d3SCy Schubert 
391c1d255d3SCy Schubert 	/**
392c1d255d3SCy Schubert 	 * cert - Certificate parameters for Phase 1
393c1d255d3SCy Schubert 	 */
394c1d255d3SCy Schubert 	struct eap_peer_cert_config cert;
395c1d255d3SCy Schubert 
396c1d255d3SCy Schubert 	/**
397c1d255d3SCy Schubert 	 * phase2_cert - Certificate parameters for Phase 2
398c1d255d3SCy Schubert 	 *
399c1d255d3SCy Schubert 	 * This is like cert, but used for Phase 2 (inside
400c1d255d3SCy Schubert 	 * EAP-TTLS/PEAP/FAST/TEAP tunnel) authentication.
401c1d255d3SCy Schubert 	 */
402c1d255d3SCy Schubert 	struct eap_peer_cert_config phase2_cert;
403c1d255d3SCy Schubert 
404c1d255d3SCy Schubert 	/**
405c1d255d3SCy Schubert 	 * machine_cert - Certificate parameters for Phase 2 machine credential
406c1d255d3SCy Schubert 	 *
407c1d255d3SCy Schubert 	 * This is like cert, but used for Phase 2 (inside EAP-TEAP tunnel)
408c1d255d3SCy Schubert 	 * authentication with machine credentials (while phase2_cert is used
409c1d255d3SCy Schubert 	 * for user credentials).
410c1d255d3SCy Schubert 	 */
411c1d255d3SCy Schubert 	struct eap_peer_cert_config machine_cert;
4125b9c547cSRui Paulo 
4135b9c547cSRui Paulo 	/**
41439beb93cSSam Leffler 	 * eap_methods - Allowed EAP methods
41539beb93cSSam Leffler 	 *
41639beb93cSSam Leffler 	 * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
41739beb93cSSam Leffler 	 * allowed EAP methods or %NULL if all methods are accepted.
41839beb93cSSam Leffler 	 */
41939beb93cSSam Leffler 	struct eap_method_type *eap_methods;
42039beb93cSSam Leffler 
42139beb93cSSam Leffler 	/**
42239beb93cSSam Leffler 	 * phase1 - Phase 1 (outer authentication) parameters
42339beb93cSSam Leffler 	 *
42439beb93cSSam Leffler 	 * String with field-value pairs, e.g., "peapver=0" or
42539beb93cSSam Leffler 	 * "peapver=1 peaplabel=1".
42639beb93cSSam Leffler 	 *
42739beb93cSSam Leffler 	 * 'peapver' can be used to force which PEAP version (0 or 1) is used.
42839beb93cSSam Leffler 	 *
42939beb93cSSam Leffler 	 * 'peaplabel=1' can be used to force new label, "client PEAP
43039beb93cSSam Leffler 	 * encryption",	to be used during key derivation when PEAPv1 or newer.
43139beb93cSSam Leffler 	 *
43239beb93cSSam Leffler 	 * Most existing PEAPv1 implementation seem to be using the old label,
43339beb93cSSam Leffler 	 * "client EAP encryption", and wpa_supplicant is now using that as the
43439beb93cSSam Leffler 	 * default value.
43539beb93cSSam Leffler 	 *
43639beb93cSSam Leffler 	 * Some servers, e.g., Radiator, may require peaplabel=1 configuration
43739beb93cSSam Leffler 	 * to interoperate with PEAPv1; see eap_testing.txt for more details.
43839beb93cSSam Leffler 	 *
43939beb93cSSam Leffler 	 * 'peap_outer_success=0' can be used to terminate PEAP authentication
44039beb93cSSam Leffler 	 * on tunneled EAP-Success. This is required with some RADIUS servers
44139beb93cSSam Leffler 	 * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
44239beb93cSSam Leffler 	 * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
44339beb93cSSam Leffler 	 *
44439beb93cSSam Leffler 	 * include_tls_length=1 can be used to force wpa_supplicant to include
44539beb93cSSam Leffler 	 * TLS Message Length field in all TLS messages even if they are not
44639beb93cSSam Leffler 	 * fragmented.
44739beb93cSSam Leffler 	 *
44839beb93cSSam Leffler 	 * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
44939beb93cSSam Leffler 	 * challenges (by default, it accepts 2 or 3).
45039beb93cSSam Leffler 	 *
45139beb93cSSam Leffler 	 * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
45239beb93cSSam Leffler 	 * protected result indication.
45339beb93cSSam Leffler 	 *
45439beb93cSSam Leffler 	 * fast_provisioning option can be used to enable in-line provisioning
45539beb93cSSam Leffler 	 * of EAP-FAST credentials (PAC):
45639beb93cSSam Leffler 	 * 0 = disabled,
45739beb93cSSam Leffler 	 * 1 = allow unauthenticated provisioning,
45839beb93cSSam Leffler 	 * 2 = allow authenticated provisioning,
45939beb93cSSam Leffler 	 * 3 = allow both unauthenticated and authenticated provisioning
46039beb93cSSam Leffler 	 *
46139beb93cSSam Leffler 	 * fast_max_pac_list_len=num option can be used to set the maximum
46239beb93cSSam Leffler 	 * number of PAC entries to store in a PAC list (default: 10).
46339beb93cSSam Leffler 	 *
46439beb93cSSam Leffler 	 * fast_pac_format=binary option can be used to select binary format
46539beb93cSSam Leffler 	 * for storing PAC entries in order to save some space (the default
46639beb93cSSam Leffler 	 * text format uses about 2.5 times the size of minimal binary format).
46739beb93cSSam Leffler 	 *
46839beb93cSSam Leffler 	 * crypto_binding option can be used to control PEAPv0 cryptobinding
46939beb93cSSam Leffler 	 * behavior:
47039beb93cSSam Leffler 	 * 0 = do not use cryptobinding (default)
47139beb93cSSam Leffler 	 * 1 = use cryptobinding if server supports it
47239beb93cSSam Leffler 	 * 2 = require cryptobinding
47339beb93cSSam Leffler 	 *
474*a90b9d01SCy Schubert 	 * phase2_auth option can be used to control Phase 2 (i.e., within TLS
475*a90b9d01SCy Schubert 	 * tunnel) behavior for PEAP:
476*a90b9d01SCy Schubert 	 * 0 = do not require Phase 2 authentication
477*a90b9d01SCy Schubert 	 * 1 = require Phase 2 authentication when client certificate
478*a90b9d01SCy Schubert 	 *  (private_key/client_cert) is no used and TLS session resumption was
479*a90b9d01SCy Schubert 	 *  not used (default)
480*a90b9d01SCy Schubert 	 * 2 = require Phase 2 authentication in all cases
481*a90b9d01SCy Schubert 	 *
48239beb93cSSam Leffler 	 * EAP-WSC (WPS) uses following options: pin=Device_Password and
48339beb93cSSam Leffler 	 * uuid=Device_UUID
4845b9c547cSRui Paulo 	 *
4855b9c547cSRui Paulo 	 * For wired IEEE 802.1X authentication, "allow_canned_success=1" can be
4865b9c547cSRui Paulo 	 * used to configure a mode that allows EAP-Success (and EAP-Failure)
4875b9c547cSRui Paulo 	 * without going through authentication step. Some switches use such
4885b9c547cSRui Paulo 	 * sequence when forcing the port to be authorized/unauthorized or as a
4895b9c547cSRui Paulo 	 * fallback option if the authentication server is unreachable. By
4905b9c547cSRui Paulo 	 * default, wpa_supplicant discards such frames to protect against
4915b9c547cSRui Paulo 	 * potential attacks by rogue devices, but this option can be used to
4925b9c547cSRui Paulo 	 * disable that protection for cases where the server/authenticator does
4935b9c547cSRui Paulo 	 * not need to be authenticated.
49439beb93cSSam Leffler 	 */
49539beb93cSSam Leffler 	char *phase1;
49639beb93cSSam Leffler 
49739beb93cSSam Leffler 	/**
49839beb93cSSam Leffler 	 * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
49939beb93cSSam Leffler 	 *
50039beb93cSSam Leffler 	 * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
5015b9c547cSRui Paulo 	 * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can
5025b9c547cSRui Paulo 	 * be used to disable MSCHAPv2 password retry in authentication failure
5035b9c547cSRui Paulo 	 * cases.
50439beb93cSSam Leffler 	 */
50539beb93cSSam Leffler 	char *phase2;
50639beb93cSSam Leffler 
50739beb93cSSam Leffler 	/**
508c1d255d3SCy Schubert 	 * machine_phase2 - Phase2 parameters for machine credentials
509c1d255d3SCy Schubert 	 *
510c1d255d3SCy Schubert 	 * See phase2 for more details.
511c1d255d3SCy Schubert 	 */
512c1d255d3SCy Schubert 	char *machine_phase2;
513c1d255d3SCy Schubert 
514c1d255d3SCy Schubert 	/**
51539beb93cSSam Leffler 	 * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
51639beb93cSSam Leffler 	 *
51739beb93cSSam Leffler 	 * This field is used to configure PC/SC smartcard interface.
51839beb93cSSam Leffler 	 * Currently, the only configuration is whether this field is %NULL (do
51939beb93cSSam Leffler 	 * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
52039beb93cSSam Leffler 	 *
52139beb93cSSam Leffler 	 * This field is used for EAP-SIM and EAP-AKA.
52239beb93cSSam Leffler 	 */
52339beb93cSSam Leffler 	char *pcsc;
52439beb93cSSam Leffler 
52539beb93cSSam Leffler 	/**
52639beb93cSSam Leffler 	 * otp - One-time-password
52739beb93cSSam Leffler 	 *
52839beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
52939beb93cSSam Leffler 	 * internally when OTP is entered through the control interface.
53039beb93cSSam Leffler 	 */
53139beb93cSSam Leffler 	u8 *otp;
53239beb93cSSam Leffler 
53339beb93cSSam Leffler 	/**
53439beb93cSSam Leffler 	 * otp_len - Length of the otp field
53539beb93cSSam Leffler 	 */
53639beb93cSSam Leffler 	size_t otp_len;
53739beb93cSSam Leffler 
53839beb93cSSam Leffler 	/**
53939beb93cSSam Leffler 	 * pending_req_identity - Whether there is a pending identity request
54039beb93cSSam Leffler 	 *
54139beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
54239beb93cSSam Leffler 	 * internally when control interface is used to request needed
54339beb93cSSam Leffler 	 * information.
54439beb93cSSam Leffler 	 */
54539beb93cSSam Leffler 	int pending_req_identity;
54639beb93cSSam Leffler 
54739beb93cSSam Leffler 	/**
54839beb93cSSam Leffler 	 * pending_req_password - Whether there is a pending password request
54939beb93cSSam Leffler 	 *
55039beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
55139beb93cSSam Leffler 	 * internally when control interface is used to request needed
55239beb93cSSam Leffler 	 * information.
55339beb93cSSam Leffler 	 */
55439beb93cSSam Leffler 	int pending_req_password;
55539beb93cSSam Leffler 
55639beb93cSSam Leffler 	/**
55739beb93cSSam Leffler 	 * pending_req_pin - Whether there is a pending PIN request
55839beb93cSSam Leffler 	 *
55939beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
56039beb93cSSam Leffler 	 * internally when control interface is used to request needed
56139beb93cSSam Leffler 	 * information.
56239beb93cSSam Leffler 	 */
56339beb93cSSam Leffler 	int pending_req_pin;
56439beb93cSSam Leffler 
56539beb93cSSam Leffler 	/**
56639beb93cSSam Leffler 	 * pending_req_new_password - Pending password update request
56739beb93cSSam Leffler 	 *
56839beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
56939beb93cSSam Leffler 	 * internally when control interface is used to request needed
57039beb93cSSam Leffler 	 * information.
57139beb93cSSam Leffler 	 */
57239beb93cSSam Leffler 	int pending_req_new_password;
57339beb93cSSam Leffler 
57439beb93cSSam Leffler 	/**
57539beb93cSSam Leffler 	 * pending_req_passphrase - Pending passphrase request
57639beb93cSSam Leffler 	 *
57739beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
57839beb93cSSam Leffler 	 * internally when control interface is used to request needed
57939beb93cSSam Leffler 	 * information.
58039beb93cSSam Leffler 	 */
58139beb93cSSam Leffler 	int pending_req_passphrase;
58239beb93cSSam Leffler 
58339beb93cSSam Leffler 	/**
58485732ac8SCy Schubert 	 * pending_req_sim - Pending SIM request
58585732ac8SCy Schubert 	 *
58685732ac8SCy Schubert 	 * This field should not be set in configuration step. It is only used
58785732ac8SCy Schubert 	 * internally when control interface is used to request needed
58885732ac8SCy Schubert 	 * information.
58985732ac8SCy Schubert 	 */
59085732ac8SCy Schubert 	int pending_req_sim;
59185732ac8SCy Schubert 
59285732ac8SCy Schubert 	/**
59339beb93cSSam Leffler 	 * pending_req_otp - Whether there is a pending OTP request
59439beb93cSSam Leffler 	 *
59539beb93cSSam Leffler 	 * This field should not be set in configuration step. It is only used
59639beb93cSSam Leffler 	 * internally when control interface is used to request needed
59739beb93cSSam Leffler 	 * information.
59839beb93cSSam Leffler 	 */
59939beb93cSSam Leffler 	char *pending_req_otp;
60039beb93cSSam Leffler 
60139beb93cSSam Leffler 	/**
60239beb93cSSam Leffler 	 * pending_req_otp_len - Length of the pending OTP request
60339beb93cSSam Leffler 	 */
60439beb93cSSam Leffler 	size_t pending_req_otp_len;
60539beb93cSSam Leffler 
60639beb93cSSam Leffler 	/**
60739beb93cSSam Leffler 	 * pac_file - File path or blob name for the PAC entries (EAP-FAST)
60839beb93cSSam Leffler 	 *
60939beb93cSSam Leffler 	 * wpa_supplicant will need to be able to create this file and write
61039beb93cSSam Leffler 	 * updates to it when PAC is being provisioned or refreshed. Full path
61139beb93cSSam Leffler 	 * to the file should be used since working directory may change when
61239beb93cSSam Leffler 	 * wpa_supplicant is run in the background.
61339beb93cSSam Leffler 	 * Alternatively, a named configuration blob can be used by setting
61439beb93cSSam Leffler 	 * this to blob://blob_name.
61539beb93cSSam Leffler 	 */
61639beb93cSSam Leffler 	char *pac_file;
61739beb93cSSam Leffler 
61839beb93cSSam Leffler 	/**
61939beb93cSSam Leffler 	 * mschapv2_retry - MSCHAPv2 retry in progress
62039beb93cSSam Leffler 	 *
62139beb93cSSam Leffler 	 * This field is used internally by EAP-MSCHAPv2 and should not be set
62239beb93cSSam Leffler 	 * as part of configuration.
62339beb93cSSam Leffler 	 */
62439beb93cSSam Leffler 	int mschapv2_retry;
62539beb93cSSam Leffler 
62639beb93cSSam Leffler 	/**
62739beb93cSSam Leffler 	 * new_password - New password for password update
62839beb93cSSam Leffler 	 *
62939beb93cSSam Leffler 	 * This field is used during MSCHAPv2 password update. This is normally
63039beb93cSSam Leffler 	 * requested from the user through the control interface and not set
63139beb93cSSam Leffler 	 * from configuration.
63239beb93cSSam Leffler 	 */
63339beb93cSSam Leffler 	u8 *new_password;
63439beb93cSSam Leffler 
63539beb93cSSam Leffler 	/**
63639beb93cSSam Leffler 	 * new_password_len - Length of new_password field
63739beb93cSSam Leffler 	 */
63839beb93cSSam Leffler 	size_t new_password_len;
63939beb93cSSam Leffler 
64039beb93cSSam Leffler 	/**
64139beb93cSSam Leffler 	 * fragment_size - Maximum EAP fragment size in bytes (default 1398)
64239beb93cSSam Leffler 	 *
64339beb93cSSam Leffler 	 * This value limits the fragment size for EAP methods that support
64439beb93cSSam Leffler 	 * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
64539beb93cSSam Leffler 	 * small enough to make the EAP messages fit in MTU of the network
64639beb93cSSam Leffler 	 * interface used for EAPOL. The default value is suitable for most
64739beb93cSSam Leffler 	 * cases.
64839beb93cSSam Leffler 	 */
64939beb93cSSam Leffler 	int fragment_size;
65039beb93cSSam Leffler 
65139beb93cSSam Leffler #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
652f05cddf9SRui Paulo #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
653c1d255d3SCy Schubert #define EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH BIT(2)
654c1d255d3SCy Schubert #define EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD BIT(3)
65539beb93cSSam Leffler 	/**
65639beb93cSSam Leffler 	 * flags - Network configuration flags (bitfield)
65739beb93cSSam Leffler 	 *
65839beb93cSSam Leffler 	 * This variable is used for internal flags to describe further details
65939beb93cSSam Leffler 	 * for the network parameters.
66039beb93cSSam Leffler 	 * bit 0 = password is represented as a 16-byte NtPasswordHash value
66139beb93cSSam Leffler 	 *         instead of plaintext password
662f05cddf9SRui Paulo 	 * bit 1 = password is stored in external storage; the value in the
663f05cddf9SRui Paulo 	 *         password field is the name of that external entry
664c1d255d3SCy Schubert 	 * bit 2 = machine password is represented as a 16-byte NtPasswordHash
665c1d255d3SCy Schubert 	 *         value instead of plaintext password
666c1d255d3SCy Schubert 	 * bit 3 = machine password is stored in external storage; the value in
667c1d255d3SCy Schubert 	 *         the password field is the name of that external entry
66839beb93cSSam Leffler 	 */
66939beb93cSSam Leffler 	u32 flags;
6705b9c547cSRui Paulo 
6715b9c547cSRui Paulo 	/**
6725b9c547cSRui Paulo 	 * external_sim_resp - Response from external SIM processing
6735b9c547cSRui Paulo 	 *
6745b9c547cSRui Paulo 	 * This field should not be set in configuration step. It is only used
6755b9c547cSRui Paulo 	 * internally when control interface is used to request external
6765b9c547cSRui Paulo 	 * SIM/USIM processing.
6775b9c547cSRui Paulo 	 */
6785b9c547cSRui Paulo 	char *external_sim_resp;
6795b9c547cSRui Paulo 
6805b9c547cSRui Paulo 	/**
6815b9c547cSRui Paulo 	 * sim_num - User selected SIM identifier
6825b9c547cSRui Paulo 	 *
6835b9c547cSRui Paulo 	 * This variable is used for identifying which SIM is used if the system
6845b9c547cSRui Paulo 	 * has more than one.
6855b9c547cSRui Paulo 	 */
6865b9c547cSRui Paulo 	int sim_num;
6875b9c547cSRui Paulo 
6885b9c547cSRui Paulo 	/**
6895b9c547cSRui Paulo 	 * openssl_ciphers - OpenSSL cipher string
6905b9c547cSRui Paulo 	 *
6915b9c547cSRui Paulo 	 * This is an OpenSSL specific configuration option for configuring the
6925b9c547cSRui Paulo 	 * ciphers for this connection. If not set, the default cipher suite
6935b9c547cSRui Paulo 	 * list is used.
6945b9c547cSRui Paulo 	 */
6955b9c547cSRui Paulo 	char *openssl_ciphers;
6965b9c547cSRui Paulo 
6975b9c547cSRui Paulo 	/**
6985b9c547cSRui Paulo 	 * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
6995b9c547cSRui Paulo 	 */
7005b9c547cSRui Paulo 	int erp;
701780fb4a2SCy Schubert 
702780fb4a2SCy Schubert 	/**
703780fb4a2SCy Schubert 	 * pending_ext_cert_check - External server certificate check status
704780fb4a2SCy Schubert 	 *
705780fb4a2SCy Schubert 	 * This field should not be set in configuration step. It is only used
706780fb4a2SCy Schubert 	 * internally when control interface is used to request external
707780fb4a2SCy Schubert 	 * validation of server certificate chain.
708780fb4a2SCy Schubert 	 */
709780fb4a2SCy Schubert 	enum {
710780fb4a2SCy Schubert 		NO_CHECK = 0,
711780fb4a2SCy Schubert 		PENDING_CHECK,
712780fb4a2SCy Schubert 		EXT_CERT_CHECK_GOOD,
713780fb4a2SCy Schubert 		EXT_CERT_CHECK_BAD,
714780fb4a2SCy Schubert 	} pending_ext_cert_check;
715206b73d0SCy Schubert 
716206b73d0SCy Schubert 	int teap_anon_dh;
71739beb93cSSam Leffler };
71839beb93cSSam Leffler 
71939beb93cSSam Leffler 
72039beb93cSSam Leffler /**
72139beb93cSSam Leffler  * struct wpa_config_blob - Named configuration blob
72239beb93cSSam Leffler  *
72339beb93cSSam Leffler  * This data structure is used to provide storage for binary objects to store
72439beb93cSSam Leffler  * abstract information like certificates and private keys inlined with the
72539beb93cSSam Leffler  * configuration data.
72639beb93cSSam Leffler  */
72739beb93cSSam Leffler struct wpa_config_blob {
72839beb93cSSam Leffler 	/**
72939beb93cSSam Leffler 	 * name - Blob name
73039beb93cSSam Leffler 	 */
73139beb93cSSam Leffler 	char *name;
73239beb93cSSam Leffler 
73339beb93cSSam Leffler 	/**
73439beb93cSSam Leffler 	 * data - Pointer to binary data
73539beb93cSSam Leffler 	 */
73639beb93cSSam Leffler 	u8 *data;
73739beb93cSSam Leffler 
73839beb93cSSam Leffler 	/**
73939beb93cSSam Leffler 	 * len - Length of binary data
74039beb93cSSam Leffler 	 */
74139beb93cSSam Leffler 	size_t len;
74239beb93cSSam Leffler 
74339beb93cSSam Leffler 	/**
74439beb93cSSam Leffler 	 * next - Pointer to next blob in the configuration
74539beb93cSSam Leffler 	 */
74639beb93cSSam Leffler 	struct wpa_config_blob *next;
74739beb93cSSam Leffler };
74839beb93cSSam Leffler 
74939beb93cSSam Leffler #endif /* EAP_CONFIG_H */
750