mirror of
https://github.com/diafygi/acme-tiny
synced 2026-10-07 10:01:56 +03:00
Make regular expression accept a whitespace after CN.
The output of OpenSSL 1.1.0c, included in Debian Testing adds a whitespace there. Obtaining a certificate list fails that way, since the list of domains is empty.
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA):
|
||||
if proc.returncode != 0:
|
||||
raise IOError("Error loading {0}: {1}".format(csr, err))
|
||||
domains = set([])
|
||||
common_name = re.search(r"Subject:.*? CN=([^\s,;/]+)", out.decode('utf8'))
|
||||
common_name = re.search(r"Subject:.*? CN ?=([^\s,;/]+)", out.decode('utf8'))
|
||||
if common_name is not None:
|
||||
domains.add(common_name.group(1))
|
||||
subject_alt_names = re.search(r"X509v3 Subject Alternative Name: \n +([^\n]+)\n", out.decode('utf8'), re.MULTILINE|re.DOTALL)
|
||||
|
||||
Reference in New Issue
Block a user