From 1164fbc9d6902bae98c9d8eddb613fed1d8f68c5 Mon Sep 17 00:00:00 2001 From: Martin Hesko Date: Fri, 9 Feb 2024 11:38:15 +0100 Subject: [PATCH] Removed intermediate certificate from Let's Encrypt chain --- testsuite/tests/mgc/test_external_ca.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/mgc/test_external_ca.py b/testsuite/tests/mgc/test_external_ca.py index e2972b52..4ab87c1b 100644 --- a/testsuite/tests/mgc/test_external_ca.py +++ b/testsuite/tests/mgc/test_external_ca.py @@ -36,7 +36,9 @@ def exposer(base_domain, hub_gateway) -> Exposer: """DNSPolicyExposer setup with expected TLS certificate""" external_cert = resources.files("testsuite.resources").joinpath("letsencrypt-stg-root-x1.pem").read_text() old_cert = hub_gateway.get_tls_cert() - return DNSPolicyExposer(base_domain, tls_cert=dataclasses.replace(old_cert, chain=external_cert)) + # Removed irrelevant intermediate certificate used for backwards compatibility + trimmed_cert = old_cert.certificate.rsplit("-----BEGIN CERTIFICATE-----", 1)[0] + return DNSPolicyExposer(base_domain, tls_cert=dataclasses.replace(old_cert, chain=trimmed_cert+external_cert)) def test_smoke_letsencrypt(client):