Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 1/3] eap-tls-common: allow embedded PEMs in settings
Date: Mon, 07 Oct 2019 12:58:09 -0500	[thread overview]
Message-ID: <f5d657eb-3477-a07e-6ddb-04eb5bc8087b@gmail.com> (raw)
In-Reply-To: <20191007161113.13435-1-prestwoj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

hi James,

On 10/7/19 11:11 AM, James Prestwood wrote:
> 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(a)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.
> ---
>   src/eap-tls-common.c | 259 +++++++++++++++++++++++++++++--------------
>   1 file changed, 177 insertions(+), 82 deletions(-)
> 

Applied, thanks.

Regards,
-Denis

      parent reply	other threads:[~2019-10-07 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 16:11 [PATCH 1/3] eap-tls-common: allow embedded PEMs in settings James Prestwood
2019-10-07 16:11 ` [PATCH 2/3] build: generate tls config for unit tests James Prestwood
2019-10-07 16:11 ` [PATCH 3/3] unit: add test for embedded certs to test-eapol James Prestwood
2019-10-07 17:58 ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5d657eb-3477-a07e-6ddb-04eb5bc8087b@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox