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