From 6c328138f8af6a46cbe8492c2027c4cae81dab8c Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Thu, 10 Sep 2020 18:37:08 +0200
Subject: [PATCH] create array inside json

---
 files/cert2json.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/files/cert2json.py b/files/cert2json.py
index 177210c..b87db80 100755
--- a/files/cert2json.py
+++ b/files/cert2json.py
@@ -38,17 +38,17 @@ with open(YAML_FILE, "w") as yaml_out:
     yaml_out.write("---\n")
     for txt_line in DECODED_OUTPUT:
         if "Certificate Name:" in txt_line:
-            txt_line_out = re.sub('.*Certificate Name: ', '  ', txt_line) + ":"
+            txt_line_out = re.sub('.*Certificate Name: ', '- ', txt_line) + ":"
         elif "Serial Number: " in txt_line:
-            txt_line_out = re.sub('.*Serial Number: ', '    Serial Number: ', txt_line)
+            txt_line_out = re.sub('.*Serial Number: ', '  Serial Number: ', txt_line)
         elif "Domains: " in txt_line:
-            txt_line_out = re.sub('.*Domains: ', '    Domains: ', txt_line)
+            txt_line_out = re.sub('.*Domains: ', '  Domains: ', txt_line)
         elif "Expiry Date: " in txt_line:
-            txt_line_out = re.sub('.*Expiry Date: ', '    Expiry Date: "', txt_line) + '"'
+            txt_line_out = re.sub('.*Expiry Date: ', '  Expiry Date: "', txt_line) + '"'
         elif "Certificate Path: " in txt_line:
-            txt_line_out = re.sub('.*Certificate Path: ', '    Certificate Path: ', txt_line)
+            txt_line_out = re.sub('.*Certificate Path: ', '  Certificate Path: ', txt_line)
         elif "Private Key Path: " in txt_line:
-            txt_line_out = re.sub('.*Private Key Path: ', '    Private Key Path: ', txt_line)
+            txt_line_out = re.sub('.*Private Key Path: ', '  Private Key Path: ', txt_line)
         else:
             txt_line_out = None
 
-- 
GitLab