Skip to contentSkip to conversation

tools: ios_convert: embed certs rather than using paths

PATCH Superseded James Prestwood 1 participant 1 message Oct 7, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: ios_convert: embed certs rather than using paths

---
 tools/ios_convert.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
tools/ios_convert.py +7 -1
index 8aa10113..d3b6cc8d 100755
@@ -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:
Signature · 1 line
2.17.1