mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-18 03:21:36 +02:00
switch to new API
This commit is contained in:
parent
23bd9075ce
commit
b7fb8c661a
@ -52,7 +52,7 @@ resolver.flags = dns.flags.AD | dns.flags.RD
|
||||
|
||||
def has_dane_record(domain, timeout=10):
|
||||
try:
|
||||
result = resolver.query(f'_25._tcp.{domain}', dns.rdatatype.TLSA,dns.rdataclass.IN, lifetime=timeout)
|
||||
result = resolver.resolve(f'_25._tcp.{domain}', dns.rdatatype.TLSA,dns.rdataclass.IN, lifetime=timeout)
|
||||
if result.response.flags & dns.flags.AD:
|
||||
for record in result:
|
||||
if isinstance(record, dns.rdtypes.ANY.TLSA.TLSA):
|
||||
|
Loading…
x
Reference in New Issue
Block a user