Remove buffer_size maximum from ssl_server2.c

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2021-05-11 15:23:56 +01:00
parent 95d516f319
commit fba138a08a

View file

@ -451,7 +451,7 @@ int main( void )
" server_port=%%d default: 4433\n" \ " server_port=%%d default: 4433\n" \
" debug_level=%%d default: 0 (disabled)\n" \ " debug_level=%%d default: 0 (disabled)\n" \
" buffer_size=%%d default: 200 \n" \ " buffer_size=%%d default: 200 \n" \
" (minimum: 1, max: 16385)\n" \ " (minimum: 1)\n" \
" response_size=%%d default: about 152 (basic response)\n" \ " response_size=%%d default: about 152 (basic response)\n" \
" (minimum: 0, max: 16384)\n" \ " (minimum: 0, max: 16384)\n" \
" increases buffer_size if bigger\n"\ " increases buffer_size if bigger\n"\
@ -1572,9 +1572,7 @@ int main( int argc, char *argv[] )
else if( strcmp( p, "buffer_size" ) == 0 ) else if( strcmp( p, "buffer_size" ) == 0 )
{ {
opt.buffer_size = atoi( q ); opt.buffer_size = atoi( q );
if( opt.buffer_size < 1 || if( opt.buffer_size < 1 )
( opt.buffer_size > MBEDTLS_SSL_IN_CONTENT_LEN + 1
&& opt.buffer_size > MBEDTLS_SSL_OUT_CONTENT_LEN + 1 ) )
goto usage; goto usage;
} }
else if( strcmp( p, "response_size" ) == 0 ) else if( strcmp( p, "response_size" ) == 0 )