mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
certificate: check if domain dns records as a wildcard
This commit is contained in:
parent
16e8205367
commit
2916824b4c
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue