From d15ccc6c238555d24623a7083db621bd356a9b6f Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 3 Dec 2020 14:39:20 +0100 Subject: [PATCH 1/2] use organization name for LE cert --- src/yunohost/certificate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index a0f9d4032..8fb9fa684 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -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", From 7780aa658f4b3467326383be1fcb24ab52eaad35 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 3 Dec 2020 14:39:40 +0100 Subject: [PATCH 2/2] fix staging cert url --- src/yunohost/certificate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index 8fb9fa684..c9451c2be 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -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"