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