Skip to content

Commit

Permalink
Move control of $safe_ssl_cnf_tmp to expand_ssl_config()
Browse files Browse the repository at this point in the history
expand_ssl_config() is the only function to set or use $safe_ssl_cnf_tmp.
Therefore, make $safe_ssl_cnf_tmp simulated 'local' to expand_ssl_config().

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
  • Loading branch information
TinCanTech committed Dec 17, 2024
1 parent e6ff07c commit 939e456
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ secure_session - Missing temporary directory:
die "secure_session - temp-file EXISTS"

# New session requires safe-ssl conf
unset -v session OPENSSL_CONF safe_ssl_cnf_tmp \
unset -v session OPENSSL_CONF \
working_safe_ssl_conf working_safe_org_conf

easyrsa_err_log="$secured_session/error.log"
Expand All @@ -862,7 +862,7 @@ remove_secure_session: DELETED: $secured_session"
# Restore original EASYRSA_SSL_CONF
EASYRSA_SSL_CONF="$original_ssl_cnf"

unset -v secured_session OPENSSL_CONF safe_ssl_cnf_tmp \
unset -v secured_session OPENSSL_CONF \
working_safe_ssl_conf working_safe_org_conf
return
fi
Expand Down Expand Up @@ -1190,6 +1190,7 @@ expand_ssl_config() {
fi

export EASYRSA_SSL_CONF="$safe_ssl_cnf_tmp"
unset -v safe_ssl_cnf_tmp
verbose \
"expand_ssl_config: EASYRSA_SSL_CONF = $EASYRSA_SSL_CONF"
} # => expand_ssl_config()
Expand Down

0 comments on commit 939e456

Please sign in to comment.