Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use legacy dnspython resolver method #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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