Refactor: rename make_server_cert to make_cert for consistency
All checks were successful
/ test (push) Successful in 15s
All checks were successful
/ test (push) Successful in 15s
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user