feat: Update tests and further streamline Bash version with Pyton and Go.
/ test-bash (push) Successful in 24s
/ test-python (push) Successful in 1m12s
/ test-go (push) Successful in 10m3s

This commit is contained in:
2026-05-10 18:39:34 +02:00
parent 87e3933f0c
commit b28354e41c
2 changed files with 21 additions and 19 deletions
+15 -13
View File
@@ -199,7 +199,8 @@ function _is_dns() {
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
local CA_DIR=""
local CERT_DIR=""
while [[ $# -gt 0 ]]; do
case "$1" in
@@ -211,6 +212,14 @@ function make_cert() {
CA_DIR="$2"
shift 2
;;
--cert-dir)
if [[ -z "$2" ]]; then
echo "ERROR: Missing value for --cert-dir." >&2
return 1
fi
CERT_DIR="$2"
shift 2
;;
--issuing-ca)
if [[ -z "$2" ]]; then
echo "ERROR: Missing value for --issuing-ca." >&2
@@ -235,9 +244,8 @@ function make_cert() {
esac
done
local CERT_DIR="$1"
local CERT_SUBJECT_NAME="$2"
shift 2
local CERT_SUBJECT_NAME="$1"
shift 1
CA_DIR="${CA_DIR:-${SIMPLE_CA_DIR:-$(pwd)}}"
@@ -334,7 +342,6 @@ function make_cert() {
function make_pfx() {
local CA_DIR=""
local CA_FILE_PREFIX=""
local CERT_PATH=""
local PFX_PASSWORD=""
while [[ $# -gt 0 ]]; do
@@ -359,14 +366,6 @@ function make_pfx() {
CA_FILE_PREFIX="$2"
shift 2
;;
--path)
if [[ -z "$2" ]]; then
echo "ERROR: Missing value for certificate path." >&2
return 1
fi
CERT_PATH="$2"
shift 2
;;
--password)
if [[ -z "$2" ]]; then
echo "ERROR: Missing value for --password." >&2
@@ -379,6 +378,9 @@ function make_pfx() {
esac
done
local CERT_PATH="$1"
shift 1
CA_DIR="${CA_DIR:-${SIMPLE_CA_DIR:-$(pwd)}}"
local ROOT_CA_CERT="ca_cert.pem"
local ROOT_CA_KEY="ca_key.pem"