From ee1f70ec2e3d9458f6f2025f3fcfdeb83e9170d4 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Tue, 4 Jun 2024 15:02:43 +0300 Subject: [PATCH] Add self-signed CA files to system trust store in the hope that dnf in 9.5 will actually trust them and not fail --- .../regression-composer-works-behind-satellite-fallback.sh | 4 ++++ test/cases/regression-composer-works-behind-satellite.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/cases/regression-composer-works-behind-satellite-fallback.sh b/test/cases/regression-composer-works-behind-satellite-fallback.sh index 7192d47ea..8e6f9c884 100644 --- a/test/cases/regression-composer-works-behind-satellite-fallback.sh +++ b/test/cases/regression-composer-works-behind-satellite-fallback.sh @@ -23,6 +23,10 @@ function generate_certificates { # Certificate for the client sudo openssl req -new -subj "/C=GB/CN=localhost" -sha256 -key client.key -out client.csr sudo openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 365 -sha256 + + # add the certificate authority to the system trust stores + sudo cp ca.crt "/etc/pki/ca-trust/source/anchors/ca-$(uuidgen).crt" + sudo update-ca-trust } source /usr/libexec/osbuild-composer-test/set-env-variables.sh diff --git a/test/cases/regression-composer-works-behind-satellite.sh b/test/cases/regression-composer-works-behind-satellite.sh index cb9f41502..bfb2e64e1 100644 --- a/test/cases/regression-composer-works-behind-satellite.sh +++ b/test/cases/regression-composer-works-behind-satellite.sh @@ -26,6 +26,10 @@ function generate_certificates { # Certificate for the client sudo openssl req -new -subj "/C=GB/CN=localhost" -sha256 -key client.key -out client.csr sudo openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 365 -sha256 + + # add the certificate authority to the system trust stores + sudo cp ca.crt "/etc/pki/ca-trust/source/anchors/ca-$(uuidgen).crt" + sudo update-ca-trust } function cleanup {