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 */ 15struct 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 * phase2_auth option can be used to control Phase 2 (i.e., within TLS 474 * tunnel) behavior for PEAP: 475 * 0 = do not require Phase 2 authentication 476 * 1 = require Phase 2 authentication when client certificate 477 * (private_key/client_cert) is no used and TLS session resumption was 478 * not used (default) 479 * 2 = require Phase 2 authentication in all cases 480 * 481 * EAP-WSC (WPS) uses following options: pin=Device_Password and 482 * uuid=Device_UUID 483 * 484 * For wired IEEE 802.1X authentication, "allow_canned_success=1" can be 485 * used to configure a mode that allows EAP-Success (and EAP-Failure) 486 * without going through authentication step. Some switches use such 487 * sequence when forcing the port to be authorized/unauthorized or as a 488 * fallback option if the authentication server is unreachable. By 489 * default, wpa_supplicant discards such frames to protect against 490 * potential attacks by rogue devices, but this option can be used to 491 * disable that protection for cases where the server/authenticator does 492 * not need to be authenticated. 493 */ 494 char *phase1; 495 496 /** 497 * phase2 - Phase2 (inner authentication with TLS tunnel) parameters 498 * 499 * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or 500 * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can 501 * be used to disable MSCHAPv2 password retry in authentication failure 502 * cases. 503 */ 504 char *phase2; 505 506 /** 507 * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM 508 * 509 * This field is used to configure PC/SC smartcard interface. 510 * Currently, the only configuration is whether this field is %NULL (do 511 * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC. 512 * 513 * This field is used for EAP-SIM and EAP-AKA. 514 */ 515 char *pcsc; 516 517 /** 518 * pin - PIN for USIM, GSM SIM, and smartcards 519 * 520 * This field is used to configure PIN for SIM and smartcards for 521 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a 522 * smartcard is used for private key operations. 523 * 524 * If left out, this will be asked through control interface. 525 */ 526 char *pin; 527 528 /** 529 * engine - Enable OpenSSL engine (e.g., for smartcard access) 530 * 531 * This is used if private key operations for EAP-TLS are performed 532 * using a smartcard. 533 */ 534 int engine; 535 536 /** 537 * engine_id - Engine ID for OpenSSL engine 538 * 539 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11 540 * engine. 541 * 542 * This is used if private key operations for EAP-TLS are performed 543 * using a smartcard. 544 */ 545 char *engine_id; 546 547 /** 548 * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2) 549 * 550 * This is used if private key operations for EAP-TLS are performed 551 * using a smartcard. 552 * 553 * This field is like engine, but used for phase 2 (inside 554 * EAP-TTLS/PEAP/FAST tunnel) authentication. 555 */ 556 int engine2; 557 558 559 /** 560 * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2) 561 * 562 * This field is used to configure PIN for SIM and smartcards for 563 * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a 564 * smartcard is used for private key operations. 565 * 566 * This field is like pin2, but used for phase 2 (inside 567 * EAP-TTLS/PEAP/FAST tunnel) authentication. 568 * 569 * If left out, this will be asked through control interface. 570 */ 571 char *pin2; 572 573 /** 574 * engine2_id - Engine ID for OpenSSL engine (Phase 2) 575 * 576 * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11 577 * engine. 578 * 579 * This is used if private key operations for EAP-TLS are performed 580 * using a smartcard. 581 * 582 * This field is like engine_id, but used for phase 2 (inside 583 * EAP-TTLS/PEAP/FAST tunnel) authentication. 584 */ 585 char *engine2_id; 586 587 588 /** 589 * key_id - Key ID for OpenSSL engine 590 * 591 * This is used if private key operations for EAP-TLS are performed 592 * using a smartcard. 593 */ 594 char *key_id; 595 596 /** 597 * cert_id - Cert ID for OpenSSL engine 598 * 599 * This is used if the certificate operations for EAP-TLS are performed 600 * using a smartcard. 601 */ 602 char *cert_id; 603 604 /** 605 * ca_cert_id - CA Cert ID for OpenSSL engine 606 * 607 * This is used if the CA certificate for EAP-TLS is on a smartcard. 608 */ 609 char *ca_cert_id; 610 611 /** 612 * key2_id - Key ID for OpenSSL engine (phase2) 613 * 614 * This is used if private key operations for EAP-TLS are performed 615 * using a smartcard. 616 */ 617 char *key2_id; 618 619 /** 620 * cert2_id - Cert ID for OpenSSL engine (phase2) 621 * 622 * This is used if the certificate operations for EAP-TLS are performed 623 * using a smartcard. 624 */ 625 char *cert2_id; 626 627 /** 628 * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2) 629 * 630 * This is used if the CA certificate for EAP-TLS is on a smartcard. 631 */ 632 char *ca_cert2_id; 633 634 /** 635 * otp - One-time-password 636 * 637 * This field should not be set in configuration step. It is only used 638 * internally when OTP is entered through the control interface. 639 */ 640 u8 *otp; 641 642 /** 643 * otp_len - Length of the otp field 644 */ 645 size_t otp_len; 646 647 /** 648 * pending_req_identity - Whether there is a pending identity request 649 * 650 * This field should not be set in configuration step. It is only used 651 * internally when control interface is used to request needed 652 * information. 653 */ 654 int pending_req_identity; 655 656 /** 657 * pending_req_password - Whether there is a pending password request 658 * 659 * This field should not be set in configuration step. It is only used 660 * internally when control interface is used to request needed 661 * information. 662 */ 663 int pending_req_password; 664 665 /** 666 * pending_req_pin - Whether there is a pending PIN request 667 * 668 * This field should not be set in configuration step. It is only used 669 * internally when control interface is used to request needed 670 * information. 671 */ 672 int pending_req_pin; 673 674 /** 675 * pending_req_new_password - Pending password update request 676 * 677 * This field should not be set in configuration step. It is only used 678 * internally when control interface is used to request needed 679 * information. 680 */ 681 int pending_req_new_password; 682 683 /** 684 * pending_req_passphrase - Pending passphrase request 685 * 686 * This field should not be set in configuration step. It is only used 687 * internally when control interface is used to request needed 688 * information. 689 */ 690 int pending_req_passphrase; 691 692 /** 693 * pending_req_sim - Pending SIM request 694 * 695 * This field should not be set in configuration step. It is only used 696 * internally when control interface is used to request needed 697 * information. 698 */ 699 int pending_req_sim; 700 701 /** 702 * pending_req_otp - Whether there is a pending OTP request 703 * 704 * This field should not be set in configuration step. It is only used 705 * internally when control interface is used to request needed 706 * information. 707 */ 708 char *pending_req_otp; 709 710 /** 711 * pending_req_otp_len - Length of the pending OTP request 712 */ 713 size_t pending_req_otp_len; 714 715 /** 716 * pac_file - File path or blob name for the PAC entries (EAP-FAST) 717 * 718 * wpa_supplicant will need to be able to create this file and write 719 * updates to it when PAC is being provisioned or refreshed. Full path 720 * to the file should be used since working directory may change when 721 * wpa_supplicant is run in the background. 722 * Alternatively, a named configuration blob can be used by setting 723 * this to blob://blob_name. 724 */ 725 char *pac_file; 726 727 /** 728 * mschapv2_retry - MSCHAPv2 retry in progress 729 * 730 * This field is used internally by EAP-MSCHAPv2 and should not be set 731 * as part of configuration. 732 */ 733 int mschapv2_retry; 734 735 /** 736 * new_password - New password for password update 737 * 738 * This field is used during MSCHAPv2 password update. This is normally 739 * requested from the user through the control interface and not set 740 * from configuration. 741 */ 742 u8 *new_password; 743 744 /** 745 * new_password_len - Length of new_password field 746 */ 747 size_t new_password_len; 748 749 /** 750 * fragment_size - Maximum EAP fragment size in bytes (default 1398) 751 * 752 * This value limits the fragment size for EAP methods that support 753 * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set 754 * small enough to make the EAP messages fit in MTU of the network 755 * interface used for EAPOL. The default value is suitable for most 756 * cases. 757 */ 758 int fragment_size; 759 760#define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0) 761#define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1) 762 /** 763 * flags - Network configuration flags (bitfield) 764 * 765 * This variable is used for internal flags to describe further details 766 * for the network parameters. 767 * bit 0 = password is represented as a 16-byte NtPasswordHash value 768 * instead of plaintext password 769 * bit 1 = password is stored in external storage; the value in the 770 * password field is the name of that external entry 771 */ 772 u32 flags; 773 774 /** 775 * ocsp - Whether to use/require OCSP to check server certificate 776 * 777 * 0 = do not use OCSP stapling (TLS certificate status extension) 778 * 1 = try to use OCSP stapling, but not require response 779 * 2 = require valid OCSP stapling response 780 */ 781 int ocsp; 782 783 /** 784 * external_sim_resp - Response from external SIM processing 785 * 786 * This field should not be set in configuration step. It is only used 787 * internally when control interface is used to request external 788 * SIM/USIM processing. 789 */ 790 char *external_sim_resp; 791 792 /** 793 * sim_num - User selected SIM identifier 794 * 795 * This variable is used for identifying which SIM is used if the system 796 * has more than one. 797 */ 798 int sim_num; 799 800 /** 801 * openssl_ciphers - OpenSSL cipher string 802 * 803 * This is an OpenSSL specific configuration option for configuring the 804 * ciphers for this connection. If not set, the default cipher suite 805 * list is used. 806 */ 807 char *openssl_ciphers; 808 809 /** 810 * erp - Whether EAP Re-authentication Protocol (ERP) is enabled 811 */ 812 int erp; 813 814 /** 815 * pending_ext_cert_check - External server certificate check status 816 * 817 * This field should not be set in configuration step. It is only used 818 * internally when control interface is used to request external 819 * validation of server certificate chain. 820 */ 821 enum { 822 NO_CHECK = 0, 823 PENDING_CHECK, 824 EXT_CERT_CHECK_GOOD, 825 EXT_CERT_CHECK_BAD, 826 } pending_ext_cert_check; 827 828 int teap_anon_dh; 829}; 830 831 832/** 833 * struct wpa_config_blob - Named configuration blob 834 * 835 * This data structure is used to provide storage for binary objects to store 836 * abstract information like certificates and private keys inlined with the 837 * configuration data. 838 */ 839struct wpa_config_blob { 840 /** 841 * name - Blob name 842 */ 843 char *name; 844 845 /** 846 * data - Pointer to binary data 847 */ 848 u8 *data; 849 850 /** 851 * len - Length of binary data 852 */ 853 size_t len; 854 855 /** 856 * next - Pointer to next blob in the configuration 857 */ 858 struct wpa_config_blob *next; 859}; 860 861#endif /* EAP_CONFIG_H */ 862