From ceaacfbd975a3fab117e8940c95d3e86be4a186e Mon Sep 17 00:00:00 2001 From: pitchum Date: Wed, 25 Mar 2020 12:20:23 +0100 Subject: [PATCH] Simplified check for subdomain inclusion in certificate. --- src/yunohost/certificate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index 31a4c1200..e4d4874e3 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -643,11 +643,10 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder): if domain == _get_maindomain(): # Include xmpp-upload subdomain in subject alternate names subdomain="xmpp-upload." + domain - try: - _check_domain_is_ready_for_ACME(subdomain) + if _dns_ip_match_public_ip(get_public_ip(), subdomain): logger.info("Subdmain {} is ready for ACME and will be included in the certificate.".format(subdomain)) csr.add_extensions([crypto.X509Extension("subjectAltName", False, "DNS:" + subdomain)]) - except YunohostError: + else: logger.warning(m18n.n('certmanager_warning_subdomain_dns_record', subdomain=subdomain, domain=domain)) # Set the key