mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1067 from YunoHost/fix-certificate-chain-double-entry
[fix] intermediate_certificate is now included in signed certificate
This commit is contained in:
commit
4d494c7e7c
2 changed files with 0 additions and 10 deletions
|
@ -124,7 +124,6 @@
|
||||||
"certmanager_cert_renew_success": "Let's Encrypt certificate renewed for the domain '{domain:s}'",
|
"certmanager_cert_renew_success": "Let's Encrypt certificate renewed for the domain '{domain:s}'",
|
||||||
"certmanager_cert_signing_failed": "Could not sign the new certificate",
|
"certmanager_cert_signing_failed": "Could not sign the new certificate",
|
||||||
"certmanager_certificate_fetching_or_enabling_failed": "Trying to use the new certificate for {domain:s} did not work...",
|
"certmanager_certificate_fetching_or_enabling_failed": "Trying to use the new certificate for {domain:s} did not work...",
|
||||||
"certmanager_couldnt_fetch_intermediate_cert": "Timed out when trying to fetch intermediate certificate from Let's Encrypt. Certificate installation/renewal aborted—please try again later.",
|
|
||||||
"certmanager_domain_not_diagnosed_yet": "There is no diagnosis result for domain {domain} yet. Please re-run a diagnosis for categories 'DNS records' and 'Web' in the diagnosis section to check if the domain is ready for Let's Encrypt. (Or if you know what you are doing, use '--no-checks' to turn off those checks.)",
|
"certmanager_domain_not_diagnosed_yet": "There is no diagnosis result for domain {domain} yet. Please re-run a diagnosis for categories 'DNS records' and 'Web' in the diagnosis section to check if the domain is ready for Let's Encrypt. (Or if you know what you are doing, use '--no-checks' to turn off those checks.)",
|
||||||
"certmanager_domain_cert_not_selfsigned": "The certificate for domain {domain:s} is not self-signed. Are you sure you want to replace it? (Use '--force' to do so.)",
|
"certmanager_domain_cert_not_selfsigned": "The certificate for domain {domain:s} is not self-signed. Are you sure you want to replace it? (Use '--force' to do so.)",
|
||||||
"certmanager_domain_dns_ip_differs_from_public_ip": "The DNS records for domain '{domain:s}' is different from this server's IP. Please check the 'DNS records' (basic) category in the diagnosis for more info. If you recently modified your A record, please wait for it to propagate (some DNS propagation checkers are available online). (If you know what you are doing, use '--no-checks' to turn off those checks.)",
|
"certmanager_domain_dns_ip_differs_from_public_ip": "The DNS records for domain '{domain:s}' is different from this server's IP. Please check the 'DNS records' (basic) category in the diagnosis for more info. If you recently modified your A record, please wait for it to propagate (some DNS propagation checkers are available online). (If you know what you are doing, use '--no-checks' to turn off those checks.)",
|
||||||
|
|
|
@ -65,8 +65,6 @@ STAGING_CERTIFICATION_AUTHORITY = "https://acme-staging.api.letsencrypt.org"
|
||||||
# For prod
|
# For prod
|
||||||
PRODUCTION_CERTIFICATION_AUTHORITY = "https://acme-v02.api.letsencrypt.org"
|
PRODUCTION_CERTIFICATION_AUTHORITY = "https://acme-v02.api.letsencrypt.org"
|
||||||
|
|
||||||
INTERMEDIATE_CERTIFICATE_URL = "https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Front-end stuff #
|
# Front-end stuff #
|
||||||
#
|
#
|
||||||
|
@ -539,12 +537,6 @@ def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False):
|
||||||
|
|
||||||
raise YunohostError('certmanager_cert_signing_failed')
|
raise YunohostError('certmanager_cert_signing_failed')
|
||||||
|
|
||||||
import requests # lazy loading this module for performance reasons
|
|
||||||
try:
|
|
||||||
intermediate_certificate = requests.get(INTERMEDIATE_CERTIFICATE_URL, timeout=30).text
|
|
||||||
except requests.exceptions.Timeout as e:
|
|
||||||
raise YunohostError('certmanager_couldnt_fetch_intermediate_cert')
|
|
||||||
|
|
||||||
# Now save the key and signed certificate
|
# Now save the key and signed certificate
|
||||||
logger.debug("Saving the key and signed certificate...")
|
logger.debug("Saving the key and signed certificate...")
|
||||||
|
|
||||||
|
@ -573,7 +565,6 @@ def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False):
|
||||||
|
|
||||||
with open(domain_cert_file, "w") as f:
|
with open(domain_cert_file, "w") as f:
|
||||||
f.write(signed_certificate)
|
f.write(signed_certificate)
|
||||||
f.write(intermediate_certificate)
|
|
||||||
|
|
||||||
_set_permissions(domain_cert_file, "root", "ssl-cert", 0o640)
|
_set_permissions(domain_cert_file, "root", "ssl-cert", 0o640)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue