Skip to content

Commit

Permalink
use legacy dnspython resolver method to maintain compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Fei1Yang committed Jan 31, 2025
1 parent 7a270e8 commit 00731e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions certbot_dns_duckdns/cert/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _perform(self, domain: str, validation_name: str, validation: str) -> None:
# get the current TXT record
custom_resolver = resolver.Resolver()
try:
txt_values = custom_resolver.resolve(duckdns_domain, "TXT")
txt_values = custom_resolver.query(duckdns_domain, "TXT")
except Exception as e:
raise errors.PluginError(e)

Expand Down Expand Up @@ -175,7 +175,7 @@ def _get_duckdns_domain(self, domain: str) -> str:

# delegated acme challenge (ipv4)
try:
result = resolver.resolve(f"{ACME_CHALLENGE_TXT_PREFIX}.{domain}", "A")
result = resolver.query(f"{ACME_CHALLENGE_TXT_PREFIX}.{domain}", "A")
delegated_domain = result.canonical_name.to_text().rstrip(".")

# check if the delegated domain is a valid duckdns.org domain
Expand All @@ -188,7 +188,7 @@ def _get_duckdns_domain(self, domain: str) -> str:

# delegated acme challenge (ipv6)
try:
result = resolver.resolve(f"{ACME_CHALLENGE_TXT_PREFIX}.{domain}", "AAAA")
result = resolver.query(f"{ACME_CHALLENGE_TXT_PREFIX}.{domain}", "AAAA")
delegated_domain = result.canonical_name.to_text().rstrip(".")

# check if the delegated domain is a valid duckdns.org domain
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools>=41.6.0
requests>=2.20.0,<3.0
certbot>=1.18.0,<4.0
dnspython>=2.0.0,<3.0
dnspython>=1.15.0,<3.0

0 comments on commit 00731e9

Please sign in to comment.