Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Adrien Dorsaz
acme-dns-tiny
Commits
a7d50ce8
Commit
a7d50ce8
authored
Jun 14, 2020
by
Adrien Dorsaz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
acme_dns_tiny: compute key authorization without checking token validity
Indeed, the token is created by the server
parent
474f4b63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
acme_dns_tiny.py
acme_dns_tiny.py
+1
-2
No files found.
acme_dns_tiny.py
View file @
a7d50ce8
...
...
@@ -213,8 +213,7 @@ def get_crt(config, log=LOGGER):
log
.
info
(
"Install DNS TXT resource for domain: %s"
,
domain
)
challenge
=
[
c
for
c
in
authorization
[
"challenges"
]
if
c
[
"type"
]
==
"dns-01"
][
0
]
token
=
re
.
sub
(
r
"[^A-Za-z0-9_\-]"
,
"_"
,
challenge
[
"token"
])
keyauthorization
=
"{0}.{1}"
.
format
(
token
,
jwk_thumbprint
)
keyauthorization
=
challenge
[
"token"
]
+
"."
+
jwk_thumbprint
keydigest64
=
_base64
(
hashlib
.
sha256
(
keyauthorization
.
encode
(
"utf8"
)).
digest
())
dnsrr_domain
=
"_acme-challenge.{0}."
.
format
(
domain
)
try
:
# a CNAME resource can be used for advanced TSIG configuration
...
...
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