From d211efe5d5c67993e01199b1870ff80c7c08a503 Mon Sep 17 00:00:00 2001 From: Markus Tillinger Date: Fri, 22 Jan 2021 12:00:21 +0100 Subject: [PATCH] Fixed running op_test.sh when absolute repository-path has spaces: For EC algorithm the variable $EASYRSA_ALGO_PARAMS is a path and needs to be quoted. This also fixes #408 --- easyrsa3/easyrsa | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 9399b33..7cdf162 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -808,14 +808,13 @@ $EASYRSA_EXTRA_EXTS" req_out_tmp="$(easyrsa_mktemp)" || die "Failed to create temporary file" # generate request [ $EASYRSA_BATCH ] && opts="$opts -batch" - # shellcheck disable=2086,2148 - algo_opts="" + newkey_opts="" if [ "ed" = "$EASYRSA_ALGO" ]; then - algo_opts=" -newkey $EASYRSA_CURVE " + newkey_opts="$EASYRSA_CURVE" else - algo_opts=" -newkey $EASYRSA_ALGO:$EASYRSA_ALGO_PARAMS " + newkey_opts="$EASYRSA_ALGO:$EASYRSA_ALGO_PARAMS" fi - easyrsa_openssl req -utf8 -new $algo_opts \ + easyrsa_openssl req -utf8 -new -newkey "$newkey_opts" \ -keyout "$key_out_tmp" -out "$req_out_tmp" $opts ${EASYRSA_PASSOUT:+-passout "$EASYRSA_PASSOUT"} \ || die "Failed to generate request" mv "$key_out_tmp" "$key_out"