Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adrien Dorsaz
acme-dns-tiny
Commits
1d326e9b
Commit
1d326e9b
authored
Jun 09, 2020
by
Adrien Dorsaz
Browse files
csr: support SAN extension marked as "critical"
See:
https://github.com/diafygi/acme-tiny/issues/216
Closes
#9
parent
e84912fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme_dns_tiny.py
View file @
1d326e9b
...
...
@@ -90,8 +90,9 @@ def get_crt(config, log=LOGGER):
common_name
=
re
.
search
(
r
"Subject:.*?\s+?CN\s*?=\s*?([^\s,;/]+)"
,
csr
)
if
common_name
is
not
None
:
domains
.
add
(
common_name
.
group
(
1
))
subject_alt_names
=
re
.
search
(
r
"X509v3 Subject Alternative Name: \r?\n +([^\r\n]+)\r?\n"
,
csr
,
re
.
MULTILINE
|
re
.
DOTALL
)
subject_alt_names
=
re
.
search
(
r
"X509v3 Subject Alternative Name: (?:critical)?\r?\n +([^\r\n]+)\r?\n"
,
csr
,
re
.
MULTILINE
)
if
subject_alt_names
is
not
None
:
for
san
in
subject_alt_names
.
group
(
1
).
split
(
", "
):
if
san
.
startswith
(
"DNS:"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment