Update: add validation for CA name in make_ca function
All checks were successful
/ test (push) Successful in 12s

This commit is contained in:
2026-03-14 16:44:38 +01:00
parent 677e9add5b
commit 8bb0c62486

View File

@@ -85,11 +85,16 @@ function make_ca() {
local CA_NAME="$2"
shift 2
if [[ -z "$CA_DIR" || -z "$CA_NAME" || ! -d "$CA_DIR" ]]; then
if [[ -z "$CA_DIR" || ! -d "$CA_DIR" ]]; then
echo "ERROR: Certificate directory $CA_DIR does not exist."
return 1
fi
if [[ -z "$CA_NAME" ]]; then
echo "ERROR: CA name is required." >&2
return 1
fi
if [[ -z "$AIA_BASE_URL" && -f "$CA_DIR/aia_base_url.txt" ]]; then
AIA_BASE_URL="$(cat "$CA_DIR/aia_base_url.txt")"
fi