Skip to content

Commit

Permalink
fix anti tls in tls incorrect calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Jun 24, 2024
1 parent cc5c189 commit 409785f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tunnels/server/openssl/openssl_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,12 @@ static void downStream(tunnel_t *self, context_t *c)
// todo (test code)
// testing how the filtering behaves if we force protocol client to recevie at least
// 2 full chunks before sending anymore data
int consume = (cstate->reply_sent_tit == 1 && len > 2) ? (len / 2) : len;
int consume = len;
if ((cstate->reply_sent_tit == 1 && len > 2))
{
cstate->reply_sent_tit++;
consume = (len / 2);
}

int n = SSL_write(cstate->ssl, rawBuf(c->payload), consume);
status = getSslstatus(cstate->ssl, n);
Expand Down

0 comments on commit 409785f

Please sign in to comment.