eap_config.h 25 KB

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