eap_config.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  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. * 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. char *phase1;
  394. /**
  395. * phase2 - Phase2 (inner authentication with TLS tunnel) parameters
  396. *
  397. * String with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or
  398. * "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS. "mschapv2_retry=0" can
  399. * be used to disable MSCHAPv2 password retry in authentication failure
  400. * cases.
  401. */
  402. char *phase2;
  403. /**
  404. * pcsc - Parameters for PC/SC smartcard interface for USIM and GSM SIM
  405. *
  406. * This field is used to configure PC/SC smartcard interface.
  407. * Currently, the only configuration is whether this field is %NULL (do
  408. * not use PC/SC) or non-NULL (e.g., "") to enable PC/SC.
  409. *
  410. * This field is used for EAP-SIM and EAP-AKA.
  411. */
  412. char *pcsc;
  413. /**
  414. * pin - PIN for USIM, GSM SIM, and smartcards
  415. *
  416. * This field is used to configure PIN for SIM and smartcards for
  417. * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
  418. * smartcard is used for private key operations.
  419. *
  420. * If left out, this will be asked through control interface.
  421. */
  422. char *pin;
  423. /**
  424. * engine - Enable OpenSSL engine (e.g., for smartcard access)
  425. *
  426. * This is used if private key operations for EAP-TLS are performed
  427. * using a smartcard.
  428. */
  429. int engine;
  430. /**
  431. * engine_id - Engine ID for OpenSSL engine
  432. *
  433. * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
  434. * engine.
  435. *
  436. * This is used if private key operations for EAP-TLS are performed
  437. * using a smartcard.
  438. */
  439. char *engine_id;
  440. /**
  441. * engine2 - Enable OpenSSL engine (e.g., for smartcard) (Phase 2)
  442. *
  443. * This is used if private key operations for EAP-TLS are performed
  444. * using a smartcard.
  445. *
  446. * This field is like engine, but used for phase 2 (inside
  447. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  448. */
  449. int engine2;
  450. /**
  451. * pin2 - PIN for USIM, GSM SIM, and smartcards (Phase 2)
  452. *
  453. * This field is used to configure PIN for SIM and smartcards for
  454. * EAP-SIM and EAP-AKA. In addition, this is used with EAP-TLS if a
  455. * smartcard is used for private key operations.
  456. *
  457. * This field is like pin2, but used for phase 2 (inside
  458. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  459. *
  460. * If left out, this will be asked through control interface.
  461. */
  462. char *pin2;
  463. /**
  464. * engine2_id - Engine ID for OpenSSL engine (Phase 2)
  465. *
  466. * "opensc" to select OpenSC engine or "pkcs11" to select PKCS#11
  467. * engine.
  468. *
  469. * This is used if private key operations for EAP-TLS are performed
  470. * using a smartcard.
  471. *
  472. * This field is like engine_id, but used for phase 2 (inside
  473. * EAP-TTLS/PEAP/FAST tunnel) authentication.
  474. */
  475. char *engine2_id;
  476. /**
  477. * key_id - Key ID for OpenSSL engine
  478. *
  479. * This is used if private key operations for EAP-TLS are performed
  480. * using a smartcard.
  481. */
  482. char *key_id;
  483. /**
  484. * cert_id - Cert ID for OpenSSL engine
  485. *
  486. * This is used if the certificate operations for EAP-TLS are performed
  487. * using a smartcard.
  488. */
  489. char *cert_id;
  490. /**
  491. * ca_cert_id - CA Cert ID for OpenSSL engine
  492. *
  493. * This is used if the CA certificate for EAP-TLS is on a smartcard.
  494. */
  495. char *ca_cert_id;
  496. /**
  497. * key2_id - Key ID for OpenSSL engine (phase2)
  498. *
  499. * This is used if private key operations for EAP-TLS are performed
  500. * using a smartcard.
  501. */
  502. char *key2_id;
  503. /**
  504. * cert2_id - Cert ID for OpenSSL engine (phase2)
  505. *
  506. * This is used if the certificate operations for EAP-TLS are performed
  507. * using a smartcard.
  508. */
  509. char *cert2_id;
  510. /**
  511. * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
  512. *
  513. * This is used if the CA certificate for EAP-TLS is on a smartcard.
  514. */
  515. char *ca_cert2_id;
  516. /**
  517. * otp - One-time-password
  518. *
  519. * This field should not be set in configuration step. It is only used
  520. * internally when OTP is entered through the control interface.
  521. */
  522. u8 *otp;
  523. /**
  524. * otp_len - Length of the otp field
  525. */
  526. size_t otp_len;
  527. /**
  528. * pending_req_identity - Whether there is a pending identity request
  529. *
  530. * This field should not be set in configuration step. It is only used
  531. * internally when control interface is used to request needed
  532. * information.
  533. */
  534. int pending_req_identity;
  535. /**
  536. * pending_req_password - Whether there is a pending password request
  537. *
  538. * This field should not be set in configuration step. It is only used
  539. * internally when control interface is used to request needed
  540. * information.
  541. */
  542. int pending_req_password;
  543. /**
  544. * pending_req_pin - Whether there is a pending PIN request
  545. *
  546. * This field should not be set in configuration step. It is only used
  547. * internally when control interface is used to request needed
  548. * information.
  549. */
  550. int pending_req_pin;
  551. /**
  552. * pending_req_new_password - Pending password update request
  553. *
  554. * This field should not be set in configuration step. It is only used
  555. * internally when control interface is used to request needed
  556. * information.
  557. */
  558. int pending_req_new_password;
  559. /**
  560. * pending_req_passphrase - Pending passphrase request
  561. *
  562. * This field should not be set in configuration step. It is only used
  563. * internally when control interface is used to request needed
  564. * information.
  565. */
  566. int pending_req_passphrase;
  567. /**
  568. * pending_req_otp - Whether there is a pending OTP request
  569. *
  570. * This field should not be set in configuration step. It is only used
  571. * internally when control interface is used to request needed
  572. * information.
  573. */
  574. char *pending_req_otp;
  575. /**
  576. * pending_req_otp_len - Length of the pending OTP request
  577. */
  578. size_t pending_req_otp_len;
  579. /**
  580. * pac_file - File path or blob name for the PAC entries (EAP-FAST)
  581. *
  582. * wpa_supplicant will need to be able to create this file and write
  583. * updates to it when PAC is being provisioned or refreshed. Full path
  584. * to the file should be used since working directory may change when
  585. * wpa_supplicant is run in the background.
  586. * Alternatively, a named configuration blob can be used by setting
  587. * this to blob://blob_name.
  588. */
  589. char *pac_file;
  590. /**
  591. * mschapv2_retry - MSCHAPv2 retry in progress
  592. *
  593. * This field is used internally by EAP-MSCHAPv2 and should not be set
  594. * as part of configuration.
  595. */
  596. int mschapv2_retry;
  597. /**
  598. * new_password - New password for password update
  599. *
  600. * This field is used during MSCHAPv2 password update. This is normally
  601. * requested from the user through the control interface and not set
  602. * from configuration.
  603. */
  604. u8 *new_password;
  605. /**
  606. * new_password_len - Length of new_password field
  607. */
  608. size_t new_password_len;
  609. /**
  610. * fragment_size - Maximum EAP fragment size in bytes (default 1398)
  611. *
  612. * This value limits the fragment size for EAP methods that support
  613. * fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set
  614. * small enough to make the EAP messages fit in MTU of the network
  615. * interface used for EAPOL. The default value is suitable for most
  616. * cases.
  617. */
  618. int fragment_size;
  619. #define EAP_CONFIG_FLAGS_PASSWORD_NTHASH BIT(0)
  620. #define EAP_CONFIG_FLAGS_EXT_PASSWORD BIT(1)
  621. /**
  622. * flags - Network configuration flags (bitfield)
  623. *
  624. * This variable is used for internal flags to describe further details
  625. * for the network parameters.
  626. * bit 0 = password is represented as a 16-byte NtPasswordHash value
  627. * instead of plaintext password
  628. * bit 1 = password is stored in external storage; the value in the
  629. * password field is the name of that external entry
  630. */
  631. u32 flags;
  632. /**
  633. * ocsp - Whether to use/require OCSP to check server certificate
  634. *
  635. * 0 = do not use OCSP stapling (TLS certificate status extension)
  636. * 1 = try to use OCSP stapling, but not require response
  637. * 2 = require valid OCSP stapling response
  638. */
  639. int ocsp;
  640. /**
  641. * external_sim_resp - Response from external SIM processing
  642. *
  643. * This field should not be set in configuration step. It is only used
  644. * internally when control interface is used to request external
  645. * SIM/USIM processing.
  646. */
  647. char *external_sim_resp;
  648. /**
  649. * sim_num - User selected SIM identifier
  650. *
  651. * This variable is used for identifying which SIM is used if the system
  652. * has more than one.
  653. */
  654. int sim_num;
  655. /**
  656. * openssl_ciphers - OpenSSL cipher string
  657. *
  658. * This is an OpenSSL specific configuration option for configuring the
  659. * ciphers for this connection. If not set, the default cipher suite
  660. * list is used.
  661. */
  662. char *openssl_ciphers;
  663. /**
  664. * erp - Whether EAP Re-authentication Protocol (ERP) is enabled
  665. */
  666. int erp;
  667. };
  668. /**
  669. * struct wpa_config_blob - Named configuration blob
  670. *
  671. * This data structure is used to provide storage for binary objects to store
  672. * abstract information like certificates and private keys inlined with the
  673. * configuration data.
  674. */
  675. struct wpa_config_blob {
  676. /**
  677. * name - Blob name
  678. */
  679. char *name;
  680. /**
  681. * data - Pointer to binary data
  682. */
  683. u8 *data;
  684. /**
  685. * len - Length of binary data
  686. */
  687. size_t len;
  688. /**
  689. * next - Pointer to next blob in the configuration
  690. */
  691. struct wpa_config_blob *next;
  692. };
  693. #endif /* EAP_CONFIG_H */