mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
@ -518,7 +518,11 @@ static int ssl_write_client_hello_body( mbedtls_ssl_context *ssl,
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||
{
|
||||
unsigned char cookie_len = 0;
|
||||
#if !defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
uint8_t cookie_len = 0;
|
||||
#else
|
||||
uint16_t cookie_len = 0;
|
||||
#endif /* !MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
|
||||
if( handshake->cookie != NULL )
|
||||
{
|
||||
@ -529,7 +533,7 @@ static int ssl_write_client_hello_body( mbedtls_ssl_context *ssl,
|
||||
}
|
||||
|
||||
MBEDTLS_SSL_CHK_BUF_PTR( p, end, cookie_len + 1 );
|
||||
*p++ = cookie_len;
|
||||
*p++ = ( unsigned char )cookie_len;
|
||||
if( cookie_len > 0 )
|
||||
{
|
||||
memcpy( p, handshake->cookie, cookie_len );
|
||||
|
Reference in New Issue
Block a user