From d045938ff803ea38861494ee95d4a901038c8406 Mon Sep 17 00:00:00 2001 From: Slawek Koszewski Date: Mon, 28 Jul 2025 21:24:46 +0200 Subject: [PATCH] Updated test script --- run-test.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/run-test.sh b/run-test.sh index 1faab99..657e778 100755 --- a/run-test.sh +++ b/run-test.sh @@ -2,7 +2,7 @@ GREEN='\033[0;32m' NC='\033[0m' # No Color LAB_CA="./lab-ca" - +PROVISION_CONFIG="examples/example-certificates.hcl" # Build and install # Build script for lab-ca with version injection from git tag git describe --tags --always --dirty > /dev/null 2>&1 @@ -18,7 +18,7 @@ if [ $? -ne 0 ]; then fi echo -e "${GREEN}Build successful! Version: $VERSION${NC}" -rm -rf certs private *.json crl*.pem +rm -rf ca echo -e "\n${GREEN}Initializing CA...${NC}" $LAB_CA initca || exit 1 @@ -36,7 +36,7 @@ echo -e "\n${GREEN}Issuing single certificate..${NC}" $LAB_CA issue --name "blackpanther2" --subject "blackpanther2.koszewscy.waw.pl" || exit 1 echo -e "\n${GREEN}Issuing multiple certificates from file...${NC}" -$LAB_CA provision --file examples/example-certificates.hcl --verbose || exit 1 +$LAB_CA provision --file $PROVISION_CONFIG --verbose || exit 1 echo -e "\n${GREEN}Revoking a certificate by name...${NC}" $LAB_CA revoke --name "loki" || exit 1 @@ -53,4 +53,7 @@ $LAB_CA crl --validity-days 7 --crl-file crl-2.pem || exit 1 openssl crl -noout -text -in crl-2.pem echo -e "\n${GREEN}Dumping CA state...${NC}" -jq '.' example_ca_state.json +jq '.' ca/ca_state.json + +# Finished +echo -e "\n${GREEN}All operations completed successfully!${NC}" \ No newline at end of file