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