1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge pull request #4458 from davidhorstmann-arm/remove-max-content-len

Remove MBEDTLS_SSL_MAX_CONTENT_LEN option
This commit is contained in:
Ronald Cron
2021-05-17 16:36:04 +02:00
committed by GitHub
11 changed files with 41 additions and 70 deletions

View File

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

View File

@ -2595,14 +2595,6 @@ int query_config( const char *config )
}
#endif /* MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES */
#if defined(MBEDTLS_SSL_MAX_CONTENT_LEN)
if( strcmp( "MBEDTLS_SSL_MAX_CONTENT_LEN", config ) == 0 )
{
MACRO_EXPANSION_TO_STR( MBEDTLS_SSL_MAX_CONTENT_LEN );
return( 0 );
}
#endif /* MBEDTLS_SSL_MAX_CONTENT_LEN */
#if defined(MBEDTLS_SSL_IN_CONTENT_LEN)
if( strcmp( "MBEDTLS_SSL_IN_CONTENT_LEN", config ) == 0 )
{