]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/eap_peer/eap_config.h
Import wpa_supplicant/hostapd 2.7
[FreeBSD/FreeBSD.git] / 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 /**
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         u8 *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         u8 *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         u8 *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         u8 *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         u8 *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         u8 *subject_match;
198
199         /**
200          * altsubject_match - Constraint for server certificate alt. subject
201          *
202          * Semicolon separated string of entries to be matched against the
203          * alternative subject name of the authentication server certificate.
204          * If this string is set, the server certificate is only accepted if it
205          * contains one of the entries in an alternative subject name
206          * extension.
207          *
208          * altSubjectName string is in following format: TYPE:VALUE
209          *
210          * Example: EMAIL:server@example.com
211          * Example: DNS:server.example.com;DNS:server2.example.com
212          *
213          * Following types are supported: EMAIL, DNS, URI
214          */
215         u8 *altsubject_match;
216
217         /**
218          * domain_suffix_match - Constraint for server domain name
219          *
220          * If set, this FQDN is used as a suffix match requirement for the
221          * server certificate in SubjectAltName dNSName element(s). If a
222          * matching dNSName is found, this constraint is met. If no dNSName
223          * values are present, this constraint is matched against SubjectName CN
224          * using same suffix match comparison. Suffix match here means that the
225          * host/domain name is compared one label at a time starting from the
226          * top-level domain and all the labels in domain_suffix_match shall be
227          * included in the certificate. The certificate may include additional
228          * sub-level labels in addition to the required labels.
229          *
230          * For example, domain_suffix_match=example.com would match
231          * test.example.com but would not match test-example.com.
232          */
233         char *domain_suffix_match;
234
235         /**
236          * domain_match - Constraint for server domain name
237          *
238          * If set, this FQDN is used as a full match requirement for the
239          * server certificate in SubjectAltName dNSName element(s). If a
240          * matching dNSName is found, this constraint is met. If no dNSName
241          * values are present, this constraint is matched against SubjectName CN
242          * using same full match comparison. This behavior is similar to
243          * domain_suffix_match, but has the requirement of a full match, i.e.,
244          * no subdomains or wildcard matches are allowed. Case-insensitive
245          * comparison is used, so "Example.com" matches "example.com", but would
246          * not match "test.Example.com".
247          */
248         char *domain_match;
249
250         /**
251          * ca_cert2 - File path to CA certificate file (PEM/DER) (Phase 2)
252          *
253          * This file can have one or more trusted CA certificates. If ca_cert2
254          * and ca_path2 are not included, server certificate will not be
255          * verified. This is insecure and a trusted CA certificate should
256          * always be configured. Full path to the file should be used since
257          * working directory may change when wpa_supplicant is run in the
258          * background.
259          *
260          * This field is like ca_cert, but used for phase 2 (inside
261          * EAP-TTLS/PEAP/FAST tunnel) authentication.
262          *
263          * Alternatively, a named configuration blob can be used by setting
264          * this to blob://blob_name.
265          */
266         u8 *ca_cert2;
267
268         /**
269          * ca_path2 - Directory path for CA certificate files (PEM) (Phase 2)
270          *
271          * This path may contain multiple CA certificates in OpenSSL format.
272          * Common use for this is to point to system trusted CA list which is
273          * often installed into directory like /etc/ssl/certs. If configured,
274          * these certificates are added to the list of trusted CAs. ca_cert
275          * may also be included in that case, but it is not required.
276          *
277          * This field is like ca_path, but used for phase 2 (inside
278          * EAP-TTLS/PEAP/FAST tunnel) authentication.
279          */
280         u8 *ca_path2;
281
282         /**
283          * client_cert2 - File path to client certificate file
284          *
285          * This field is like client_cert, but used for phase 2 (inside
286          * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
287          * file should be used since working directory may change when
288          * wpa_supplicant is run in the background.
289          *
290          * Alternatively, a named configuration blob can be used by setting
291          * this to blob://blob_name.
292          */
293         u8 *client_cert2;
294
295         /**
296          * private_key2 - File path to client private key file
297          *
298          * This field is like private_key, but used for phase 2 (inside
299          * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
300          * file should be used since working directory may change when
301          * wpa_supplicant is run in the background.
302          *
303          * Alternatively, a named configuration blob can be used by setting
304          * this to blob://blob_name.
305          */
306         u8 *private_key2;
307
308         /**
309          * private_key2_passwd -  Password for private key file
310          *
311          * This field is like private_key_passwd, but used for phase 2 (inside
312          * EAP-TTLS/PEAP/FAST tunnel) authentication.
313          */
314         char *private_key2_passwd;
315
316         /**
317          * dh_file2 - File path to DH/DSA parameters file (in PEM format)
318          *
319          * This field is like dh_file, but used for phase 2 (inside
320          * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
321          * file should be used since working directory may change when
322          * wpa_supplicant is run in the background.
323          *
324          * Alternatively, a named configuration blob can be used by setting
325          * this to blob://blob_name.
326          */
327         u8 *dh_file2;
328
329         /**
330          * subject_match2 - Constraint for server certificate subject
331          *
332          * This field is like subject_match, but used for phase 2 (inside
333          * EAP-TTLS/PEAP/FAST tunnel) authentication.
334          */
335         u8 *subject_match2;
336
337         /**
338          * altsubject_match2 - Constraint for server certificate alt. subject
339          *
340          * This field is like altsubject_match, but used for phase 2 (inside
341          * EAP-TTLS/PEAP/FAST tunnel) authentication.
342          */
343         u8 *altsubject_match2;
344
345         /**
346          * domain_suffix_match2 - Constraint for server domain name
347          *
348          * This field is like domain_suffix_match, but used for phase 2 (inside
349          * EAP-TTLS/PEAP/FAST tunnel) authentication.
350          */
351         char *domain_suffix_match2;
352
353         /**
354          * domain_match2 - Constraint for server domain name
355          *
356          * This field is like domain_match, but used for phase 2 (inside
357          * EAP-TTLS/PEAP/FAST tunnel) authentication.
358          */
359         char *domain_match2;
360
361         /**
362          * eap_methods - Allowed EAP methods
363          *
364          * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
365          * allowed EAP methods or %NULL if all methods are accepted.
366          */
367         struct eap_method_type *eap_methods;
368
369         /**
370          * phase1 - Phase 1 (outer authentication) parameters
371          *
372          * String with field-value pairs, e.g., "peapver=0" or
373          * "peapver=1 peaplabel=1".
374          *
375          * 'peapver' can be used to force which PEAP version (0 or 1) is used.
376          *
377          * 'peaplabel=1' can be used to force new label, "client PEAP
378          * encryption", to be used during key derivation when PEAPv1 or newer.
379          *
380          * Most existing PEAPv1 implementation seem to be using the old label,
381          * "client EAP encryption", and wpa_supplicant is now using that as the
382          * default value.
383          *
384          * Some servers, e.g., Radiator, may require peaplabel=1 configuration
385          * to interoperate with PEAPv1; see eap_testing.txt for more details.
386          *
387          * 'peap_outer_success=0' can be used to terminate PEAP authentication
388          * on tunneled EAP-Success. This is required with some RADIUS servers
389          * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
390          * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
391          *
392          * include_tls_length=1 can be used to force wpa_supplicant to include
393          * TLS Message Length field in all TLS messages even if they are not
394          * fragmented.
395          *
396          * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
397          * challenges (by default, it accepts 2 or 3).
398          *
399          * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
400          * protected result indication.
401          *
402          * fast_provisioning option can be used to enable in-line provisioning
403          * of EAP-FAST credentials (PAC):
404          * 0 = disabled,
405          * 1 = allow unauthenticated provisioning,
406          * 2 = allow authenticated provisioning,
407          * 3 = allow both unauthenticated and authenticated provisioning
408          *
409          * fast_max_pac_list_len=num option can be used to set the maximum
410          * number of PAC entries to store in a PAC list (default: 10).
411          *
412          * fast_pac_format=binary option can be used to select binary format
413          * for storing PAC entries in order to save some space (the default
414          * text format uses about 2.5 times the size of minimal binary format).
415          *
416          * crypto_binding option can be used to control PEAPv0 cryptobinding
417          * behavior:
418          * 0 = do not use cryptobinding (default)
419          * 1 = use cryptobinding if server supports it
420          * 2 = require cryptobinding
421          *
422          * EAP-WSC (WPS) uses following options: pin=Device_Password and
423          * uuid=Device_UUID
424          *
425          * For wired IEEE 802.1X authentication, "allow_canned_success=1" can be
426          * used to configure a mode that allows EAP-Success (and EAP-Failure)
427          * without going through authentication step. Some switches use such
428          * sequence when forcing the port to be authorized/unauthorized or as a
429          * fallback option if the authentication server is unreachable. By
430          * default, wpa_supplicant discards such frames to protect against
431          * potential attacks by rogue devices, but this option can be used to
432          * disable that protection for cases where the server/authenticator does
433          * not need to be authenticated.
434          */
435         char *phase1;
436
437         /**
438          * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
439          *
440          * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
441          * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can
442          * be used to disable MSCHAPv2 password retry in authentication failure
443          * cases.
444          */
445         char *phase2;
446
447         /**
448          * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
449          *
450          * This field is used to configure PC/SC smartcard interface.
451          * Currently, the only configuration is whether this field is %NULL (do
452          * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
453          *
454          * This field is used for EAP-SIM and EAP-AKA.
455          */
456         char *pcsc;
457
458         /**
459          * pin - PIN for USIM, GSM SIM, and smartcards
460          *
461          * This field is used to configure PIN for SIM and smartcards for
462          * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
463          * smartcard is used for private key operations.
464          *
465          * If left out, this will be asked through control interface.
466          */
467         char *pin;
468
469         /**
470          * engine - Enable OpenSSL engine (e.g., for smartcard access)
471          *
472          * This is used if private key operations for EAP-TLS are performed
473          * using a smartcard.
474          */
475         int engine;
476
477         /**
478          * engine_id - Engine ID for OpenSSL engine
479          *
480          * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
481          * engine.
482          *
483          * This is used if private key operations for EAP-TLS are performed
484          * using a smartcard.
485          */
486         char *engine_id;
487
488         /**
489          * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2)
490          *
491          * This is used if private key operations for EAP-TLS are performed
492          * using a smartcard.
493          *
494          * This field is like engine, but used for phase 2 (inside
495          * EAP-TTLS/PEAP/FAST tunnel) authentication.
496          */
497         int engine2;
498
499
500         /**
501          * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2)
502          *
503          * This field is used to configure PIN for SIM and smartcards for
504          * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
505          * smartcard is used for private key operations.
506          *
507          * This field is like pin2, but used for phase 2 (inside
508          * EAP-TTLS/PEAP/FAST tunnel) authentication.
509          *
510          * If left out, this will be asked through control interface.
511          */
512         char *pin2;
513
514         /**
515          * engine2_id - Engine ID for OpenSSL engine (Phase 2)
516          *
517          * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
518          * engine.
519          *
520          * This is used if private key operations for EAP-TLS are performed
521          * using a smartcard.
522          *
523          * This field is like engine_id, but used for phase 2 (inside
524          * EAP-TTLS/PEAP/FAST tunnel) authentication.
525          */
526         char *engine2_id;
527
528
529         /**
530          * key_id - Key ID for OpenSSL engine
531          *
532          * This is used if private key operations for EAP-TLS are performed
533          * using a smartcard.
534          */
535         char *key_id;
536
537         /**
538          * cert_id - Cert ID for OpenSSL engine
539          *
540          * This is used if the certificate operations for EAP-TLS are performed
541          * using a smartcard.
542          */
543         char *cert_id;
544
545         /**
546          * ca_cert_id - CA Cert ID for OpenSSL engine
547          *
548          * This is used if the CA certificate for EAP-TLS is on a smartcard.
549          */
550         char *ca_cert_id;
551
552         /**
553          * key2_id - Key ID for OpenSSL engine (phase2)
554          *
555          * This is used if private key operations for EAP-TLS are performed
556          * using a smartcard.
557          */
558         char *key2_id;
559
560         /**
561          * cert2_id - Cert ID for OpenSSL engine (phase2)
562          *
563          * This is used if the certificate operations for EAP-TLS are performed
564          * using a smartcard.
565          */
566         char *cert2_id;
567
568         /**
569          * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
570          *
571          * This is used if the CA certificate for EAP-TLS is on a smartcard.
572          */
573         char *ca_cert2_id;
574
575         /**
576          * otp - One-time-password
577          *
578          * This field should not be set in configuration step. It is only used
579          * internally when OTP is entered through the control interface.
580          */
581         u8 *otp;
582
583         /**
584          * otp_len - Length of the otp field
585          */
586         size_t otp_len;
587
588         /**
589          * pending_req_identity - Whether there is a pending identity request
590          *
591          * This field should not be set in configuration step. It is only used
592          * internally when control interface is used to request needed
593          * information.
594          */
595         int pending_req_identity;
596
597         /**
598          * pending_req_password - Whether there is a pending password request
599          *
600          * This field should not be set in configuration step. It is only used
601          * internally when control interface is used to request needed
602          * information.
603          */
604         int pending_req_password;
605
606         /**
607          * pending_req_pin - Whether there is a pending PIN request
608          *
609          * This field should not be set in configuration step. It is only used
610          * internally when control interface is used to request needed
611          * information.
612          */
613         int pending_req_pin;
614
615         /**
616          * pending_req_new_password - Pending password update request
617          *
618          * This field should not be set in configuration step. It is only used
619          * internally when control interface is used to request needed
620          * information.
621          */
622         int pending_req_new_password;
623
624         /**
625          * pending_req_passphrase - Pending passphrase request
626          *
627          * This field should not be set in configuration step. It is only used
628          * internally when control interface is used to request needed
629          * information.
630          */
631         int pending_req_passphrase;
632
633         /**
634          * pending_req_sim - Pending SIM request
635          *
636          * This field should not be set in configuration step. It is only used
637          * internally when control interface is used to request needed
638          * information.
639          */
640         int pending_req_sim;
641
642         /**
643          * pending_req_otp - Whether there is a pending OTP request
644          *
645          * This field should not be set in configuration step. It is only used
646          * internally when control interface is used to request needed
647          * information.
648          */
649         char *pending_req_otp;
650
651         /**
652          * pending_req_otp_len - Length of the pending OTP request
653          */
654         size_t pending_req_otp_len;
655
656         /**
657          * pac_file - File path or blob name for the PAC entries (EAP-FAST)
658          *
659          * wpa_supplicant will need to be able to create this file and write
660          * updates to it when PAC is being provisioned or refreshed. Full path
661          * to the file should be used since working directory may change when
662          * wpa_supplicant is run in the background.
663          * Alternatively, a named configuration blob can be used by setting
664          * this to blob://blob_name.
665          */
666         char *pac_file;
667
668         /**
669          * mschapv2_retry - MSCHAPv2 retry in progress
670          *
671          * This field is used internally by EAP-MSCHAPv2 and should not be set
672          * as part of configuration.
673          */
674         int mschapv2_retry;
675
676         /**
677          * new_password - New password for password update
678          *
679          * This field is used during MSCHAPv2 password update. This is normally
680          * requested from the user through the control interface and not set
681          * from configuration.
682          */
683         u8 *new_password;
684
685         /**
686          * new_password_len - Length of new_password field
687          */
688         size_t new_password_len;
689
690         /**
691          * fragment_size - Maximum EAP fragment size in bytes (default 1398)
692          *
693          * This value limits the fragment size for EAP methods that support
694          * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
695          * small enough to make the EAP messages fit in MTU of the network
696          * interface used for EAPOL. The default value is suitable for most
697          * cases.
698          */
699         int fragment_size;
700
701 #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
702 #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
703         /**
704          * flags - Network configuration flags (bitfield)
705          *
706          * This variable is used for internal flags to describe further details
707          * for the network parameters.
708          * bit 0 = password is represented as a 16-byte NtPasswordHash value
709          *         instead of plaintext password
710          * bit 1 = password is stored in external storage; the value in the
711          *         password field is the name of that external entry
712          */
713         u32 flags;
714
715         /**
716          * ocsp - Whether to use/require OCSP to check server certificate
717          *
718          * 0 = do not use OCSP stapling (TLS certificate status extension)
719          * 1 = try to use OCSP stapling, but not require response
720          * 2 = require valid OCSP stapling response
721          */
722         int ocsp;
723
724         /**
725          * external_sim_resp - Response from external SIM processing
726          *
727          * This field should not be set in configuration step. It is only used
728          * internally when control interface is used to request external
729          * SIM/USIM processing.
730          */
731         char *external_sim_resp;
732
733         /**
734          * sim_num - User selected SIM identifier
735          *
736          * This variable is used for identifying which SIM is used if the system
737          * has more than one.
738          */
739         int sim_num;
740
741         /**
742          * openssl_ciphers - OpenSSL cipher string
743          *
744          * This is an OpenSSL specific configuration option for configuring the
745          * ciphers for this connection. If not set, the default cipher suite
746          * list is used.
747          */
748         char *openssl_ciphers;
749
750         /**
751          * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
752          */
753         int erp;
754
755         /**
756          * pending_ext_cert_check - External server certificate check status
757          *
758          * This field should not be set in configuration step. It is only used
759          * internally when control interface is used to request external
760          * validation of server certificate chain.
761          */
762         enum {
763                 NO_CHECK = 0,
764                 PENDING_CHECK,
765                 EXT_CERT_CHECK_GOOD,
766                 EXT_CERT_CHECK_BAD,
767         } pending_ext_cert_check;
768 };
769
770
771 /**
772  * struct wpa_config_blob - Named configuration blob
773  *
774  * This data structure is used to provide storage for binary objects to store
775  * abstract information like certificates and private keys inlined with the
776  * configuration data.
777  */
778 struct wpa_config_blob {
779         /**
780          * name - Blob name
781          */
782         char *name;
783
784         /**
785          * data - Pointer to binary data
786          */
787         u8 *data;
788
789         /**
790          * len - Length of binary data
791          */
792         size_t len;
793
794         /**
795          * next - Pointer to next blob in the configuration
796          */
797         struct wpa_config_blob *next;
798 };
799
800 #endif /* EAP_CONFIG_H */