From e8b5241a540b015bf82626d5f365975f8d5db23a Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sun, 24 May 2026 21:55:40 +0200 Subject: [PATCH] refactor: Remove redundant function keywords in simple-ca.sh --- simple-ca.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/simple-ca.sh b/simple-ca.sh index e122cc9..ec9743b 100755 --- a/simple-ca.sh +++ b/simple-ca.sh @@ -39,7 +39,7 @@ SIMPLE_CA_DIR="${SIMPLE_CA_DIR:-}" -function _rebuild_ca_bundle() { +_rebuild_ca_bundle() { local BUNDLE="$SIMPLE_CA_DIR/ca_bundle.pem" cat "$SIMPLE_CA_DIR/ca_cert.pem" > "$BUNDLE" for issuing_ca_dir in $SIMPLE_CA_DIR/*; do @@ -49,7 +49,7 @@ function _rebuild_ca_bundle() { done } -function _require_ca_dir() { +_require_ca_dir() { SIMPLE_CA_DIR="${SIMPLE_CA_DIR:-$(pwd)}" if [[ ! -d "$SIMPLE_CA_DIR" ]]; then echo "ERROR: CA directory '$SIMPLE_CA_DIR' does not exist." >&2 @@ -57,10 +57,10 @@ function _require_ca_dir() { fi } -function _is_ip() { [[ "$1" =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]]; } -function _is_dns() { [[ "$1" =~ ^[a-z0-9-]+(\.[a-z0-9-]+)*$ ]]; } +_is_ip() { [[ "$1" =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]]; } +_is_dns() { [[ "$1" =~ ^[a-z0-9-]+(\.[a-z0-9-]+)*$ ]]; } -function make_ca() { +make_ca() { local CA_DAYS=3650 local ISSUING_CA="" local AIA_BASE_URL="" @@ -183,7 +183,7 @@ function make_ca() { return 0 } -function make_cert() { +make_cert() { local ISSUING_CA="" local CERT_DAYS=365 local CERT_DIR="" @@ -304,7 +304,7 @@ function make_cert() { fi } -function make_pfx() { +make_pfx() { local ISSUING_CA="" local PFX_PASSWORD="" local APPLE_OPENSSL=0