mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 17:20:57 +01:00
#414 polish: filename fix for windows, handling of existence and type of timeout
This commit is contained in:
parent
c6da054418
commit
2036e1e9e0
16
testssl.sh
16
testssl.sh
@ -7285,7 +7285,19 @@ find_openssl_binary() {
|
|||||||
HAS_XMPP=true
|
HAS_XMPP=true
|
||||||
|
|
||||||
if [[ "$OPENSSL_TIMEOUT" != "" ]]; then
|
if [[ "$OPENSSL_TIMEOUT" != "" ]]; then
|
||||||
OPENSSL="timeout --preserve-status $OPENSSL_TIMEOUT $OPENSSL"
|
if which timeout >&2 2>/dev/null ; then
|
||||||
|
# there are different "timeout". Check whether --preserve-status is supported
|
||||||
|
if timeout --help 2>/dev/null | grep -q 'preserve-status'; then
|
||||||
|
OPENSSL="timeout --preserve-status $OPENSSL_TIMEOUT $OPENSSL"
|
||||||
|
else
|
||||||
|
OPENSSL="timeout $OPENSSL_TIMEOUT $OPENSSL"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
outln
|
||||||
|
ignore_no_or_lame " neccessary binary \"timeout\" not found. Continue without timeout?"
|
||||||
|
[[ $? -ne 0 ]] && exit -2
|
||||||
|
unset OPENSSL_TIMEOUT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -7693,7 +7705,7 @@ parse_hn_port() {
|
|||||||
prepare_logging() {
|
prepare_logging() {
|
||||||
local fname_prefix="$1"
|
local fname_prefix="$1"
|
||||||
|
|
||||||
[[ -z "$fname_prefix" ]] && fname_prefix="$NODE:$PORT"
|
[[ -z "$fname_prefix" ]] && fname_prefix="$NODE"_"$PORT"
|
||||||
|
|
||||||
if "$do_logging"; then
|
if "$do_logging"; then
|
||||||
if [[ -z "$LOGFILE" ]]; then
|
if [[ -z "$LOGFILE" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user