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:
parent
3860f03d68
commit
ee1f70ec2e
2 changed files with 8 additions and 0 deletions
|
|
@ -23,6 +23,10 @@ function generate_certificates {
|
||||||
# Certificate for the client
|
# Certificate for the client
|
||||||
sudo openssl req -new -subj "/C=GB/CN=localhost" -sha256 -key client.key -out client.csr
|
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
|
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
|
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,10 @@ function generate_certificates {
|
||||||
# Certificate for the client
|
# Certificate for the client
|
||||||
sudo openssl req -new -subj "/C=GB/CN=localhost" -sha256 -key client.key -out client.csr
|
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
|
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 {
|
function cleanup {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue