Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH] tools: ios_convert: embed certs rather than using paths
Date: Mon, 07 Oct 2019 13:13:00 -0700	[thread overview]
Message-ID: <20191007201300.2955-1-prestwoj@gmail.com> (raw)

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

---
 tools/ios_convert.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/ios_convert.py b/tools/ios_convert.py
index 8aa10113..d3b6cc8d 100755
--- a/tools/ios_convert.py
+++ b/tools/ios_convert.py
@@ -114,7 +114,7 @@ def write_network(network, root_ca_path):
                 output += "EAP-Identity=anonymous\n"
 
         if root_ca_path:
-                output += "EAP-%s-CACert=%s\n" % (eap, root_ca_path)
+                output += "EAP-%s-CACert=embed:root_ca\n" % eap
 
         output += "EAP-%s-Phase2-Method=Tunneled-%s\n" % \
                                                         (eap, network.inner_eap)
@@ -158,6 +158,12 @@ def write_network(network, root_ca_path):
 
         output += "\n"
 
+        if root_ca_path:
+                output += "[@pem(a)root_ca]\n"
+                with open(root_ca_path) as f:
+                        output += f.read()
+                output += '\n'
+
         print("Provisioning network %s\n" % conf_file)
 
         if args.verbose:
-- 
2.17.1

                 reply	other threads:[~2019-10-07 20:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20191007201300.2955-1-prestwoj@gmail.com \
    --to=prestwoj@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