From c90199b13716007209e51b7705285ce12955507b Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Thu, 5 Mar 2026 06:07:42 +0100 Subject: [PATCH] Refactor: rename make_server_cert to make_cert for consistency --- run-tests.sh | 4 ++-- simple-ca.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index e178915..27eb7db 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -78,7 +78,7 @@ fi display_certificate "$CA_DIR/ca_cert.pem" # 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 exit 1 fi @@ -113,7 +113,7 @@ fi display_certificate "$CA_DIR/issuing_ca_cert.pem" # 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 exit 1 fi diff --git a/simple-ca.sh b/simple-ca.sh index ab15dba..631a703 100755 --- a/simple-ca.sh +++ b/simple-ca.sh @@ -166,7 +166,7 @@ function _is_dns() { fi } -function make_server_cert() { +function make_cert() { 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 CA_DIR="" # The CA directory will default to certificate directory if not specified with --ca-dir