Update: add validation for CA name in make_ca function
All checks were successful
/ test (push) Successful in 12s
All checks were successful
/ test (push) Successful in 12s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user