Commit 439fd7f3 authored by Adrien Dorsaz's avatar Adrien Dorsaz

v2: strength a bit more the search regexp which looks for common name

On Stretch, openssl output contains spaces every where
parent 5685a410
Pipeline #164 failed with stage
in 6 minutes and 40 seconds
......@@ -103,7 +103,7 @@ def get_crt(config, log=LOGGER):"Parsing CSR looking for domains.")
csr = _openssl("req", ["-in", config["acmednstiny"]["CSRFile"], "-noout", "-text"]).decode("utf8")
domains = set([])
common_name ="Subject:.*? CN=([^\s,;/]+)", csr)
common_name ="Subject:\s*?CN\s*?=\s*?([^\s,;/]+)", csr)
if common_name is not None:
subject_alt_names ="X509v3 Subject Alternative Name: \r?\n +([^\r\n]+)\r?\n", csr, re.MULTILINE | re.DOTALL)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment