1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Quit using "yes" in ssl-opt.sh with openssl

It caused s_server to send an AppData record of 16Kb every millisecond or so,
which destroyed readability of the proxy and client logs.
This commit is contained in:
Manuel Pégourié-Gonnard
2014-09-26 16:07:29 +02:00
committed by Paul Bakker
parent ae666c5092
commit fa60f128d6
2 changed files with 27 additions and 6 deletions

View File

@@ -367,13 +367,12 @@ static unsigned char dropped[2048] = { 0 };
void update_dropped( const packet *p )
{
size_t id = p->len % sizeof( dropped );
++dropped[id];
const unsigned char *end = p->buf + p->len;
const unsigned char *cur = p->buf;
size_t len = ( ( cur[11] << 8 ) | cur[12] ) + 13;
++dropped[id];
/* Avoid counting single record twice */
if( len == p->len )
return;