diff --git a/testssl.sh b/testssl.sh index 3118dfb..94b6003 100755 --- a/testssl.sh +++ b/testssl.sh @@ -393,6 +393,7 @@ SERVER_COUNTER=0 # Counter for multiple servers TLS_LOW_BYTE="" # For "secret" development stuff, see -q below HEX_CIPHER="" # " +CONNECT_TIMEOUT=180 ########### Global variables for parallel mass testing @@ -10172,7 +10173,7 @@ fd_socket() { break fi done - elif ! timeout 2 bash -c "exec 3<>/dev/tcp/$nodeip/$PORT" || \ + elif ! timeout $CONNECT_TIMEOUT bash -c "exec 3<>/dev/tcp/$nodeip/$PORT" || \ ! exec 5<>/dev/tcp/$nodeip/$PORT; then # 2>/dev/null would remove an error message, but disables debugging ((NR_SOCKET_FAIL++)) connectivity_problem $NR_SOCKET_FAIL $MAX_SOCKET_FAIL "TCP connect problem" "repeated TCP connect problems, giving up" @@ -19461,6 +19462,10 @@ parse_cmd_line() { OPENSSL_TIMEOUT="$(parse_opt_equal_sign "$1" "$2")" [[ $? -eq 0 ]] && shift ;; + --connect-timeout|--connect-timeout=*) + CONNECT_TIMEOUT="$(parse_opt_equal_sign "$1" "$2")" + [[ $? -eq 0 ]] && shift + ;; --mapping|--mapping=*) cipher_mapping="$(parse_opt_equal_sign "$1" "$2")" [[ $? -eq 0 ]] && shift