certificate: check if domain dns records as a wildcard

This commit is contained in:
axolotle 2024-08-27 16:39:05 +02:00
parent 16e8205367
commit 2916824b4c

View file

@ -98,6 +98,15 @@ def certificate_status(domains, full=False):
else:
status["ACME_eligible"] = False
# Check if a wildcard is setup for the ipv4/ipv6 A/AAAA records
dns_extra = Diagnoser.get_cached_report(
"dnsrecords", item={"domain": domain, "category": "extra"}
).get("data", {})
dns_extra_A = { k: v for k, v in dns_extra.items() if k.startswith("A") }
status["ready_for_letsencrypt_cert"] = all(
[value == "OK" for value in dns_extra_A.values()]
)
del status["domain"]
certificates[domain] = status