Revision 931b6fcd
Added by Joniel Pasqualetto about 2 months ago
spec/fixtures/katello-certs-check/create_cert.sh | ||
---|---|---|
echo "CA certificate bundle exists. Skipping."
|
||
fi
|
||
|
||
CA_BUNDLE=ca-bundle-with-trust-rules
|
||
CA_CERT_WITH_TRUST_RULES=ca-with-trust-rules
|
||
if [[ ! -f "$CERTS_DIR/$CA_BUNDLE.crt" ]]; then
|
||
echo "Generate CA bundle with trust rules"
|
||
openssl x509 -in $CERTS_DIR/$CA_CERT_NAME.crt -addtrust serverAuth -out $CERTS_DIR/$CA_CERT_WITH_TRUST_RULES.crt
|
||
cat $CERTS_DIR/$THIRDPARTY_CA_CERT_NAME.crt $CERTS_DIR/$CA_CERT_WITH_TRUST_RULES.crt > $CERTS_DIR/$CA_BUNDLE.crt
|
||
else
|
||
echo "CA certificate bundle with trust rules exists. Skipping."
|
||
fi
|
||
|
||
CERT_NAME=foreman.example.com
|
||
if [[ ! -f "$CERTS_DIR/$CERT_NAME.key" || ! -f "$CERTS_DIR/$CERT_NAME.crt" ]]; then
|
||
echo "Generate server certificate"
|
Also available in: Unified diff
Fixes #37063 - Add feature in katello-certs-check to verify if CA bundle has any certificates with trust rules