Add self-signed CA files to system trust store

in the hope that dnf in 9.5 will actually trust them and not fail
This commit is contained in:
Alexander Todorov 2024-06-04 15:02:43 +03:00 committed by Alexander Todorov
parent 3860f03d68
commit ee1f70ec2e
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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 {