mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
@@ -132,9 +132,9 @@ static int ssl_tls13_write_client_hello_cipher_suites(
|
|||||||
unsigned char *end,
|
unsigned char *end,
|
||||||
size_t *olen )
|
size_t *olen )
|
||||||
{
|
{
|
||||||
|
unsigned char *p = buf; /* Iteration over the cipher_suites list */
|
||||||
const int *ciphersuite_list;
|
const int *ciphersuite_list;
|
||||||
unsigned char *cipher_suites_ptr; /* Start of the cipher_suites list */
|
unsigned char *cipher_suites_ptr; /* Start of the cipher_suites list */
|
||||||
unsigned char *p; /* Iteration over the cipher_suites list */
|
|
||||||
size_t cipher_suites_len;
|
size_t cipher_suites_len;
|
||||||
|
|
||||||
*olen = 0 ;
|
*olen = 0 ;
|
||||||
@@ -150,12 +150,11 @@ static int ssl_tls13_write_client_hello_cipher_suites(
|
|||||||
ciphersuite_list = ssl->conf->ciphersuite_list;
|
ciphersuite_list = ssl->conf->ciphersuite_list;
|
||||||
|
|
||||||
/* Check there is space for the cipher suite list length (2 bytes). */
|
/* Check there is space for the cipher suite list length (2 bytes). */
|
||||||
MBEDTLS_SSL_CHK_BUF_PTR( buf, end, 2 );
|
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 );
|
||||||
|
p += 2;
|
||||||
|
|
||||||
/* Write cipher_suites */
|
/* Write cipher_suites */
|
||||||
cipher_suites_ptr = buf + 2;
|
cipher_suites_ptr = p;
|
||||||
p = cipher_suites_ptr;
|
|
||||||
|
|
||||||
for ( size_t i = 0; ciphersuite_list[i] != 0; i++ )
|
for ( size_t i = 0; ciphersuite_list[i] != 0; i++ )
|
||||||
{
|
{
|
||||||
int cipher_suite = ciphersuite_list[i];
|
int cipher_suite = ciphersuite_list[i];
|
||||||
|
Reference in New Issue
Block a user