easyrsa_openssl(): Only 'return' on success of called openssl command
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
a27e729a4a
commit
9fec600274
@ -882,21 +882,26 @@ easyrsa_openssl() {
|
|||||||
# set $OPENSSL_CONF - Use which-ever file is assigned above
|
# set $OPENSSL_CONF - Use which-ever file is assigned above
|
||||||
export OPENSSL_CONF="$easyrsa_safe_ssl_conf"
|
export OPENSSL_CONF="$easyrsa_safe_ssl_conf"
|
||||||
|
|
||||||
# Execute command
|
# Execute command - Return on success
|
||||||
if [ "$openssl_command" = "makesafeconf" ]; then
|
if [ "$openssl_command" = "makesafeconf" ]; then
|
||||||
# move temp file to safessl-easyrsa.cnf
|
# move temp file to safessl-easyrsa.cnf
|
||||||
mv -f "$easyrsa_safe_ssl_conf" "$EASYRSA_SAFE_CONF" || \
|
mv -f "$easyrsa_safe_ssl_conf" "$EASYRSA_SAFE_CONF" && \
|
||||||
die "easyrsa_openssl - makesafeconf failed"
|
return
|
||||||
|
|
||||||
elif [ "$has_config" ]; then
|
elif [ "$has_config" ]; then
|
||||||
# Exec SSL with -config temp-file
|
# Exec SSL with -config temp-file
|
||||||
"$EASYRSA_OPENSSL" "$openssl_command" \
|
"$EASYRSA_OPENSSL" "$openssl_command" \
|
||||||
-config "$easyrsa_safe_ssl_conf" "$@" || return
|
-config "$easyrsa_safe_ssl_conf" "$@" && \
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
# Exec SSL without -config temp-file
|
# Exec SSL without -config temp-file
|
||||||
"$EASYRSA_OPENSSL" "$openssl_command" "$@" || return
|
"$EASYRSA_OPENSSL" "$openssl_command" "$@" && \
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Always fail here
|
||||||
|
die "easyrsa_openssl - $openssl_command failed"
|
||||||
} # => easyrsa_openssl()
|
} # => easyrsa_openssl()
|
||||||
|
|
||||||
# Verify the SSL library is functional and establish version dependencies
|
# Verify the SSL library is functional and establish version dependencies
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user