mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Remove MBEDTLS_SSL_MAX_CONTENT_LEN option
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
b6800788ca
commit
95d516f319
11 changed files with 42 additions and 69 deletions
|
|
@ -1572,13 +1572,15 @@ 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 ||
|
||||
( opt.buffer_size > MBEDTLS_SSL_IN_CONTENT_LEN + 1
|
||||
&& opt.buffer_size > MBEDTLS_SSL_OUT_CONTENT_LEN + 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue