diff options
author | Daniel Roesler <diafygi@gmail.com> | 2015-06-15 07:35:48 -0700 |
---|---|---|
committer | Daniel Roesler <diafygi@gmail.com> | 2015-06-15 07:35:48 -0700 |
commit | e9b642aeff01a5ae9997fead6af8d1d6b7a8728b (patch) | |
tree | 0a0cd1ae71db53d21cd03f13ef4afaac58011c68 /sign_csr.py | |
parent | 5c8a4028004cfaf125aeeb666d7222779ff9314a (diff) | |
parent | 59cdca678b1cc65f72a229561227ecae6cda75cf (diff) |
Merge pull request #4 from simonbru/regex_error
add the common name string instead of the match instance in domains set
Diffstat (limited to 'sign_csr.py')
-rw-r--r-- | sign_csr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sign_csr.py b/sign_csr.py index bd840cb..68dbbfc 100644 --- a/sign_csr.py +++ b/sign_csr.py @@ -59,7 +59,7 @@ def sign_csr(pubkey, csr): domains = set([]) common_name = re.search("Subject:.*? CN=([^\s,;/]+)", out) if common_name is not None: - domains.add(common_name) + domains.add(common_name.group(1)) subject_alt_names = re.search("X509v3 Subject Alternative Name: \n +([^\n]+)\n", out, re.MULTILINE|re.DOTALL) if subject_alt_names is not None: for san in subject_alt_names.group(1).split(", "): |