summaryrefslogtreecommitdiffstats
path: root/sign_csr.py
diff options
context:
space:
mode:
authorDaniel Roesler <diafygi@gmail.com>2017-11-14 22:59:02 -0800
committerGitHub <noreply@github.com>2017-11-14 22:59:02 -0800
commit2e91a47f82c7d2a60c85998f7ab11d67a8b2d548 (patch)
treea4eaab451d92f4fd3434eb940e6c012cb13b9e9a /sign_csr.py
parentce491e4ee46afcb5e6df69763962a35690dff5e6 (diff)
parente8cd7b2e3b68a0fa34e65c4829a9f599592b3d04 (diff)
Merge pull request #85 from surr/parse
Fix subject line parsing
Diffstat (limited to 'sign_csr.py')
-rw-r--r--sign_csr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sign_csr.py b/sign_csr.py
index ae6401a..f200df9 100644
--- a/sign_csr.py
+++ b/sign_csr.py
@@ -71,7 +71,7 @@ def sign_csr(pubkey, csr, email=None, file_based=False):
if proc.returncode != 0:
raise IOError("Error loading {0}".format(csr))
domains = set([])
- common_name = re.search("Subject:.*? CN=([^\s,;/]+)", out)
+ common_name = re.search("Subject:.*? CN *= *([^\s,;/]+)", out)
if common_name is not None:
domains.add(common_name.group(1))
subject_alt_names = re.search("X509v3 Subject Alternative Name: \n +([^\n]+)\n", out, re.MULTILINE|re.DOTALL)