mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Switch to always using dnspython (requires dnspthon>=1.12).
Also, address some documentation nits.
This commit is contained in:
parent
827c93510c
commit
b2505b996f
3 changed files with 11 additions and 13 deletions
|
|
@ -207,7 +207,7 @@ class KeyAuthorizationChallenge(_TokenChallenge):
|
|||
|
||||
@ChallengeResponse.register
|
||||
class DNS01Response(KeyAuthorizationChallengeResponse):
|
||||
"""ACME "dns-01" challenge response."""
|
||||
"""ACME dns-01 challenge response."""
|
||||
typ = "dns-01"
|
||||
|
||||
def simple_verify(self, chall, domain, account_public_key):
|
||||
|
|
@ -215,7 +215,7 @@ class DNS01Response(KeyAuthorizationChallengeResponse):
|
|||
|
||||
:param challenges.DNS01 chall: Corresponding challenge.
|
||||
:param unicode domain: Domain name being verified.
|
||||
:param account_public_key: Public key for the key pair
|
||||
:param JWK account_public_key: Public key for the key pair
|
||||
being authorized.
|
||||
|
||||
:returns: ``True`` iff validation with the TXT records resolved from a
|
||||
|
|
@ -247,7 +247,7 @@ class DNS01Response(KeyAuthorizationChallengeResponse):
|
|||
|
||||
@Challenge.register # pylint: disable=too-many-ancestors
|
||||
class DNS01(KeyAuthorizationChallenge):
|
||||
"""ACME "dns-01" challenge."""
|
||||
"""ACME dns-01 challenge."""
|
||||
response_cls = DNS01Response
|
||||
typ = response_cls.typ
|
||||
|
||||
|
|
@ -298,7 +298,7 @@ class HTTP01Response(KeyAuthorizationChallengeResponse):
|
|||
being authorized.
|
||||
:param int port: Port used in the validation.
|
||||
|
||||
:returns: ``True`` iff validation of the files currently server by the
|
||||
:returns: ``True`` iff validation with the files currently served by the
|
||||
HTTP server is successful.
|
||||
:rtype: bool
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@ def txt_records_for_name(name):
|
|||
except dns.exception.DNSException as error:
|
||||
logger.error("Error resolving %s: %s", name, str(error))
|
||||
return []
|
||||
return [txt_rec for rdata in dns_response for txt_rec in rdata.strings]
|
||||
|
||||
return [txt_rec.decode("utf-8") for rdata in dns_response
|
||||
for txt_rec in rdata.strings]
|
||||
|
|
|
|||
|
|
@ -35,14 +35,10 @@ if sys.version_info < (2, 7):
|
|||
else:
|
||||
install_requires.append('mock')
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
dns_extras = [
|
||||
'dnspython',
|
||||
]
|
||||
else:
|
||||
dns_extras = [
|
||||
'dnspython3',
|
||||
]
|
||||
# dnspython 1.12 is required to support both Python 2 and Python 3.
|
||||
dns_extras = [
|
||||
'dnspython>=1.12',
|
||||
]
|
||||
|
||||
dev_extras = [
|
||||
'nose',
|
||||
|
|
|
|||
Loading…
Reference in a new issue