Skip to content

Commit 43e5561

Browse files
committed
errorlog filtering fix
Filter out verify and deph lines to not reintrodure timing race condition.
1 parent 91367ca commit 43e5561

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

testssl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17113,9 +17113,9 @@ run_renego() {
1711317113
# too early losing all the attempts before the session establishment as OpenSSL will not buffer them
1711417114
# (only the first will be till the establishement of the session).
1711517115
(j=0; while [[ $(grep -ac '^SSL-Session:' $TMPFILE) -ne 1 ]] && [[ $j -lt 30 ]]; do sleep $ssl_reneg_wait; j=$(($j+1)); done; \
17116-
for ((i=0; i < $ssl_reneg_attempts; i++ )); do sleep $ssl_reneg_wait; echo R; k=0; \
17116+
for ((i=0; i < ssl_reneg_attempts; i++ )); do sleep $ssl_reneg_wait; echo R; k=0; \
1711717117
while [[ $(grep -ac '^RENEGOTIATING' $ERRFILE) -ne $(($i+3)) ]] && [[ -f $TEMPDIR/allowed_to_loop ]] \
17118-
&& [[ $(tail -n1 $ERRFILE |grep -ac '^RENEGOTIATING') -eq 1 ]] && [[ $k -lt 120 ]]; \
17118+
&& [[ $(tail -n1 $ERRFILE |grep -acE '^(RENEGOTIATING|depth|verify)') -eq 1 ]] && [[ $k -lt 120 ]]; \
1711917119
do sleep $ssl_reneg_wait; k=$(($k+1)); done; \
1712017120
done) | \
1712117121
$OPENSSL s_client $(s_client_options "$proto $legacycmd $STARTTLS $BUGS -connect $NODEIP:$PORT $PROXY $SNI") >$TMPFILE 2>>$ERRFILE &

0 commit comments

Comments
 (0)