diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index a6a084d9a..6a5397e99 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -819,13 +819,6 @@ def _check_domain_is_ready_for_ACME(domain): raise MoulinetteError(errno.EINVAL, m18n.n( 'certmanager_domain_http_not_working', domain=domain)) - # Check if domain is resolved locally (Might happen despite the previous - # checks because of dns propagation ?... Acme-tiny won't work in that case, - # because it explicitly requests() the domain.) - if not _domain_is_resolved_locally(public_ip, domain): - raise MoulinetteError(errno.EINVAL, m18n.n( - 'certmanager_domain_not_resolved_locally', domain=domain)) - def _dns_ip_match_public_ip(public_ip, domain): try: @@ -854,17 +847,6 @@ def _domain_is_accessible_through_HTTP(ip, domain): return True -def _domain_is_resolved_locally(public_ip, domain): - try: - ip = socket.gethostbyname(domain) - except socket.error as e: - logger.debug("Couldn't get domain '%s' ip because: %s" % (domain, e)) - return False - - logger.debug("Domain '%s' IP address is resolved to %s, expect it to be %s or in the 127.0.0.0/8 address block" % (domain, public_ip, ip)) - return ip.startswith("127.") or ip == public_ip - - def _name_self_CA(): ca_conf = os.path.join(SSL_DIR, "openssl.ca.cnf")