Commit 4f42c118 authored by Paul Bakker's avatar Paul Bakker
Browse files

Remove arbitrary maximum length for cipher_list and content length

parent d893aef8
......@@ -1172,7 +1172,7 @@ static int ssl_parse_client_hello( ssl_context *ssl )
n = ( buf[3] << 8 ) | buf[4];
if( n < 45 || n > 2048 )
if( n < 45 || n > SSL_MAX_CONTENT_LEN )
{
SSL_DEBUG_MSG( 1, ( "bad client hello message" ) );
return( POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO );
......@@ -1287,7 +1287,7 @@ static int ssl_parse_client_hello( ssl_context *ssl )
ciph_len = ( buf[39 + sess_len] << 8 )
| ( buf[40 + sess_len] );
if( ciph_len < 2 || ciph_len > 256 || ( ciph_len % 2 ) != 0 )
if( ciph_len < 2 || ( ciph_len % 2 ) != 0 )
{
SSL_DEBUG_MSG( 1, ( "bad client hello message" ) );
return( POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment