Refactor: rename make_server_cert to make_cert for consistency
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
2026-03-05 06:07:42 +01:00
parent 19abc40101
commit c90199b137
2 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ fi
display_certificate "$CA_DIR/ca_cert.pem" display_certificate "$CA_DIR/ca_cert.pem"
# Make a server certificate signed by the CA # Make a server certificate signed by the CA
if ! make_server_cert --ca-dir "$CA_DIR" "$CERT_DIR" "test" "test.example.com" "127.0.0.1"; then if ! make_cert --ca-dir "$CA_DIR" "$CERT_DIR" "test" "test.example.com" "127.0.0.1"; then
echo "ERROR: Failed to create server certificate." >&2 echo "ERROR: Failed to create server certificate." >&2
exit 1 exit 1
fi fi
@@ -113,7 +113,7 @@ fi
display_certificate "$CA_DIR/issuing_ca_cert.pem" display_certificate "$CA_DIR/issuing_ca_cert.pem"
# Make a server certificate signed by the CA # Make a server certificate signed by the CA
if ! make_server_cert --ca-dir "$CA_DIR" --issuing-ca "issuing_ca" "$CERT_DIR" "test" "test.example.com" "127.0.0.1"; then if ! make_cert --ca-dir "$CA_DIR" --issuing-ca "issuing_ca" "$CERT_DIR" "test" "test.example.com" "127.0.0.1"; then
echo "ERROR: Failed to create server certificate." >&2 echo "ERROR: Failed to create server certificate." >&2
exit 1 exit 1
fi fi

View File

@@ -166,7 +166,7 @@ function _is_dns() {
fi fi
} }
function make_server_cert() { function make_cert() {
local CA_FILE_PREFIX="ca" # Default to CA if no issuing CA is used local CA_FILE_PREFIX="ca" # Default to CA if no issuing CA is used
local CERT_DAYS=365 # Default validity period for leaf certificates local CERT_DAYS=365 # Default validity period for leaf certificates
local CA_DIR="" # The CA directory will default to certificate directory if not specified with --ca-dir local CA_DIR="" # The CA directory will default to certificate directory if not specified with --ca-dir