139beb93cSSam Leffler /* 239beb93cSSam Leffler * EAP peer configuration data 339beb93cSSam Leffler * Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi> 439beb93cSSam Leffler * 5*f05cddf9SRui Paulo * This software may be distributed under the terms of the BSD license. 6*f05cddf9SRui 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. 38*f05cddf9SRui Paulo * 39*f05cddf9SRui Paulo * This field can also be used with EAP-SIM/AKA/AKA' to store the 40*f05cddf9SRui 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 4939beb93cSSam Leffler /** 5039beb93cSSam Leffler * password - Password string for EAP 5139beb93cSSam Leffler * 5239beb93cSSam Leffler * This field can include either the plaintext password (default 5339beb93cSSam Leffler * option) or a NtPasswordHash (16-byte MD4 hash of the unicode 5439beb93cSSam Leffler * presentation of the password) if flags field has 5539beb93cSSam Leffler * EAP_CONFIG_FLAGS_PASSWORD_NTHASH bit set to 1. NtPasswordHash can 5639beb93cSSam Leffler * only be used with authentication mechanism that use this hash as the 5739beb93cSSam Leffler * starting point for operation: MSCHAP and MSCHAPv2 (EAP-MSCHAPv2, 5839beb93cSSam Leffler * EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP). 5939beb93cSSam Leffler * 6039beb93cSSam Leffler * In addition, this field is used to configure a pre-shared key for 6139beb93cSSam Leffler * EAP-PSK/PAX/SAKE/GPSK. The length of the PSK must be 16 for EAP-PSK 6239beb93cSSam Leffler * and EAP-PAX and 32 for EAP-SAKE. EAP-GPSK can use a variable length 6339beb93cSSam Leffler * PSK. 6439beb93cSSam Leffler */ 6539beb93cSSam Leffler u8 *password; 6639beb93cSSam Leffler 6739beb93cSSam Leffler /** 6839beb93cSSam Leffler * password_len - Length of password field 6939beb93cSSam Leffler */ 7039beb93cSSam Leffler size_t password_len; 7139beb93cSSam Leffler 7239beb93cSSam Leffler /** 7339beb93cSSam Leffler * ca_cert - File path to CA certificate file (PEM/DER) 7439beb93cSSam Leffler * 7539beb93cSSam Leffler * This file can have one or more trusted CA certificates. If ca_cert 7639beb93cSSam Leffler * and ca_path are not included, server certificate will not be 7739beb93cSSam Leffler * verified. This is insecure and a trusted CA certificate should 7839beb93cSSam Leffler * always be configured when using EAP-TLS/TTLS/PEAP. Full path to the 7939beb93cSSam Leffler * file should be used since working directory may change when 8039beb93cSSam Leffler * wpa_supplicant is run in the background. 8139beb93cSSam Leffler * 8239beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 8339beb93cSSam Leffler * this to blob://blob_name. 8439beb93cSSam Leffler * 85e28a4053SRui Paulo * Alternatively, this can be used to only perform matching of the 86e28a4053SRui Paulo * server certificate (SHA-256 hash of the DER encoded X.509 87e28a4053SRui Paulo * certificate). In this case, the possible CA certificates in the 88e28a4053SRui Paulo * server certificate chain are ignored and only the server certificate 89e28a4053SRui Paulo * is verified. This is configured with the following format: 90e28a4053SRui Paulo * hash:://server/sha256/cert_hash_in_hex 91e28a4053SRui Paulo * For example: "hash://server/sha256/ 92e28a4053SRui Paulo * 5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a" 93e28a4053SRui Paulo * 9439beb93cSSam Leffler * On Windows, trusted CA certificates can be loaded from the system 9539beb93cSSam Leffler * certificate store by setting this to cert_store://name, e.g., 9639beb93cSSam Leffler * ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT". 9739beb93cSSam Leffler * Note that when running wpa_supplicant as an application, the user 9839beb93cSSam Leffler * certificate store (My user account) is used, whereas computer store 9939beb93cSSam Leffler * (Computer account) is used when running wpasvc as a service. 10039beb93cSSam Leffler */ 10139beb93cSSam Leffler u8 *ca_cert; 10239beb93cSSam Leffler 10339beb93cSSam Leffler /** 10439beb93cSSam Leffler * ca_path - Directory path for CA certificate files (PEM) 10539beb93cSSam Leffler * 10639beb93cSSam Leffler * This path may contain multiple CA certificates in OpenSSL format. 10739beb93cSSam Leffler * Common use for this is to point to system trusted CA list which is 10839beb93cSSam Leffler * often installed into directory like /etc/ssl/certs. If configured, 10939beb93cSSam Leffler * these certificates are added to the list of trusted CAs. ca_cert 11039beb93cSSam Leffler * may also be included in that case, but it is not required. 11139beb93cSSam Leffler */ 11239beb93cSSam Leffler u8 *ca_path; 11339beb93cSSam Leffler 11439beb93cSSam Leffler /** 11539beb93cSSam Leffler * client_cert - File path to client certificate file (PEM/DER) 11639beb93cSSam Leffler * 11739beb93cSSam Leffler * This field is used with EAP method that use TLS authentication. 11839beb93cSSam Leffler * Usually, this is only configured for EAP-TLS, even though this could 11939beb93cSSam Leffler * in theory be used with EAP-TTLS and EAP-PEAP, too. Full path to the 12039beb93cSSam Leffler * file should be used since working directory may change when 12139beb93cSSam Leffler * wpa_supplicant is run in the background. 12239beb93cSSam Leffler * 12339beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 12439beb93cSSam Leffler * this to blob://blob_name. 12539beb93cSSam Leffler */ 12639beb93cSSam Leffler u8 *client_cert; 12739beb93cSSam Leffler 12839beb93cSSam Leffler /** 12939beb93cSSam Leffler * private_key - File path to client private key file (PEM/DER/PFX) 13039beb93cSSam Leffler * 13139beb93cSSam Leffler * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be 13239beb93cSSam Leffler * commented out. Both the private key and certificate will be read 13339beb93cSSam Leffler * from the PKCS#12 file in this case. Full path to the file should be 13439beb93cSSam Leffler * used since working directory may change when wpa_supplicant is run 13539beb93cSSam Leffler * in the background. 13639beb93cSSam Leffler * 13739beb93cSSam Leffler * Windows certificate store can be used by leaving client_cert out and 13839beb93cSSam Leffler * configuring private_key in one of the following formats: 13939beb93cSSam Leffler * 14039beb93cSSam Leffler * cert://substring_to_match 14139beb93cSSam Leffler * 14239beb93cSSam Leffler * hash://certificate_thumbprint_in_hex 14339beb93cSSam Leffler * 14439beb93cSSam Leffler * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4" 14539beb93cSSam Leffler * 14639beb93cSSam Leffler * Note that when running wpa_supplicant as an application, the user 14739beb93cSSam Leffler * certificate store (My user account) is used, whereas computer store 14839beb93cSSam Leffler * (Computer account) is used when running wpasvc as a service. 14939beb93cSSam Leffler * 15039beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 15139beb93cSSam Leffler * this to blob://blob_name. 15239beb93cSSam Leffler */ 15339beb93cSSam Leffler u8 *private_key; 15439beb93cSSam Leffler 15539beb93cSSam Leffler /** 15639beb93cSSam Leffler * private_key_passwd - Password for private key file 15739beb93cSSam Leffler * 15839beb93cSSam Leffler * If left out, this will be asked through control interface. 15939beb93cSSam Leffler */ 16039beb93cSSam Leffler u8 *private_key_passwd; 16139beb93cSSam Leffler 16239beb93cSSam Leffler /** 16339beb93cSSam Leffler * dh_file - File path to DH/DSA parameters file (in PEM format) 16439beb93cSSam Leffler * 16539beb93cSSam Leffler * This is an optional configuration file for setting parameters for an 16639beb93cSSam Leffler * ephemeral DH key exchange. In most cases, the default RSA 16739beb93cSSam Leffler * authentication does not use this configuration. However, it is 16839beb93cSSam Leffler * possible setup RSA to use ephemeral DH key exchange. In addition, 16939beb93cSSam Leffler * ciphers with DSA keys always use ephemeral DH keys. This can be used 17039beb93cSSam Leffler * to achieve forward secrecy. If the file is in DSA parameters format, 17139beb93cSSam Leffler * it will be automatically converted into DH params. Full path to the 17239beb93cSSam Leffler * file should be used since working directory may change when 17339beb93cSSam Leffler * wpa_supplicant is run in the background. 17439beb93cSSam Leffler * 17539beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 17639beb93cSSam Leffler * this to blob://blob_name. 17739beb93cSSam Leffler */ 17839beb93cSSam Leffler u8 *dh_file; 17939beb93cSSam Leffler 18039beb93cSSam Leffler /** 18139beb93cSSam Leffler * subject_match - Constraint for server certificate subject 18239beb93cSSam Leffler * 18339beb93cSSam Leffler * This substring is matched against the subject of the authentication 18439beb93cSSam Leffler * server certificate. If this string is set, the server sertificate is 18539beb93cSSam Leffler * only accepted if it contains this string in the subject. The subject 18639beb93cSSam Leffler * string is in following format: 18739beb93cSSam Leffler * 18839beb93cSSam Leffler * /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@n.example.com 18939beb93cSSam Leffler */ 19039beb93cSSam Leffler u8 *subject_match; 19139beb93cSSam Leffler 19239beb93cSSam Leffler /** 19339beb93cSSam Leffler * altsubject_match - Constraint for server certificate alt. subject 19439beb93cSSam Leffler * 19539beb93cSSam Leffler * Semicolon separated string of entries to be matched against the 19639beb93cSSam Leffler * alternative subject name of the authentication server certificate. 19739beb93cSSam Leffler * If this string is set, the server sertificate is only accepted if it 19839beb93cSSam Leffler * contains one of the entries in an alternative subject name 19939beb93cSSam Leffler * extension. 20039beb93cSSam Leffler * 20139beb93cSSam Leffler * altSubjectName string is in following format: TYPE:VALUE 20239beb93cSSam Leffler * 20339beb93cSSam Leffler * Example: EMAIL:server@example.com 20439beb93cSSam Leffler * Example: DNS:server.example.com;DNS:server2.example.com 20539beb93cSSam Leffler * 20639beb93cSSam Leffler * Following types are supported: EMAIL, DNS, URI 20739beb93cSSam Leffler */ 20839beb93cSSam Leffler u8 *altsubject_match; 20939beb93cSSam Leffler 21039beb93cSSam Leffler /** 21139beb93cSSam Leffler * ca_cert2 - File path to CA certificate file (PEM/DER) (Phase 2) 21239beb93cSSam Leffler * 21339beb93cSSam Leffler * This file can have one or more trusted CA certificates. If ca_cert2 21439beb93cSSam Leffler * and ca_path2 are not included, server certificate will not be 21539beb93cSSam Leffler * verified. This is insecure and a trusted CA certificate should 21639beb93cSSam Leffler * always be configured. Full path to the file should be used since 21739beb93cSSam Leffler * working directory may change when wpa_supplicant is run in the 21839beb93cSSam Leffler * background. 21939beb93cSSam Leffler * 22039beb93cSSam Leffler * This field is like ca_cert, but used for phase 2 (inside 22139beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 22239beb93cSSam Leffler * 22339beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 22439beb93cSSam Leffler * this to blob://blob_name. 22539beb93cSSam Leffler */ 22639beb93cSSam Leffler u8 *ca_cert2; 22739beb93cSSam Leffler 22839beb93cSSam Leffler /** 22939beb93cSSam Leffler * ca_path2 - Directory path for CA certificate files (PEM) (Phase 2) 23039beb93cSSam Leffler * 23139beb93cSSam Leffler * This path may contain multiple CA certificates in OpenSSL format. 23239beb93cSSam Leffler * Common use for this is to point to system trusted CA list which is 23339beb93cSSam Leffler * often installed into directory like /etc/ssl/certs. If configured, 23439beb93cSSam Leffler * these certificates are added to the list of trusted CAs. ca_cert 23539beb93cSSam Leffler * may also be included in that case, but it is not required. 23639beb93cSSam Leffler * 23739beb93cSSam Leffler * This field is like ca_path, but used for phase 2 (inside 23839beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 23939beb93cSSam Leffler */ 24039beb93cSSam Leffler u8 *ca_path2; 24139beb93cSSam Leffler 24239beb93cSSam Leffler /** 24339beb93cSSam Leffler * client_cert2 - File path to client certificate file 24439beb93cSSam Leffler * 24539beb93cSSam Leffler * This field is like client_cert, but used for phase 2 (inside 24639beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the 24739beb93cSSam Leffler * file should be used since working directory may change when 24839beb93cSSam Leffler * wpa_supplicant is run in the background. 24939beb93cSSam Leffler * 25039beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 25139beb93cSSam Leffler * this to blob://blob_name. 25239beb93cSSam Leffler */ 25339beb93cSSam Leffler u8 *client_cert2; 25439beb93cSSam Leffler 25539beb93cSSam Leffler /** 25639beb93cSSam Leffler * private_key2 - File path to client private key file 25739beb93cSSam Leffler * 25839beb93cSSam Leffler * This field is like private_key, but used for phase 2 (inside 25939beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the 26039beb93cSSam Leffler * file should be used since working directory may change when 26139beb93cSSam Leffler * wpa_supplicant is run in the background. 26239beb93cSSam Leffler * 26339beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 26439beb93cSSam Leffler * this to blob://blob_name. 26539beb93cSSam Leffler */ 26639beb93cSSam Leffler u8 *private_key2; 26739beb93cSSam Leffler 26839beb93cSSam Leffler /** 26939beb93cSSam Leffler * private_key2_passwd - Password for private key file 27039beb93cSSam Leffler * 27139beb93cSSam Leffler * This field is like private_key_passwd, but used for phase 2 (inside 27239beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 27339beb93cSSam Leffler */ 27439beb93cSSam Leffler u8 *private_key2_passwd; 27539beb93cSSam Leffler 27639beb93cSSam Leffler /** 27739beb93cSSam Leffler * dh_file2 - File path to DH/DSA parameters file (in PEM format) 27839beb93cSSam Leffler * 27939beb93cSSam Leffler * This field is like dh_file, but used for phase 2 (inside 28039beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the 28139beb93cSSam Leffler * file should be used since working directory may change when 28239beb93cSSam Leffler * wpa_supplicant is run in the background. 28339beb93cSSam Leffler * 28439beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 28539beb93cSSam Leffler * this to blob://blob_name. 28639beb93cSSam Leffler */ 28739beb93cSSam Leffler u8 *dh_file2; 28839beb93cSSam Leffler 28939beb93cSSam Leffler /** 29039beb93cSSam Leffler * subject_match2 - Constraint for server certificate subject 29139beb93cSSam Leffler * 29239beb93cSSam Leffler * This field is like subject_match, but used for phase 2 (inside 29339beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 29439beb93cSSam Leffler */ 29539beb93cSSam Leffler u8 *subject_match2; 29639beb93cSSam Leffler 29739beb93cSSam Leffler /** 29839beb93cSSam Leffler * altsubject_match2 - Constraint for server certificate alt. subject 29939beb93cSSam Leffler * 30039beb93cSSam Leffler * This field is like altsubject_match, but used for phase 2 (inside 30139beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 30239beb93cSSam Leffler */ 30339beb93cSSam Leffler u8 *altsubject_match2; 30439beb93cSSam Leffler 30539beb93cSSam Leffler /** 30639beb93cSSam Leffler * eap_methods - Allowed EAP methods 30739beb93cSSam Leffler * 30839beb93cSSam Leffler * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of 30939beb93cSSam Leffler * allowed EAP methods or %NULL if all methods are accepted. 31039beb93cSSam Leffler */ 31139beb93cSSam Leffler struct eap_method_type *eap_methods; 31239beb93cSSam Leffler 31339beb93cSSam Leffler /** 31439beb93cSSam Leffler * phase1 - Phase 1 (outer authentication) parameters 31539beb93cSSam Leffler * 31639beb93cSSam Leffler * String with field-value pairs, e.g., "peapver=0" or 31739beb93cSSam Leffler * "peapver=1 peaplabel=1". 31839beb93cSSam Leffler * 31939beb93cSSam Leffler * 'peapver' can be used to force which PEAP version (0 or 1) is used. 32039beb93cSSam Leffler * 32139beb93cSSam Leffler * 'peaplabel=1' can be used to force new label, "client PEAP 32239beb93cSSam Leffler * encryption", to be used during key derivation when PEAPv1 or newer. 32339beb93cSSam Leffler * 32439beb93cSSam Leffler * Most existing PEAPv1 implementation seem to be using the old label, 32539beb93cSSam Leffler * "client EAP encryption", and wpa_supplicant is now using that as the 32639beb93cSSam Leffler * default value. 32739beb93cSSam Leffler * 32839beb93cSSam Leffler * Some servers, e.g., Radiator, may require peaplabel=1 configuration 32939beb93cSSam Leffler * to interoperate with PEAPv1; see eap_testing.txt for more details. 33039beb93cSSam Leffler * 33139beb93cSSam Leffler * 'peap_outer_success=0' can be used to terminate PEAP authentication 33239beb93cSSam Leffler * on tunneled EAP-Success. This is required with some RADIUS servers 33339beb93cSSam Leffler * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g., 33439beb93cSSam Leffler * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode). 33539beb93cSSam Leffler * 33639beb93cSSam Leffler * include_tls_length=1 can be used to force wpa_supplicant to include 33739beb93cSSam Leffler * TLS Message Length field in all TLS messages even if they are not 33839beb93cSSam Leffler * fragmented. 33939beb93cSSam Leffler * 34039beb93cSSam Leffler * sim_min_num_chal=3 can be used to configure EAP-SIM to require three 34139beb93cSSam Leffler * challenges (by default, it accepts 2 or 3). 34239beb93cSSam Leffler * 34339beb93cSSam Leffler * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use 34439beb93cSSam Leffler * protected result indication. 34539beb93cSSam Leffler * 34639beb93cSSam Leffler * fast_provisioning option can be used to enable in-line provisioning 34739beb93cSSam Leffler * of EAP-FAST credentials (PAC): 34839beb93cSSam Leffler * 0 = disabled, 34939beb93cSSam Leffler * 1 = allow unauthenticated provisioning, 35039beb93cSSam Leffler * 2 = allow authenticated provisioning, 35139beb93cSSam Leffler * 3 = allow both unauthenticated and authenticated provisioning 35239beb93cSSam Leffler * 35339beb93cSSam Leffler * fast_max_pac_list_len=num option can be used to set the maximum 35439beb93cSSam Leffler * number of PAC entries to store in a PAC list (default: 10). 35539beb93cSSam Leffler * 35639beb93cSSam Leffler * fast_pac_format=binary option can be used to select binary format 35739beb93cSSam Leffler * for storing PAC entries in order to save some space (the default 35839beb93cSSam Leffler * text format uses about 2.5 times the size of minimal binary format). 35939beb93cSSam Leffler * 36039beb93cSSam Leffler * crypto_binding option can be used to control PEAPv0 cryptobinding 36139beb93cSSam Leffler * behavior: 36239beb93cSSam Leffler * 0 = do not use cryptobinding (default) 36339beb93cSSam Leffler * 1 = use cryptobinding if server supports it 36439beb93cSSam Leffler * 2 = require cryptobinding 36539beb93cSSam Leffler * 36639beb93cSSam Leffler * EAP-WSC (WPS) uses following options: pin=Device_Password and 36739beb93cSSam Leffler * uuid=Device_UUID 36839beb93cSSam Leffler */ 36939beb93cSSam Leffler char *phase1; 37039beb93cSSam Leffler 37139beb93cSSam Leffler /** 37239beb93cSSam Leffler * phase2 - Phase2 (inner authentication with TLS tunnel) parameters 37339beb93cSSam Leffler * 37439beb93cSSam Leffler * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or 37539beb93cSSam Leffler * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. 37639beb93cSSam Leffler */ 37739beb93cSSam Leffler char *phase2; 37839beb93cSSam Leffler 37939beb93cSSam Leffler /** 38039beb93cSSam Leffler * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM 38139beb93cSSam Leffler * 38239beb93cSSam Leffler * This field is used to configure PC/SC smartcard interface. 38339beb93cSSam Leffler * Currently, the only configuration is whether this field is %NULL (do 38439beb93cSSam Leffler * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC. 38539beb93cSSam Leffler * 38639beb93cSSam Leffler * This field is used for EAP-SIM and EAP-AKA. 38739beb93cSSam Leffler */ 38839beb93cSSam Leffler char *pcsc; 38939beb93cSSam Leffler 39039beb93cSSam Leffler /** 39139beb93cSSam Leffler * pin - PIN for USIM, GSM SIM, and smartcards 39239beb93cSSam Leffler * 39339beb93cSSam Leffler * This field is used to configure PIN for SIM and smartcards for 39439beb93cSSam Leffler * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a 39539beb93cSSam Leffler * smartcard is used for private key operations. 39639beb93cSSam Leffler * 39739beb93cSSam Leffler * If left out, this will be asked through control interface. 39839beb93cSSam Leffler */ 39939beb93cSSam Leffler char *pin; 40039beb93cSSam Leffler 40139beb93cSSam Leffler /** 40239beb93cSSam Leffler * engine - Enable OpenSSL engine (e.g., for smartcard access) 40339beb93cSSam Leffler * 40439beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 40539beb93cSSam Leffler * using a smartcard. 40639beb93cSSam Leffler */ 40739beb93cSSam Leffler int engine; 40839beb93cSSam Leffler 40939beb93cSSam Leffler /** 41039beb93cSSam Leffler * engine_id - Engine ID for OpenSSL engine 41139beb93cSSam Leffler * 41239beb93cSSam Leffler * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11 41339beb93cSSam Leffler * engine. 41439beb93cSSam Leffler * 41539beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 41639beb93cSSam Leffler * using a smartcard. 41739beb93cSSam Leffler */ 41839beb93cSSam Leffler char *engine_id; 41939beb93cSSam Leffler 42039beb93cSSam Leffler /** 42139beb93cSSam Leffler * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2) 42239beb93cSSam Leffler * 42339beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 42439beb93cSSam Leffler * using a smartcard. 42539beb93cSSam Leffler * 42639beb93cSSam Leffler * This field is like engine, but used for phase 2 (inside 42739beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 42839beb93cSSam Leffler */ 42939beb93cSSam Leffler int engine2; 43039beb93cSSam Leffler 43139beb93cSSam Leffler 43239beb93cSSam Leffler /** 43339beb93cSSam Leffler * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2) 43439beb93cSSam Leffler * 43539beb93cSSam Leffler * This field is used to configure PIN for SIM and smartcards for 43639beb93cSSam Leffler * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a 43739beb93cSSam Leffler * smartcard is used for private key operations. 43839beb93cSSam Leffler * 43939beb93cSSam Leffler * This field is like pin2, but used for phase 2 (inside 44039beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 44139beb93cSSam Leffler * 44239beb93cSSam Leffler * If left out, this will be asked through control interface. 44339beb93cSSam Leffler */ 44439beb93cSSam Leffler char *pin2; 44539beb93cSSam Leffler 44639beb93cSSam Leffler /** 44739beb93cSSam Leffler * engine2_id - Engine ID for OpenSSL engine (Phase 2) 44839beb93cSSam Leffler * 44939beb93cSSam Leffler * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11 45039beb93cSSam Leffler * engine. 45139beb93cSSam Leffler * 45239beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 45339beb93cSSam Leffler * using a smartcard. 45439beb93cSSam Leffler * 45539beb93cSSam Leffler * This field is like engine_id, but used for phase 2 (inside 45639beb93cSSam Leffler * EAP-TTLS/PEAP/FAST tunnel) authentication. 45739beb93cSSam Leffler */ 45839beb93cSSam Leffler char *engine2_id; 45939beb93cSSam Leffler 46039beb93cSSam Leffler 46139beb93cSSam Leffler /** 46239beb93cSSam Leffler * key_id - Key ID for OpenSSL engine 46339beb93cSSam Leffler * 46439beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 46539beb93cSSam Leffler * using a smartcard. 46639beb93cSSam Leffler */ 46739beb93cSSam Leffler char *key_id; 46839beb93cSSam Leffler 46939beb93cSSam Leffler /** 47039beb93cSSam Leffler * cert_id - Cert ID for OpenSSL engine 47139beb93cSSam Leffler * 47239beb93cSSam Leffler * This is used if the certificate operations for EAP-TLS are performed 47339beb93cSSam Leffler * using a smartcard. 47439beb93cSSam Leffler */ 47539beb93cSSam Leffler char *cert_id; 47639beb93cSSam Leffler 47739beb93cSSam Leffler /** 47839beb93cSSam Leffler * ca_cert_id - CA Cert ID for OpenSSL engine 47939beb93cSSam Leffler * 48039beb93cSSam Leffler * This is used if the CA certificate for EAP-TLS is on a smartcard. 48139beb93cSSam Leffler */ 48239beb93cSSam Leffler char *ca_cert_id; 48339beb93cSSam Leffler 48439beb93cSSam Leffler /** 48539beb93cSSam Leffler * key2_id - Key ID for OpenSSL engine (phase2) 48639beb93cSSam Leffler * 48739beb93cSSam Leffler * This is used if private key operations for EAP-TLS are performed 48839beb93cSSam Leffler * using a smartcard. 48939beb93cSSam Leffler */ 49039beb93cSSam Leffler char *key2_id; 49139beb93cSSam Leffler 49239beb93cSSam Leffler /** 49339beb93cSSam Leffler * cert2_id - Cert ID for OpenSSL engine (phase2) 49439beb93cSSam Leffler * 49539beb93cSSam Leffler * This is used if the certificate operations for EAP-TLS are performed 49639beb93cSSam Leffler * using a smartcard. 49739beb93cSSam Leffler */ 49839beb93cSSam Leffler char *cert2_id; 49939beb93cSSam Leffler 50039beb93cSSam Leffler /** 50139beb93cSSam Leffler * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2) 50239beb93cSSam Leffler * 50339beb93cSSam Leffler * This is used if the CA certificate for EAP-TLS is on a smartcard. 50439beb93cSSam Leffler */ 50539beb93cSSam Leffler char *ca_cert2_id; 50639beb93cSSam Leffler 50739beb93cSSam Leffler /** 50839beb93cSSam Leffler * otp - One-time-password 50939beb93cSSam Leffler * 51039beb93cSSam Leffler * This field should not be set in configuration step. It is only used 51139beb93cSSam Leffler * internally when OTP is entered through the control interface. 51239beb93cSSam Leffler */ 51339beb93cSSam Leffler u8 *otp; 51439beb93cSSam Leffler 51539beb93cSSam Leffler /** 51639beb93cSSam Leffler * otp_len - Length of the otp field 51739beb93cSSam Leffler */ 51839beb93cSSam Leffler size_t otp_len; 51939beb93cSSam Leffler 52039beb93cSSam Leffler /** 52139beb93cSSam Leffler * pending_req_identity - Whether there is a pending identity request 52239beb93cSSam Leffler * 52339beb93cSSam Leffler * This field should not be set in configuration step. It is only used 52439beb93cSSam Leffler * internally when control interface is used to request needed 52539beb93cSSam Leffler * information. 52639beb93cSSam Leffler */ 52739beb93cSSam Leffler int pending_req_identity; 52839beb93cSSam Leffler 52939beb93cSSam Leffler /** 53039beb93cSSam Leffler * pending_req_password - Whether there is a pending password request 53139beb93cSSam Leffler * 53239beb93cSSam Leffler * This field should not be set in configuration step. It is only used 53339beb93cSSam Leffler * internally when control interface is used to request needed 53439beb93cSSam Leffler * information. 53539beb93cSSam Leffler */ 53639beb93cSSam Leffler int pending_req_password; 53739beb93cSSam Leffler 53839beb93cSSam Leffler /** 53939beb93cSSam Leffler * pending_req_pin - Whether there is a pending PIN 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_pin; 54639beb93cSSam Leffler 54739beb93cSSam Leffler /** 54839beb93cSSam Leffler * pending_req_new_password - Pending password update 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_new_password; 55539beb93cSSam Leffler 55639beb93cSSam Leffler /** 55739beb93cSSam Leffler * pending_req_passphrase - Pending passphrase 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_passphrase; 56439beb93cSSam Leffler 56539beb93cSSam Leffler /** 56639beb93cSSam Leffler * pending_req_otp - Whether there is a pending OTP 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 char *pending_req_otp; 57339beb93cSSam Leffler 57439beb93cSSam Leffler /** 57539beb93cSSam Leffler * pending_req_otp_len - Length of the pending OTP request 57639beb93cSSam Leffler */ 57739beb93cSSam Leffler size_t pending_req_otp_len; 57839beb93cSSam Leffler 57939beb93cSSam Leffler /** 58039beb93cSSam Leffler * pac_file - File path or blob name for the PAC entries (EAP-FAST) 58139beb93cSSam Leffler * 58239beb93cSSam Leffler * wpa_supplicant will need to be able to create this file and write 58339beb93cSSam Leffler * updates to it when PAC is being provisioned or refreshed. Full path 58439beb93cSSam Leffler * to the file should be used since working directory may change when 58539beb93cSSam Leffler * wpa_supplicant is run in the background. 58639beb93cSSam Leffler * Alternatively, a named configuration blob can be used by setting 58739beb93cSSam Leffler * this to blob://blob_name. 58839beb93cSSam Leffler */ 58939beb93cSSam Leffler char *pac_file; 59039beb93cSSam Leffler 59139beb93cSSam Leffler /** 59239beb93cSSam Leffler * mschapv2_retry - MSCHAPv2 retry in progress 59339beb93cSSam Leffler * 59439beb93cSSam Leffler * This field is used internally by EAP-MSCHAPv2 and should not be set 59539beb93cSSam Leffler * as part of configuration. 59639beb93cSSam Leffler */ 59739beb93cSSam Leffler int mschapv2_retry; 59839beb93cSSam Leffler 59939beb93cSSam Leffler /** 60039beb93cSSam Leffler * new_password - New password for password update 60139beb93cSSam Leffler * 60239beb93cSSam Leffler * This field is used during MSCHAPv2 password update. This is normally 60339beb93cSSam Leffler * requested from the user through the control interface and not set 60439beb93cSSam Leffler * from configuration. 60539beb93cSSam Leffler */ 60639beb93cSSam Leffler u8 *new_password; 60739beb93cSSam Leffler 60839beb93cSSam Leffler /** 60939beb93cSSam Leffler * new_password_len - Length of new_password field 61039beb93cSSam Leffler */ 61139beb93cSSam Leffler size_t new_password_len; 61239beb93cSSam Leffler 61339beb93cSSam Leffler /** 61439beb93cSSam Leffler * fragment_size - Maximum EAP fragment size in bytes (default 1398) 61539beb93cSSam Leffler * 61639beb93cSSam Leffler * This value limits the fragment size for EAP methods that support 61739beb93cSSam Leffler * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set 61839beb93cSSam Leffler * small enough to make the EAP messages fit in MTU of the network 61939beb93cSSam Leffler * interface used for EAPOL. The default value is suitable for most 62039beb93cSSam Leffler * cases. 62139beb93cSSam Leffler */ 62239beb93cSSam Leffler int fragment_size; 62339beb93cSSam Leffler 62439beb93cSSam Leffler #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0) 625*f05cddf9SRui Paulo #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1) 62639beb93cSSam Leffler /** 62739beb93cSSam Leffler * flags - Network configuration flags (bitfield) 62839beb93cSSam Leffler * 62939beb93cSSam Leffler * This variable is used for internal flags to describe further details 63039beb93cSSam Leffler * for the network parameters. 63139beb93cSSam Leffler * bit 0 = password is represented as a 16-byte NtPasswordHash value 63239beb93cSSam Leffler * instead of plaintext password 633*f05cddf9SRui Paulo * bit 1 = password is stored in external storage; the value in the 634*f05cddf9SRui Paulo * password field is the name of that external entry 63539beb93cSSam Leffler */ 63639beb93cSSam Leffler u32 flags; 63739beb93cSSam Leffler }; 63839beb93cSSam Leffler 63939beb93cSSam Leffler 64039beb93cSSam Leffler /** 64139beb93cSSam Leffler * struct wpa_config_blob - Named configuration blob 64239beb93cSSam Leffler * 64339beb93cSSam Leffler * This data structure is used to provide storage for binary objects to store 64439beb93cSSam Leffler * abstract information like certificates and private keys inlined with the 64539beb93cSSam Leffler * configuration data. 64639beb93cSSam Leffler */ 64739beb93cSSam Leffler struct wpa_config_blob { 64839beb93cSSam Leffler /** 64939beb93cSSam Leffler * name - Blob name 65039beb93cSSam Leffler */ 65139beb93cSSam Leffler char *name; 65239beb93cSSam Leffler 65339beb93cSSam Leffler /** 65439beb93cSSam Leffler * data - Pointer to binary data 65539beb93cSSam Leffler */ 65639beb93cSSam Leffler u8 *data; 65739beb93cSSam Leffler 65839beb93cSSam Leffler /** 65939beb93cSSam Leffler * len - Length of binary data 66039beb93cSSam Leffler */ 66139beb93cSSam Leffler size_t len; 66239beb93cSSam Leffler 66339beb93cSSam Leffler /** 66439beb93cSSam Leffler * next - Pointer to next blob in the configuration 66539beb93cSSam Leffler */ 66639beb93cSSam Leffler struct wpa_config_blob *next; 66739beb93cSSam Leffler }; 66839beb93cSSam Leffler 66939beb93cSSam Leffler #endif /* EAP_CONFIG_H */ 670