Skip to content

Commit

Permalink
Add self-signed CA files to system trust store
Browse files Browse the repository at this point in the history
in the hope that dnf in 9.5 will actually trust them and not fail
  • Loading branch information
atodorov committed Jun 7, 2024
1 parent 3860f03 commit ee1f70e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/cases/regression-composer-works-behind-satellite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ee1f70e

Please sign in to comment.