File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -17080,7 +17080,13 @@ run_renego() {
17080
17080
pr_svrty_medium "VULNERABLE (NOT ok)"; outln ", potential DoS threat"
17081
17081
fileout "$jsonID" "MEDIUM" "VULNERABLE, potential DoS threat" "$cve" "$cwe" "$hint"
17082
17082
else
17083
- (for ((i=0; i < ssl_reneg_attempts; i++ )); do echo R; sleep $ssl_reneg_wait; done) | \
17083
+ # Clear the log to not get the content of previous run before the execution of the new one.
17084
+ echo -n > $TMPFILE
17085
+ # If we dont wait for the session to be established on slow server, we will try to re-negotiate
17086
+ # too early losing all the attempts before the session establishment as OpenSSL will not buffer them
17087
+ # (only the first will be till the establishement of the session).
17088
+ (while [[ $(grep -ac '^SSL-Session:' $TMPFILE) -ne 1 ]]; do sleep 1; done; \
17089
+ for ((i=0; i < ssl_reneg_attempts; i++ )); do echo R; sleep $ssl_reneg_wait; done) | \
17084
17090
$OPENSSL s_client $(s_client_options "$proto $legacycmd $STARTTLS $BUGS -connect $NODEIP:$PORT $PROXY $SNI") >$TMPFILE 2>>$ERRFILE &
17085
17091
pid=$!
17086
17092
( sleep $(($ssl_reneg_attempts*3)) && pkill -HUP -P $pid && wait $pid && touch $TEMPDIR/was_killed ) >&2 2>/dev/null &
You can’t perform that action at this time.
0 commit comments