3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-02-16 15:20:42 +01:00
James Prestwood bea1d22a5c eap-tls-common: allow embedded PEMs in settings
Refactoring was required to allow for embedded certs. The existing
eap_tls_state object was changed to hold the cert types (l_queue,
l_certchain, l_key) rather than the file path, since there may not
actually be separate PEM files.

Care was taken to properly manage the memory of these objects.
Since the TLS object takes ownership when setting auth data or the
CA certs all error cases must be handled properly to free these
objects after they are loaded and in addition they must be set to
NULL so that the cleanup doesn't double free them.

If everything goes to plan, we load all the PEMs in settings_load,
provide these objects to the TLS APIs, and then NULL out the
pointers (TLS now owns this memory). If anything fails between
settings_load and l_tls_start we must free these objects.

A special format must be used to indicate that a PEM is embedded
inside the settings file. First, the l_settings format should be
followed for the PEM itself, e.g.

[@pem@my_ca_cert]
<CA Cert data>

This PEM can then be referenced by "embed:my_ca_cert", e.g.

EAP-TLS-CACert=embed:my_ca_cert

Any other value not starting with "embed:" will be treated as a file
path.
2019-10-07 11:39:30 -05:00
..
2018-04-19 11:49:41 -05:00
2018-04-19 11:49:41 -05:00
2019-09-19 23:04:06 -05:00
2019-07-15 14:53:44 -05:00
2019-06-07 16:15:07 -05:00
2019-04-22 16:31:14 -05:00
2019-04-22 16:31:19 -05:00
2019-08-27 20:58:01 -05:00
2019-08-15 19:39:27 +02:00
2019-04-10 16:57:07 -05:00
2019-08-27 20:50:07 -05:00
2019-08-27 20:50:07 -05:00
2019-05-19 13:07:13 -05:00
2019-05-19 13:07:13 -05:00
2019-05-23 16:59:14 -05:00
2019-05-23 16:59:34 -05:00
2019-05-09 13:38:34 -05:00
2017-11-28 13:20:33 -06:00
2019-09-12 11:28:20 -05:00
2019-09-11 15:28:10 -05:00
2019-09-24 10:07:40 -05:00
2019-04-05 12:07:37 -05:00
2019-09-13 17:29:39 -05:00
2019-09-17 16:20:28 -05:00
2019-07-15 14:06:26 -05:00
2019-09-19 23:04:06 -05:00
2019-05-23 16:58:59 -05:00
2017-11-28 13:30:06 -06:00
2019-08-07 11:13:10 -05:00
2019-07-02 19:09:57 -05:00
2019-09-24 10:07:40 -05:00
2019-09-24 10:07:40 -05:00
2019-09-17 11:28:23 -05:00
2019-09-17 11:28:23 -05:00
2019-05-22 10:20:08 -05:00
2018-07-17 19:12:48 -05:00
2019-09-09 15:42:09 -05:00
2019-08-21 14:16:08 -05:00
2019-08-21 17:24:16 -05:00
2019-09-19 22:55:07 -05:00
2019-09-19 22:55:07 -05:00
2019-07-08 13:46:53 -05:00
2019-07-08 13:46:53 -05:00