Remove `len_without_binders`
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c
index f6e145b..2cada0d 100644
--- a/library/ssl_tls13_client.c
+++ b/library/ssl_tls13_client.c
@@ -73,8 +73,7 @@
static int ssl_client_hello_prepare( mbedtls_ssl_context* ssl );
static int ssl_client_hello_write_partial( mbedtls_ssl_context* ssl,
unsigned char* buf, size_t buflen,
- size_t* len_without_binders,
- size_t* len_with_binders );
+ size_t *len_with_binders );
static int ssl_client_hello_postprocess( mbedtls_ssl_context* ssl );
static int ssl_client_hello_process( mbedtls_ssl_context* ssl )
@@ -82,7 +81,6 @@
int ret = 0;
unsigned char *buf;
size_t buf_len, msg_len;
- size_t len_without_binders = 0;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write client hello" ) );
@@ -91,13 +89,11 @@
MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_start_handshake_msg, ( ssl,
MBEDTLS_SSL_HS_CLIENT_HELLO, &buf, &buf_len ) );
- MBEDTLS_SSL_PROC_CHK( ssl_client_hello_write_partial, ( ssl, buf, buf_len,
- &len_without_binders,
- &msg_len ) );
+ MBEDTLS_SSL_PROC_CHK( ssl_client_hello_write_partial, ( ssl, buf, buf_len, &msg_len ) );
mbedtls_ssl_add_hs_hdr_to_checksum( ssl, MBEDTLS_SSL_HS_CLIENT_HELLO,
msg_len );
- ssl->handshake->update_checksum( ssl, buf, len_without_binders );
+ ssl->handshake->update_checksum( ssl, buf, 0 );
MBEDTLS_SSL_PROC_CHK( ssl_client_hello_postprocess, ( ssl ) );
MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_finish_handshake_msg, ( ssl, buf_len, msg_len ) );
@@ -162,8 +158,7 @@
static int ssl_client_hello_write_partial( mbedtls_ssl_context* ssl,
unsigned char* buf, size_t buflen,
- size_t* len_without_binders,
- size_t* len_with_binders )
+ size_t *len_with_binders )
{
/* Extensions */
@@ -396,7 +391,6 @@
*extension_start++ = (unsigned char)( ( total_ext_len >> 8 ) & 0xFF );
*extension_start++ = (unsigned char)( ( total_ext_len ) & 0xFF );
- *len_without_binders = buf - start;
*len_with_binders = ( extension_start + total_ext_len ) - start;
return( 0 );
}