Skip to contentSkip to conversation

tools: ios_convert: embed certs rather than using paths

PATCH Applied James Prestwood 2 participants 2 messages Oct 7, 2019 – Oct 8, 2019

lore
Share & tools
lore
#0 lore raw

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

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

-v2:
* removed extra new line after the embedded PEM

tools/ios_convert.py +6 -1
index 8aa10113..29a395ba 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,11 @@ 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()
+
         print("Provisioning network %s\n" % conf_file)
 
         if args.verbose:
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 7 lines · James Prestwood
---
  tools/ios_convert.py | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

-v2:
* removed extra new line after the embedded PEM

applied, thanks.

Regards,
-Denis