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