Project

General

Profile

« Previous | Next » 

Revision 931b6fcd

Added by Joniel Pasqualetto about 2 months ago

Fixes #37063 - Add feature in katello-certs-check to verify if CA bundle has any certificates with trust rules

- Add feature to verify if provided CA bundle has certificates with trust rules
- Add test case for the new feature
- Fix indentation on function check-ca-bundle-size

View differences:

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