diff --git a/src/certificate.py b/src/certificate.py index 0fc840532..ce37f01d8 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -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