From 4f42c11846bcd8783d2a07ad30ce979eb23add22 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Thu, 17 Apr 2014 14:48:23 +0200
Subject: [PATCH] Remove arbitrary maximum length for cipher_list and content
length
---
library/ssl_srv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index d99f10515..c384364f8 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -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 );