Allow exchanges=0 in ssl_server2

Useful for testing with defensics with no data exchange
This commit is contained in:
Manuel Pégourié-Gonnard 2014-10-09 15:33:13 +02:00 committed by Paul Bakker
parent cce220d6aa
commit 6a2bc23f63

View File

@ -869,7 +869,7 @@ int main( int argc, char *argv[] )
else if( strcmp( p, "exchanges" ) == 0 )
{
opt.exchanges = atoi( q );
if( opt.exchanges < 1 )
if( opt.exchanges < 0 )
goto usage;
}
else if( strcmp( p, "min_version" ) == 0 )
@ -1740,6 +1740,9 @@ reset:
}
#endif /* POLARSSL_X509_CRT_PARSE_C */
if( opt.exchanges == 0 )
goto close_notify;
exchanges = opt.exchanges;
data_exchange:
/*