eap_config.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  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 sertificate 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 securily
  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 sertificate 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. * ca_cert2 - File path to CA certificate file (PEM/DER) (Phase 2)
  217. *
  218. * This file can have one or more trusted CA certificates. If ca_cert2
  219. * and ca_path2 are not included, server certificate will not be
  220. * verified. This is insecure and a trusted CA certificate should
  221. * always be configured. Full path to the file should be used since
  222. * working directory may change when wpa_supplicant is run in the
  223. * background.
  224. *
  225. * This field is like ca_cert, but used for phase 2 (inside
  226. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  227. *
  228. * Alternatively, a named configuration blob can be used by setting
  229. * this to blob://blob_name.
  230. */
  231. u8 *ca_cert2;
  232. /**
  233. * ca_path2 - Directory path for CA certificate files (PEM) (Phase 2)
  234. *
  235. * This path may contain multiple CA certificates in OpenSSL format.
  236. * Common use for this is to point to system trusted CA list which is
  237. * often installed into directory like /etc/ssl/certs. If configured,
  238. * these certificates are added to the list of trusted CAs. ca_cert
  239. * may also be included in that case, but it is not required.
  240. *
  241. * This field is like ca_path, but used for phase 2 (inside
  242. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  243. */
  244. u8 *ca_path2;
  245. /**
  246. * client_cert2 - File path to client certificate file
  247. *
  248. * This field is like client_cert, but used for phase 2 (inside
  249. * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
  250. * file should be used since working directory may change when
  251. * wpa_supplicant is run in the background.
  252. *
  253. * Alternatively, a named configuration blob can be used by setting
  254. * this to blob://blob_name.
  255. */
  256. u8 *client_cert2;
  257. /**
  258. * private_key2 - File path to client private key file
  259. *
  260. * This field is like private_key, but used for phase 2 (inside
  261. * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
  262. * file should be used since working directory may change when
  263. * wpa_supplicant is run in the background.
  264. *
  265. * Alternatively, a named configuration blob can be used by setting
  266. * this to blob://blob_name.
  267. */
  268. u8 *private_key2;
  269. /**
  270. * private_key2_passwd - Password for private key file
  271. *
  272. * This field is like private_key_passwd, but used for phase 2 (inside
  273. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  274. */
  275. char *private_key2_passwd;
  276. /**
  277. * dh_file2 - File path to DH/DSA parameters file (in PEM format)
  278. *
  279. * This field is like dh_file, but used for phase 2 (inside
  280. * EAP-TTLS/PEAP/FAST tunnel) authentication. Full path to the
  281. * file should be used since working directory may change when
  282. * wpa_supplicant is run in the background.
  283. *
  284. * Alternatively, a named configuration blob can be used by setting
  285. * this to blob://blob_name.
  286. */
  287. u8 *dh_file2;
  288. /**
  289. * subject_match2 - Constraint for server certificate subject
  290. *
  291. * This field is like subject_match, but used for phase 2 (inside
  292. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  293. */
  294. u8 *subject_match2;
  295. /**
  296. * altsubject_match2 - Constraint for server certificate alt. subject
  297. *
  298. * This field is like altsubject_match, but used for phase 2 (inside
  299. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  300. */
  301. u8 *altsubject_match2;
  302. /**
  303. * domain_suffix_match2 - Constraint for server domain name
  304. *
  305. * This field is like domain_suffix_match, but used for phase 2 (inside
  306. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  307. */
  308. char *domain_suffix_match2;
  309. /**
  310. * eap_methods - Allowed EAP methods
  311. *
  312. * (vendor=EAP_VENDOR_IETF,method=EAP_TYPE_NONE) terminated list of
  313. * allowed EAP methods or %NULL if all methods are accepted.
  314. */
  315. struct eap_method_type *eap_methods;
  316. /**
  317. * phase1 - Phase 1 (outer authentication) parameters
  318. *
  319. * String with field-value pairs, e.g., "peapver=0" or
  320. * "peapver=1 peaplabel=1".
  321. *
  322. * 'peapver' can be used to force which PEAP version (0 or 1) is used.
  323. *
  324. * 'peaplabel=1' can be used to force new label, "client PEAP
  325. * encryption", to be used during key derivation when PEAPv1 or newer.
  326. *
  327. * Most existing PEAPv1 implementation seem to be using the old label,
  328. * "client EAP encryption", and wpa_supplicant is now using that as the
  329. * default value.
  330. *
  331. * Some servers, e.g., Radiator, may require peaplabel=1 configuration
  332. * to interoperate with PEAPv1; see eap_testing.txt for more details.
  333. *
  334. * 'peap_outer_success=0' can be used to terminate PEAP authentication
  335. * on tunneled EAP-Success. This is required with some RADIUS servers
  336. * that implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g.,
  337. * Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode).
  338. *
  339. * include_tls_length=1 can be used to force wpa_supplicant to include
  340. * TLS Message Length field in all TLS messages even if they are not
  341. * fragmented.
  342. *
  343. * sim_min_num_chal=3 can be used to configure EAP-SIM to require three
  344. * challenges (by default, it accepts 2 or 3).
  345. *
  346. * result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
  347. * protected result indication.
  348. *
  349. * fast_provisioning option can be used to enable in-line provisioning
  350. * of EAP-FAST credentials (PAC):
  351. * 0 = disabled,
  352. * 1 = allow unauthenticated provisioning,
  353. * 2 = allow authenticated provisioning,
  354. * 3 = allow both unauthenticated and authenticated provisioning
  355. *
  356. * fast_max_pac_list_len=num option can be used to set the maximum
  357. * number of PAC entries to store in a PAC list (default: 10).
  358. *
  359. * fast_pac_format=binary option can be used to select binary format
  360. * for storing PAC entries in order to save some space (the default
  361. * text format uses about 2.5 times the size of minimal binary format).
  362. *
  363. * crypto_binding option can be used to control PEAPv0 cryptobinding
  364. * behavior:
  365. * 0 = do not use cryptobinding (default)
  366. * 1 = use cryptobinding if server supports it
  367. * 2 = require cryptobinding
  368. *
  369. * EAP-WSC (WPS) uses following options: pin=Device_Password and
  370. * uuid=Device_UUID
  371. */
  372. char *phase1;
  373. /**
  374. * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
  375. *
  376. * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
  377. * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS.
  378. */
  379. char *phase2;
  380. /**
  381. * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
  382. *
  383. * This field is used to configure PC/SC smartcard interface.
  384. * Currently, the only configuration is whether this field is %NULL (do
  385. * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
  386. *
  387. * This field is used for EAP-SIM and EAP-AKA.
  388. */
  389. char *pcsc;
  390. /**
  391. * pin - PIN for USIM, GSM SIM, and smartcards
  392. *
  393. * This field is used to configure PIN for SIM and smartcards for
  394. * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
  395. * smartcard is used for private key operations.
  396. *
  397. * If left out, this will be asked through control interface.
  398. */
  399. char *pin;
  400. /**
  401. * engine - Enable OpenSSL engine (e.g., for smartcard access)
  402. *
  403. * This is used if private key operations for EAP-TLS are performed
  404. * using a smartcard.
  405. */
  406. int engine;
  407. /**
  408. * engine_id - Engine ID for OpenSSL engine
  409. *
  410. * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
  411. * engine.
  412. *
  413. * This is used if private key operations for EAP-TLS are performed
  414. * using a smartcard.
  415. */
  416. char *engine_id;
  417. /**
  418. * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2)
  419. *
  420. * This is used if private key operations for EAP-TLS are performed
  421. * using a smartcard.
  422. *
  423. * This field is like engine, but used for phase 2 (inside
  424. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  425. */
  426. int engine2;
  427. /**
  428. * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2)
  429. *
  430. * This field is used to configure PIN for SIM and smartcards for
  431. * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
  432. * smartcard is used for private key operations.
  433. *
  434. * This field is like pin2, but used for phase 2 (inside
  435. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  436. *
  437. * If left out, this will be asked through control interface.
  438. */
  439. char *pin2;
  440. /**
  441. * engine2_id - Engine ID for OpenSSL engine (Phase 2)
  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. * This field is like engine_id, but used for phase 2 (inside
  450. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  451. */
  452. char *engine2_id;
  453. /**
  454. * key_id - Key ID for OpenSSL engine
  455. *
  456. * This is used if private key operations for EAP-TLS are performed
  457. * using a smartcard.
  458. */
  459. char *key_id;
  460. /**
  461. * cert_id - Cert ID for OpenSSL engine
  462. *
  463. * This is used if the certificate operations for EAP-TLS are performed
  464. * using a smartcard.
  465. */
  466. char *cert_id;
  467. /**
  468. * ca_cert_id - CA Cert ID for OpenSSL engine
  469. *
  470. * This is used if the CA certificate for EAP-TLS is on a smartcard.
  471. */
  472. char *ca_cert_id;
  473. /**
  474. * key2_id - Key ID for OpenSSL engine (phase2)
  475. *
  476. * This is used if private key operations for EAP-TLS are performed
  477. * using a smartcard.
  478. */
  479. char *key2_id;
  480. /**
  481. * cert2_id - Cert ID for OpenSSL engine (phase2)
  482. *
  483. * This is used if the certificate operations for EAP-TLS are performed
  484. * using a smartcard.
  485. */
  486. char *cert2_id;
  487. /**
  488. * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
  489. *
  490. * This is used if the CA certificate for EAP-TLS is on a smartcard.
  491. */
  492. char *ca_cert2_id;
  493. /**
  494. * otp - One-time-password
  495. *
  496. * This field should not be set in configuration step. It is only used
  497. * internally when OTP is entered through the control interface.
  498. */
  499. u8 *otp;
  500. /**
  501. * otp_len - Length of the otp field
  502. */
  503. size_t otp_len;
  504. /**
  505. * pending_req_identity - Whether there is a pending identity request
  506. *
  507. * This field should not be set in configuration step. It is only used
  508. * internally when control interface is used to request needed
  509. * information.
  510. */
  511. int pending_req_identity;
  512. /**
  513. * pending_req_password - Whether there is a pending password request
  514. *
  515. * This field should not be set in configuration step. It is only used
  516. * internally when control interface is used to request needed
  517. * information.
  518. */
  519. int pending_req_password;
  520. /**
  521. * pending_req_pin - Whether there is a pending PIN request
  522. *
  523. * This field should not be set in configuration step. It is only used
  524. * internally when control interface is used to request needed
  525. * information.
  526. */
  527. int pending_req_pin;
  528. /**
  529. * pending_req_new_password - Pending password update request
  530. *
  531. * This field should not be set in configuration step. It is only used
  532. * internally when control interface is used to request needed
  533. * information.
  534. */
  535. int pending_req_new_password;
  536. /**
  537. * pending_req_passphrase - Pending passphrase request
  538. *
  539. * This field should not be set in configuration step. It is only used
  540. * internally when control interface is used to request needed
  541. * information.
  542. */
  543. int pending_req_passphrase;
  544. /**
  545. * pending_req_otp - Whether there is a pending OTP request
  546. *
  547. * This field should not be set in configuration step. It is only used
  548. * internally when control interface is used to request needed
  549. * information.
  550. */
  551. char *pending_req_otp;
  552. /**
  553. * pending_req_otp_len - Length of the pending OTP request
  554. */
  555. size_t pending_req_otp_len;
  556. /**
  557. * pac_file - File path or blob name for the PAC entries (EAP-FAST)
  558. *
  559. * wpa_supplicant will need to be able to create this file and write
  560. * updates to it when PAC is being provisioned or refreshed. Full path
  561. * to the file should be used since working directory may change when
  562. * wpa_supplicant is run in the background.
  563. * Alternatively, a named configuration blob can be used by setting
  564. * this to blob://blob_name.
  565. */
  566. char *pac_file;
  567. /**
  568. * mschapv2_retry - MSCHAPv2 retry in progress
  569. *
  570. * This field is used internally by EAP-MSCHAPv2 and should not be set
  571. * as part of configuration.
  572. */
  573. int mschapv2_retry;
  574. /**
  575. * new_password - New password for password update
  576. *
  577. * This field is used during MSCHAPv2 password update. This is normally
  578. * requested from the user through the control interface and not set
  579. * from configuration.
  580. */
  581. u8 *new_password;
  582. /**
  583. * new_password_len - Length of new_password field
  584. */
  585. size_t new_password_len;
  586. /**
  587. * fragment_size - Maximum EAP fragment size in bytes (default 1398)
  588. *
  589. * This value limits the fragment size for EAP methods that support
  590. * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
  591. * small enough to make the EAP messages fit in MTU of the network
  592. * interface used for EAPOL. The default value is suitable for most
  593. * cases.
  594. */
  595. int fragment_size;
  596. #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
  597. #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
  598. /**
  599. * flags - Network configuration flags (bitfield)
  600. *
  601. * This variable is used for internal flags to describe further details
  602. * for the network parameters.
  603. * bit 0 = password is represented as a 16-byte NtPasswordHash value
  604. * instead of plaintext password
  605. * bit 1 = password is stored in external storage; the value in the
  606. * password field is the name of that external entry
  607. */
  608. u32 flags;
  609. /**
  610. * ocsp - Whether to use/require OCSP to check server certificate
  611. *
  612. * 0 = do not use OCSP stapling (TLS certificate status extension)
  613. * 1 = try to use OCSP stapling, but not require response
  614. * 2 = require valid OCSP stapling response
  615. */
  616. int ocsp;
  617. /**
  618. * external_sim_resp - Response from external SIM processing
  619. *
  620. * This field should not be set in configuration step. It is only used
  621. * internally when control interface is used to request external
  622. * SIM/USIM processing.
  623. */
  624. char *external_sim_resp;
  625. /**
  626. * sim_num - User selected SIM identifier
  627. *
  628. * This variable is used for identifying which SIM is used if the system
  629. * has more than one.
  630. */
  631. int sim_num;
  632. /**
  633. * openssl_ciphers - OpenSSL cipher string
  634. *
  635. * This is an OpenSSL specific configuration option for configuring the
  636. * ciphers for this connection. If not set, the default cipher suite
  637. * list is used.
  638. */
  639. char *openssl_ciphers;
  640. /**
  641. * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
  642. */
  643. int erp;
  644. };
  645. /**
  646. * struct wpa_config_blob - Named configuration blob
  647. *
  648. * This data structure is used to provide storage for binary objects to store
  649. * abstract information like certificates and private keys inlined with the
  650. * configuration data.
  651. */
  652. struct wpa_config_blob {
  653. /**
  654. * name - Blob name
  655. */
  656. char *name;
  657. /**
  658. * data - Pointer to binary data
  659. */
  660. u8 *data;
  661. /**
  662. * len - Length of binary data
  663. */
  664. size_t len;
  665. /**
  666. * next - Pointer to next blob in the configuration
  667. */
  668. struct wpa_config_blob *next;
  669. };
  670. #endif /* EAP_CONFIG_H */