From ef387d79a467c77b68605bcfd91a2981518e9b62 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 2 Sep 2021 13:59:41 +0800 Subject: [PATCH] change prototype of write body To keep consistence with others Signed-off-by: Jerry Yu --- library/ssl_tls13_client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 6b8927335..262481c6a 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -205,7 +205,7 @@ static int ssl_tls13_write_client_hello_cipher_suites( */ static int ssl_tls13_write_client_hello_body( mbedtls_ssl_context *ssl, unsigned char *buf, - size_t buflen, + unsigned char *end, size_t *olen ) { @@ -216,7 +216,6 @@ static int ssl_tls13_write_client_hello_body( mbedtls_ssl_context *ssl, /* Buffer management */ unsigned char *start = buf; - unsigned char *end = buf + buflen; *olen = 0; @@ -388,7 +387,7 @@ static int ssl_tls13_write_client_hello( mbedtls_ssl_context *ssl ) &buf, &buf_len ) ); MBEDTLS_SSL_PROC_CHK( ssl_tls13_write_client_hello_body( ssl, buf, - buf_len, + buf + buf_len, &msg_len ) ); mbedtls_ssl_tls13_add_hs_hdr_to_checksum( ssl,