mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplified check for subdomain inclusion in certificate.
This commit is contained in:
parent
5e6e53142b
commit
ceaacfbd97
1 changed files with 2 additions and 3 deletions
|
@ -643,11 +643,10 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder):
|
||||||
if domain == _get_maindomain():
|
if domain == _get_maindomain():
|
||||||
# Include xmpp-upload subdomain in subject alternate names
|
# Include xmpp-upload subdomain in subject alternate names
|
||||||
subdomain="xmpp-upload." + domain
|
subdomain="xmpp-upload." + domain
|
||||||
try:
|
if _dns_ip_match_public_ip(get_public_ip(), subdomain):
|
||||||
_check_domain_is_ready_for_ACME(subdomain)
|
|
||||||
logger.info("Subdmain {} is ready for ACME and will be included in the certificate.".format(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)])
|
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))
|
logger.warning(m18n.n('certmanager_warning_subdomain_dns_record', subdomain=subdomain, domain=domain))
|
||||||
|
|
||||||
# Set the key
|
# Set the key
|
||||||
|
|
Loading…
Add table
Reference in a new issue