Skip to content

Commit

Permalink
write: Silence 'vars' in use message; Rename ignore_vars -> quiet_vars
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Jan 8, 2024
1 parent c0d12ca commit 9be2cac
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ A list of commands is shown below:
CA_status=" CA status: CA has not been built"
fi

# check for vars changing PKI unexpectedly!
if [ "$invalid_vars" ]; then
ivmsg="
*WARNING*: \
Expand Down Expand Up @@ -974,13 +975,13 @@ Temporary session not preserved."
# Make a copy safe SSL config file
make_safe_ssl() {
easyrsa_openssl makesafeconf

notice "\
Safe SSL config file created at:
* $EASYRSA_SAFE_CONF"

verbose "\
make_safe_ssl: NEW SSL cnf file: $safe_ssl_cnf_tmp"
} # => make_safe_ssl_copy()
} # => make_safe_ssl()

# Escape hazardous characters
# Auto-escape hazardous characters:
Expand Down Expand Up @@ -5334,7 +5335,7 @@ validate_default_vars() {

# This is an almost unacceptable error
invalid_vars=1
[ "$ignore_vars" ] || user_error "\
[ "$quiet_vars" ] || user_error "\
The values in the vars file have unexpectedly changed the values for
EASYRSA and/or EASYRSA_PKI. The default pki/vars file is forbidden to
change these values.
Expand Down Expand Up @@ -6231,11 +6232,11 @@ cmd="$1"
[ "$1" ] && shift # scrape off command

# Establish PKI and CA initialisation requirements
unset -v require_pki require_ca ignore_vars
unset -v require_pki require_ca quiet_vars
case "$cmd" in
''|help|-h|--help|--usage| \
version|show-host|rand|random)
ignore_vars=1
quiet_vars=1
;;
init-pki|clean-all)
: # No change
Expand All @@ -6250,6 +6251,7 @@ case "$cmd" in
write)
unset -v EASYRSA_VERBOSE
EASYRSA_SILENT=1
quiet_vars=1
;;
*)
: # ok
Expand All @@ -6265,7 +6267,7 @@ esac
# then source the vars file, if found
# otherwise, ignore no vars file
if select_vars; then
[ "$ignore_vars" ] || information "\
[ "$quiet_vars" ] || information "\
Using Easy-RSA 'vars' configuration:
* $EASYRSA_VARS_FILE"
source_vars "$EASYRSA_VARS_FILE"
Expand Down

0 comments on commit 9be2cac

Please sign in to comment.