Refine code base on review
Remove useless hrr code Share validate_cipher_suit between client and server Fix test failure when tls13 only in server side Change-Id: I5d6a7932bd8448ebf542bc86cdcab8862bc28e9b Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
parent
318dc763a6
commit
75d40ef8cb
6 changed files with 63 additions and 63 deletions
|
@ -24,7 +24,6 @@
|
|||
#include "mbedtls/debug.h"
|
||||
|
||||
#include "ssl_misc.h"
|
||||
#include "ssl_client.h"
|
||||
#include "ssl_tls13_keys.h"
|
||||
#include "ssl_debug_helpers.h"
|
||||
#include <string.h>
|
||||
|
@ -116,7 +115,7 @@ static int ssl_tls13_parse_supported_groups_ext(
|
|||
p += 2;
|
||||
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, named_group_list_len );
|
||||
named_group_list_end = p + named_group_list_len;
|
||||
ssl->handshake->hrr_selected_group = 0;
|
||||
ssl->handshake->selected_group = 0;
|
||||
|
||||
while( p < named_group_list_end )
|
||||
{
|
||||
|
@ -129,7 +128,7 @@ static int ssl_tls13_parse_supported_groups_ext(
|
|||
|
||||
if( ! mbedtls_ssl_named_group_is_offered( ssl, named_group ) ||
|
||||
! mbedtls_ssl_named_group_is_supported( named_group ) ||
|
||||
ssl->handshake->hrr_selected_group != 0 )
|
||||
ssl->handshake->selected_group != 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -137,7 +136,7 @@ static int ssl_tls13_parse_supported_groups_ext(
|
|||
MBEDTLS_SSL_DEBUG_MSG(
|
||||
2, ( "add named group (%04x) into received list.",
|
||||
named_group ) );
|
||||
ssl->handshake->hrr_selected_group = named_group;
|
||||
ssl->handshake->selected_group = named_group;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
|
@ -384,7 +383,6 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
|
|||
const unsigned char *extensions_end;
|
||||
|
||||
const mbedtls_ssl_ciphersuite_t* ciphersuite_info;
|
||||
int hrr_required = 0;
|
||||
|
||||
ssl->handshake->extensions_present = MBEDTLS_SSL_EXT_NONE;
|
||||
|
||||
|
@ -682,9 +680,6 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
|
|||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
}
|
||||
|
||||
if( hrr_required == 1 )
|
||||
return( SSL_CLIENT_HELLO_HRR_REQUIRED );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue