Refactor show() - Quote all expansions (#494)

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-22 17:17:51 +01:00
parent ceb9a2093c
commit 757b2776d7
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -1941,11 +1941,12 @@ Run easyrsa without commands for usage help."
shift 2
# opts support
opts="-${type}opt no_pubkey,no_sigdump"
type_opts="-${type}opt"
out_opts="no_pubkey,no_sigdump"
while [ -n "$1" ]; do
case "$1" in
full)
opts=""
out_opts=
;;
*)
warn "Ignoring unknown command option: '$1'"
@ -1972,7 +1973,7 @@ Expected to find this file at:
$in_file"
# shellcheck disable=SC2086 # Ignore unquoted variables
verify_file $format "$in_file" || die "\
verify_file "$format" "$in_file" || die "\
This file is not a valid $type file:
$in_file"
@ -1983,8 +1984,8 @@ $in_file"
* $in_file"
# shellcheck disable=SC2086 # Ignore unquoted variables
easyrsa_openssl $format -in "$in_file" -noout -text\
-nameopt multiline $opts || die "\
easyrsa_openssl "$format" -in "$in_file" -noout -text \
-nameopt multiline "$type_opts" "$out_opts" || die "\
OpenSSL failure to process the input"
} # => show()