• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * EAP peer configuration data
3  * Copyright (c) 2003-2019, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef EAP_CONFIG_H
10 #define EAP_CONFIG_H
11 
12 /**
13  * struct eap_peer_cert_config - EAP peer certificate configuration/credential
14  */
15 struct eap_peer_cert_config {
16 	/**
17 	 * ca_cert - File path to CA certificate file (PEM/DER)
18 	 *
19 	 * This file can have one or more trusted CA certificates. If ca_cert
20 	 * and ca_path are not included, server certificate will not be
21 	 * verified. This is insecure and a trusted CA certificate should
22 	 * always be configured when using EAP-TLS/TTLS/PEAP. Full path to the
23 	 * file should be used since working directory may change when
24 	 * wpa_supplicant is run in the background.
25 	 *
26 	 * Alternatively, a named configuration blob can be used by setting
27 	 * this to blob://blob_name.
28 	 *
29 	 * Alternatively, this can be used to only perform matching of the
30 	 * server certificate (SHA-256 hash of the DER encoded X.509
31 	 * certificate). In this case, the possible CA certificates in the
32 	 * server certificate chain are ignored and only the server certificate
33 	 * is verified. This is configured with the following format:
34 	 * hash:://server/sha256/cert_hash_in_hex
35 	 * For example: "hash://server/sha256/
36 	 * 5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a"
37 	 *
38 	 * On Windows, trusted CA certificates can be loaded from the system
39 	 * certificate store by setting this to cert_store://name, e.g.,
40 	 * ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT".
41 	 * Note that when running wpa_supplicant as an application, the user
42 	 * certificate store (My user account) is used, whereas computer store
43 	 * (Computer account) is used when running wpasvc as a service.
44 	 */
45 	char *ca_cert;
46 
47 	/**
48 	 * ca_path - Directory path for CA certificate files (PEM)
49 	 *
50 	 * This path may contain multiple CA certificates in OpenSSL format.
51 	 * Common use for this is to point to system trusted CA list which is
52 	 * often installed into directory like /etc/ssl/certs. If configured,
53 	 * these certificates are added to the list of trusted CAs. ca_cert
54 	 * may also be included in that case, but it is not required.
55 	 */
56 	char *ca_path;
57 
58 	/**
59 	 * client_cert - File path to client certificate file (PEM/DER)
60 	 *
61 	 * This field is used with EAP method that use TLS authentication.
62 	 * Usually, this is only configured for EAP-TLS, even though this could
63 	 * in theory be used with EAP-TTLS and EAP-PEAP, too. Full path to the
64 	 * file should be used since working directory may change when
65 	 * wpa_supplicant is run in the background.
66 	 *
67 	 * Alternatively, a named configuration blob can be used by setting
68 	 * this to blob://blob_name.
69 	 */
70 	char *client_cert;
71 
72 	/**
73 	 * private_key - File path to client private key file (PEM/DER/PFX)
74 	 *
75 	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
76 	 * commented out. Both the private key and certificate will be read
77 	 * from the PKCS#12 file in this case. Full path to the file should be
78 	 * used since working directory may change when wpa_supplicant is run
79 	 * in the background.
80 	 *
81 	 * Windows certificate store can be used by leaving client_cert out and
82 	 * configuring private_key in one of the following formats:
83 	 *
84 	 * cert://substring_to_match
85 	 *
86 	 * hash://certificate_thumbprint_in_hex
87 	 *
88 	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
89 	 *
90 	 * Note that when running wpa_supplicant as an application, the user
91 	 * certificate store (My user account) is used, whereas computer store
92 	 * (Computer account) is used when running wpasvc as a service.
93 	 *
94 	 * Alternatively, a named configuration blob can be used by setting
95 	 * this to blob://blob_name.
96 	 */
97 	char *private_key;
98 
99 	/**
100 	 * private_key_passwd - Password for private key file
101 	 *
102 	 * If left out, this will be asked through control interface.
103 	 */
104 	char *private_key_passwd;
105 
106 	/**
107 	 * dh_file - File path to DH/DSA parameters file (in PEM format)
108 	 *
109 	 * This is an optional configuration file for setting parameters for an
110 	 * ephemeral DH key exchange. In most cases, the default RSA
111 	 * authentication does not use this configuration. However, it is
112 	 * possible setup RSA to use ephemeral DH key exchange. In addition,
113 	 * ciphers with DSA keys always use ephemeral DH keys. This can be used
114 	 * to achieve forward secrecy. If the file is in DSA parameters format,
115 	 * it will be automatically converted into DH params. Full path to the
116 	 * file should be used since working directory may change when
117 	 * wpa_supplicant is run in the background.
118 	 *
119 	 * Alternatively, a named configuration blob can be used by setting
120 	 * this to blob://blob_name.
121 	 */
122 	char *dh_file;
123 
124 	/**
125 	 * subject_match - Constraint for server certificate subject
126 	 *
127 	 * This substring is matched against the subject of the authentication
128 	 * server certificate. If this string is set, the server certificate is
129 	 * only accepted if it contains this string in the subject. The subject
130 	 * string is in following format:
131 	 *
132 	 * /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@n.example.com
133 	 *
134 	 * Note: Since this is a substring match, this cannot be used securely
135 	 * to do a suffix match against a possible domain name in the CN entry.
136 	 * For such a use case, domain_suffix_match should be used instead.
137 	 */
138 	char *subject_match;
139 
140 	/**
141 	 * check_cert_subject - Constraint for server certificate subject fields
142 	 *
143 	 * If check_cert_subject is set, the value of every field will be
144 	 * checked against the DN of the subject in the authentication server
145 	 * certificate. If the values do not match, the certificate verification
146 	 * will fail, rejecting the server. This option allows wpa_supplicant to
147 	 * match every individual field in the right order against the DN of the
148 	 * subject in the server certificate.
149 	 *
150 	 * For example, check_cert_subject=C=US/O=XX/OU=ABC/OU=XYZ/CN=1234 will
151 	 * check every individual DN field of the subject in the server
152 	 * certificate. If OU=XYZ comes first in terms of the order in the
153 	 * server certificate (DN field of server certificate
154 	 * C=US/O=XX/OU=XYZ/OU=ABC/CN=1234), wpa_supplicant will reject the
155 	 * server because the order of 'OU' is not matching the specified string
156 	 * in check_cert_subject.
157 	 *
158 	 * This option also allows '*' as a wildcard. This option has some
159 	 * limitation.
160 	 * It can only be used as per the following example.
161 	 *
162 	 * For example, check_cert_subject=C=US/O=XX/OU=Production* and we have
163 	 * two servers and DN of the subject in the first server certificate is
164 	 * (C=US/O=XX/OU=Production Unit) and DN of the subject in the second
165 	 * server is (C=US/O=XX/OU=Production Factory). In this case,
166 	 * wpa_supplicant will allow both servers because the value of 'OU'
167 	 * field in both server certificates matches 'OU' value in
168 	 * 'check_cert_subject' up to 'wildcard'.
169 	 *
170 	 * (Allow all servers, e.g., check_cert_subject=*)
171 	 */
172 	char *check_cert_subject;
173 
174 	/**
175 	 * altsubject_match - Constraint for server certificate alt. subject
176 	 *
177 	 * Semicolon separated string of entries to be matched against the
178 	 * alternative subject name of the authentication server certificate.
179 	 * If this string is set, the server certificate is only accepted if it
180 	 * contains one of the entries in an alternative subject name
181 	 * extension.
182 	 *
183 	 * altSubjectName string is in following format: TYPE:VALUE
184 	 *
185 	 * Example: EMAIL:server@example.com
186 	 * Example: DNS:server.example.com;DNS:server2.example.com
187 	 *
188 	 * Following types are supported: EMAIL, DNS, URI
189 	 */
190 	char *altsubject_match;
191 
192 	/**
193 	 * domain_suffix_match - Constraint for server domain name
194 	 *
195 	 * If set, this semicolon deliminated list of FQDNs is used as suffix
196 	 * match requirements for the server certificate in SubjectAltName
197 	 * dNSName element(s). If a matching dNSName is found against any of the
198 	 * specified values, this constraint is met. If no dNSName values are
199 	 * present, this constraint is matched against SubjectName CN using same
200 	 * suffix match comparison. Suffix match here means that the host/domain
201 	 * name is compared case-insentively one label at a time starting from
202 	 * the top-level domain and all the labels in domain_suffix_match shall
203 	 * be included in the certificate. The certificate may include
204 	 * additional sub-level labels in addition to the required labels.
205 	 *
206 	 * For example, domain_suffix_match=example.com would match
207 	 * test.example.com but would not match test-example.com. Multiple
208 	 * match options can be specified in following manner:
209 	 * example.org;example.com.
210 	 */
211 	char *domain_suffix_match;
212 
213 	/**
214 	 * domain_match - Constraint for server domain name
215 	 *
216 	 * If set, this FQDN is used as a full match requirement for the
217 	 * server certificate in SubjectAltName dNSName element(s). If a
218 	 * matching dNSName is found, this constraint is met. If no dNSName
219 	 * values are present, this constraint is matched against SubjectName CN
220 	 * using same full match comparison. This behavior is similar to
221 	 * domain_suffix_match, but has the requirement of a full match, i.e.,
222 	 * no subdomains or wildcard matches are allowed. Case-insensitive
223 	 * comparison is used, so "Example.com" matches "example.com", but would
224 	 * not match "test.Example.com".
225 	 *
226 	 * More than one match string can be provided by using semicolons to
227 	 * separate the strings (e.g., example.org;example.com). When multiple
228 	 * strings are specified, a match with any one of the values is
229 	 * considered a sufficient match for the certificate, i.e., the
230 	 * conditions are ORed together.
231 	 */
232 	char *domain_match;
233 
234 	/**
235 	 * pin - PIN for USIM, GSM SIM, and smartcards
236 	 *
237 	 * This field is used to configure PIN for SIM and smartcards for
238 	 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
239 	 * smartcard is used for private key operations.
240 	 *
241 	 * If left out, this will be asked through control interface.
242 	 */
243 	char *pin;
244 
245 	/**
246 	 * engine - Enable OpenSSL engine (e.g., for smartcard access)
247 	 *
248 	 * This is used if private key operations for EAP-TLS are performed
249 	 * using a smartcard.
250 	 */
251 	int engine;
252 
253 	/**
254 	 * engine_id - Engine ID for OpenSSL engine
255 	 *
256 	 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
257 	 * engine.
258 	 *
259 	 * This is used if private key operations for EAP-TLS are performed
260 	 * using a smartcard.
261 	 */
262 	char *engine_id;
263 
264 
265 	/**
266 	 * key_id - Key ID for OpenSSL engine
267 	 *
268 	 * This is used if private key operations for EAP-TLS are performed
269 	 * using a smartcard.
270 	 */
271 	char *key_id;
272 
273 	/**
274 	 * cert_id - Cert ID for OpenSSL engine
275 	 *
276 	 * This is used if the certificate operations for EAP-TLS are performed
277 	 * using a smartcard.
278 	 */
279 	char *cert_id;
280 
281 	/**
282 	 * ca_cert_id - CA Cert ID for OpenSSL engine
283 	 *
284 	 * This is used if the CA certificate for EAP-TLS is on a smartcard.
285 	 */
286 	char *ca_cert_id;
287 
288 	/**
289 	 * ocsp - Whether to use/require OCSP to check server certificate
290 	 *
291 	 * 0 = do not use OCSP stapling (TLS certificate status extension)
292 	 * 1 = try to use OCSP stapling, but not require response
293 	 * 2 = require valid OCSP stapling response
294 	 */
295 	int ocsp;
296 };
297 
298 /**
299  * struct eap_peer_config - EAP peer configuration/credentials
300  */
301 struct eap_peer_config {
302 	/**
303 	 * identity - EAP Identity
304 	 *
305 	 * This field is used to set the real user identity or NAI (for
306 	 * EAP-PSK/PAX/SAKE/GPSK).
307 	 */
308 	u8 *identity;
309 
310 	/**
311 	 * identity_len - EAP Identity length
312 	 */
313 	size_t identity_len;
314 
315 	/**
316 	 * anonymous_identity -  Anonymous EAP Identity
317 	 *
318 	 * This field is used for unencrypted use with EAP types that support
319 	 * different tunnelled identity, e.g., EAP-TTLS, in order to reveal the
320 	 * real identity (identity field) only to the authentication server.
321 	 *
322 	 * If not set, the identity field will be used for both unencrypted and
323 	 * protected fields.
324 	 *
325 	 * This field can also be used with EAP-SIM/AKA/AKA' to store the
326 	 * pseudonym identity.
327 	 */
328 	u8 *anonymous_identity;
329 
330 	/**
331 	 * anonymous_identity_len - Length of anonymous_identity
332 	 */
333 	size_t anonymous_identity_len;
334 
335 	u8 *imsi_identity;
336 	size_t imsi_identity_len;
337 
338 	/**
339 	 * machine_identity - EAP Identity for machine credential
340 	 *
341 	 * This field is used to set the machine identity or NAI for cases where
342 	 * and explicit machine credential (instead of or in addition to a user
343 	 * credential (from %identity) is needed.
344 	 */
345 	u8 *machine_identity;
346 
347 	/**
348 	 * machine_identity_len - EAP Identity length for machine credential
349 	 */
350 	size_t machine_identity_len;
351 
352 #ifdef CONFIG_EAP_AUTH
353 	u8 *sim_kc;
354 	size_t sim_kc_len;
355 	u8 *sim_sres;
356 	size_t sim_sres_len;
357 	u8 *param_ki;
358 	size_t param_ki_len;
359 	u8 *param_opc;
360 	size_t param_opc_len;
361 	u8 *param_amf;
362 	size_t param_amf_len;
363 	u8 *param_sqn;
364 	size_t param_sqn_len;
365 #endif
366 
367 	/**
368 	 * password - Password string for EAP
369 	 *
370 	 * This field can include either the plaintext password (default
371 	 * option) or a NtPasswordHash (16-byte MD4 hash of the unicode
372 	 * presentation of the password) if flags field has
373 	 * EAP_CONFIG_FLAGS_PASSWORD_NTHASH bit set to 1. NtPasswordHash can
374 	 * only be used with authentication mechanism that use this hash as the
375 	 * starting point for operation: MSCHAP and MSCHAPv2 (EAP-MSCHAPv2,
376 	 * EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP).
377 	 *
378 	 * In addition, this field is used to configure a pre-shared key for
379 	 * EAP-PSK/PAX/SAKE/GPSK. The length of the PSK must be 16 for EAP-PSK
380 	 * and EAP-PAX and 32 for EAP-SAKE. EAP-GPSK can use a variable length
381 	 * PSK.
382 	 */
383 	u8 *password;
384 
385 	/**
386 	 * password_len - Length of password field
387 	 */
388 	size_t password_len;
389 
390 	/**
391 	 * machine_password - Password string for EAP machine credential
392 	 *
393 	 * This field is used when machine credential based on username/password
394 	 * is needed instead of a user credential (from %password). See
395 	 * %password for more details on the format.
396 	 */
397 	u8 *machine_password;
398 
399 	/**
400 	 * machine_password_len - Length of machine credential password field
401 	 */
402 	size_t machine_password_len;
403 
404 	/**
405 	 * cert - Certificate parameters for Phase 1
406 	 */
407 	struct eap_peer_cert_config cert;
408 
409 	/**
410 	 * phase2_cert - Certificate parameters for Phase 2
411 	 *
412 	 * This is like cert, but used for Phase 2 (inside
413 	 * EAP-TTLS/PEAP/FAST/TEAP tunnel) authentication.
414 	 */
415 	struct eap_peer_cert_config phase2_cert;
416 
417 	/**
418 	 * machine_cert - Certificate parameters for Phase 2 machine credential
419 	 *
420 	 * This is like cert, but used for Phase 2 (inside EAP-TEAP tunnel)
421 	 * authentication with machine credentials (while phase2_cert is used
422 	 * for user credentials).
423 	 */
424 	struct eap_peer_cert_config machine_cert;
425 
426 	/**
427 	 * eap_methods - Allowed EAP methods
428 	 *
429 	 * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
430 	 * allowed EAP methods or %NULL if all methods are accepted.
431 	 */
432 	struct eap_method_type *eap_methods;
433 
434 	/**
435 	 * phase1 - Phase 1 (outer authentication) parameters
436 	 *
437 	 * String with field-value pairs, e.g., "peapver=0" or
438 	 * "peapver=1 peaplabel=1".
439 	 *
440 	 * 'peapver' can be used to force which PEAP version (0 or 1) is used.
441 	 *
442 	 * 'peaplabel=1' can be used to force new label, "client PEAP
443 	 * encryption",	to be used during key derivation when PEAPv1 or newer.
444 	 *
445 	 * Most existing PEAPv1 implementation seem to be using the old label,
446 	 * "client EAP encryption", and wpa_supplicant is now using that as the
447 	 * default value.
448 	 *
449 	 * Some servers, e.g., Radiator, may require peaplabel=1 configuration
450 	 * to interoperate with PEAPv1; see eap_testing.txt for more details.
451 	 *
452 	 * 'peap_outer_success=0' can be used to terminate PEAP authentication
453 	 * on tunneled EAP-Success. This is required with some RADIUS servers
454 	 * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
455 	 * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
456 	 *
457 	 * include_tls_length=1 can be used to force wpa_supplicant to include
458 	 * TLS Message Length field in all TLS messages even if they are not
459 	 * fragmented.
460 	 *
461 	 * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
462 	 * challenges (by default, it accepts 2 or 3).
463 	 *
464 	 * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
465 	 * protected result indication.
466 	 *
467 	 * fast_provisioning option can be used to enable in-line provisioning
468 	 * of EAP-FAST credentials (PAC):
469 	 * 0 = disabled,
470 	 * 1 = allow unauthenticated provisioning,
471 	 * 2 = allow authenticated provisioning,
472 	 * 3 = allow both unauthenticated and authenticated provisioning
473 	 *
474 	 * fast_max_pac_list_len=num option can be used to set the maximum
475 	 * number of PAC entries to store in a PAC list (default: 10).
476 	 *
477 	 * fast_pac_format=binary option can be used to select binary format
478 	 * for storing PAC entries in order to save some space (the default
479 	 * text format uses about 2.5 times the size of minimal binary format).
480 	 *
481 	 * crypto_binding option can be used to control PEAPv0 cryptobinding
482 	 * behavior:
483 	 * 0 = do not use cryptobinding (default)
484 	 * 1 = use cryptobinding if server supports it
485 	 * 2 = require cryptobinding
486 	 *
487 	 * phase2_auth option can be used to control Phase 2 (i.e., within TLS
488 	 * tunnel) behavior for PEAP:
489 	 * 0 = do not require Phase 2 authentication
490 	 * 1 = require Phase 2 authentication when client certificate
491 	 *  (private_key/client_cert) is no used and TLS session resumption was
492 	 *  not used (default)
493 	 * 2 = require Phase 2 authentication in all cases
494 	 *
495 	 * EAP-WSC (WPS) uses following options: pin=Device_Password and
496 	 * uuid=Device_UUID
497 	 *
498 	 * For wired IEEE 802.1X authentication, "allow_canned_success=1" can be
499 	 * used to configure a mode that allows EAP-Success (and EAP-Failure)
500 	 * without going through authentication step. Some switches use such
501 	 * sequence when forcing the port to be authorized/unauthorized or as a
502 	 * fallback option if the authentication server is unreachable. By
503 	 * default, wpa_supplicant discards such frames to protect against
504 	 * potential attacks by rogue devices, but this option can be used to
505 	 * disable that protection for cases where the server/authenticator does
506 	 * not need to be authenticated.
507 	 */
508 	char *phase1;
509 
510 	/**
511 	 * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
512 	 *
513 	 * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
514 	 * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can
515 	 * be used to disable MSCHAPv2 password retry in authentication failure
516 	 * cases.
517 	 */
518 	char *phase2;
519 
520 	/**
521 	 * machine_phase2 - Phase2 parameters for machine credentials
522 	 *
523 	 * See phase2 for more details.
524 	 */
525 	char *machine_phase2;
526 
527 	/**
528 	 * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
529 	 *
530 	 * This field is used to configure PC/SC smartcard interface.
531 	 * Currently, the only configuration is whether this field is %NULL (do
532 	 * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
533 	 *
534 	 * This field is used for EAP-SIM and EAP-AKA.
535 	 */
536 	char *pcsc;
537 
538 	/**
539 	 * otp - One-time-password
540 	 *
541 	 * This field should not be set in configuration step. It is only used
542 	 * internally when OTP is entered through the control interface.
543 	 */
544 	u8 *otp;
545 
546 	/**
547 	 * otp_len - Length of the otp field
548 	 */
549 	size_t otp_len;
550 
551 	/**
552 	 * pending_req_identity - Whether there is a pending identity request
553 	 *
554 	 * This field should not be set in configuration step. It is only used
555 	 * internally when control interface is used to request needed
556 	 * information.
557 	 */
558 	int pending_req_identity;
559 
560 	/**
561 	 * pending_req_password - Whether there is a pending password request
562 	 *
563 	 * This field should not be set in configuration step. It is only used
564 	 * internally when control interface is used to request needed
565 	 * information.
566 	 */
567 	int pending_req_password;
568 
569 	/**
570 	 * pending_req_pin - Whether there is a pending PIN request
571 	 *
572 	 * This field should not be set in configuration step. It is only used
573 	 * internally when control interface is used to request needed
574 	 * information.
575 	 */
576 	int pending_req_pin;
577 
578 	/**
579 	 * pending_req_new_password - Pending password update request
580 	 *
581 	 * This field should not be set in configuration step. It is only used
582 	 * internally when control interface is used to request needed
583 	 * information.
584 	 */
585 	int pending_req_new_password;
586 
587 	/**
588 	 * pending_req_passphrase - Pending passphrase request
589 	 *
590 	 * This field should not be set in configuration step. It is only used
591 	 * internally when control interface is used to request needed
592 	 * information.
593 	 */
594 	int pending_req_passphrase;
595 
596 	/**
597 	 * pending_req_sim - Pending SIM request
598 	 *
599 	 * This field should not be set in configuration step. It is only used
600 	 * internally when control interface is used to request needed
601 	 * information.
602 	 */
603 	int pending_req_sim;
604 
605 	/**
606 	 * pending_req_otp - Whether there is a pending OTP request
607 	 *
608 	 * This field should not be set in configuration step. It is only used
609 	 * internally when control interface is used to request needed
610 	 * information.
611 	 */
612 	char *pending_req_otp;
613 
614 	/**
615 	 * pending_req_otp_len - Length of the pending OTP request
616 	 */
617 	size_t pending_req_otp_len;
618 
619 	/**
620 	 * pac_file - File path or blob name for the PAC entries (EAP-FAST)
621 	 *
622 	 * wpa_supplicant will need to be able to create this file and write
623 	 * updates to it when PAC is being provisioned or refreshed. Full path
624 	 * to the file should be used since working directory may change when
625 	 * wpa_supplicant is run in the background.
626 	 * Alternatively, a named configuration blob can be used by setting
627 	 * this to blob://blob_name.
628 	 */
629 	char *pac_file;
630 
631 	/**
632 	 * mschapv2_retry - MSCHAPv2 retry in progress
633 	 *
634 	 * This field is used internally by EAP-MSCHAPv2 and should not be set
635 	 * as part of configuration.
636 	 */
637 	int mschapv2_retry;
638 
639 	/**
640 	 * new_password - New password for password update
641 	 *
642 	 * This field is used during MSCHAPv2 password update. This is normally
643 	 * requested from the user through the control interface and not set
644 	 * from configuration.
645 	 */
646 	u8 *new_password;
647 
648 	/**
649 	 * new_password_len - Length of new_password field
650 	 */
651 	size_t new_password_len;
652 
653 	/**
654 	 * fragment_size - Maximum EAP fragment size in bytes (default 1398)
655 	 *
656 	 * This value limits the fragment size for EAP methods that support
657 	 * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
658 	 * small enough to make the EAP messages fit in MTU of the network
659 	 * interface used for EAPOL. The default value is suitable for most
660 	 * cases.
661 	 */
662 	int fragment_size;
663 
664 #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
665 #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
666 #define EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH BIT(2)
667 #define EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD BIT(3)
668 	/**
669 	 * flags - Network configuration flags (bitfield)
670 	 *
671 	 * This variable is used for internal flags to describe further details
672 	 * for the network parameters.
673 	 * bit 0 = password is represented as a 16-byte NtPasswordHash value
674 	 *         instead of plaintext password
675 	 * bit 1 = password is stored in external storage; the value in the
676 	 *         password field is the name of that external entry
677 	 * bit 2 = machine password is represented as a 16-byte NtPasswordHash
678 	 *         value instead of plaintext password
679 	 * bit 3 = machine password is stored in external storage; the value in
680 	 *         the password field is the name of that external entry
681 	 */
682 	u32 flags;
683 
684 	/**
685 	 * external_sim_resp - Response from external SIM processing
686 	 *
687 	 * This field should not be set in configuration step. It is only used
688 	 * internally when control interface is used to request external
689 	 * SIM/USIM processing.
690 	 */
691 	char *external_sim_resp;
692 
693 	/**
694 	 * sim_num - User selected SIM identifier
695 	 *
696 	 * This variable is used for identifying which SIM is used if the system
697 	 * has more than one.
698 	 */
699 	int sim_num;
700 
701 	/**
702 	 * openssl_ciphers - OpenSSL cipher string
703 	 *
704 	 * This is an OpenSSL specific configuration option for configuring the
705 	 * ciphers for this connection. If not set, the default cipher suite
706 	 * list is used.
707 	 */
708 	char *openssl_ciphers;
709 
710 	/**
711 	 * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
712 	 */
713 	int erp;
714 
715 	/**
716 	 * pending_ext_cert_check - External server certificate check status
717 	 *
718 	 * This field should not be set in configuration step. It is only used
719 	 * internally when control interface is used to request external
720 	 * validation of server certificate chain.
721 	 */
722 	enum {
723 		NO_CHECK = 0,
724 		PENDING_CHECK,
725 		EXT_CERT_CHECK_GOOD,
726 		EXT_CERT_CHECK_BAD,
727 	} pending_ext_cert_check;
728 
729 	int teap_anon_dh;
730 };
731 
732 
733 /**
734  * struct wpa_config_blob - Named configuration blob
735  *
736  * This data structure is used to provide storage for binary objects to store
737  * abstract information like certificates and private keys inlined with the
738  * configuration data.
739  */
740 struct wpa_config_blob {
741 	/**
742 	 * name - Blob name
743 	 */
744 	char *name;
745 
746 	/**
747 	 * data - Pointer to binary data
748 	 */
749 	u8 *data;
750 
751 	/**
752 	 * len - Length of binary data
753 	 */
754 	size_t len;
755 
756 	/**
757 	 * next - Pointer to next blob in the configuration
758 	 */
759 	struct wpa_config_blob *next;
760 };
761 
762 #endif /* EAP_CONFIG_H */
763