mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1093 from YunoHost/use-organization-name-for-LE-cert
Use organization name for le cert
This commit is contained in:
commit
f253b9f215
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,7 @@ KEY_SIZE = 3072
|
|||
VALIDITY_LIMIT = 15 # days
|
||||
|
||||
# For tests
|
||||
STAGING_CERTIFICATION_AUTHORITY = "https://acme-staging.api.letsencrypt.org"
|
||||
STAGING_CERTIFICATION_AUTHORITY = "https://acme-staging-v02.api.letsencrypt.org"
|
||||
# For prod
|
||||
PRODUCTION_CERTIFICATION_AUTHORITY = "https://acme-v02.api.letsencrypt.org"
|
||||
|
||||
|
@ -637,6 +637,7 @@ def _get_status(domain):
|
|||
|
||||
cert_subject = cert.get_subject().CN
|
||||
cert_issuer = cert.get_issuer().CN
|
||||
organization_name = cert.get_issuer().O
|
||||
valid_up_to = datetime.strptime(cert.get_notAfter(), "%Y%m%d%H%M%SZ")
|
||||
days_remaining = (valid_up_to - datetime.utcnow()).days
|
||||
|
||||
|
@ -646,7 +647,7 @@ def _get_status(domain):
|
|||
"verbose": "Self-signed",
|
||||
}
|
||||
|
||||
elif cert_issuer.startswith("Let's Encrypt") or cert_issuer == "R3":
|
||||
elif organization_name == "Let's Encrypt":
|
||||
CA_type = {
|
||||
"code": "lets-encrypt",
|
||||
"verbose": "Let's Encrypt",
|
||||
|
|
Loading…
Add table
Reference in a new issue