ssl_cli.c : add explicit casting to unsigned char

Signal casting from size_t to unsigned char explicitly, so that the compiler
does not raise a warning about possible loss of data on MSVC, targeting
64-bit Windows.
This commit is contained in:
Andrzej Kurek 2019-05-07 08:19:33 -04:00
parent 9f3d39d733
commit ade9e28d9f

View file

@ -3171,7 +3171,7 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
}
/* Copy ECPoint structure to outgoing message buffer. */
ssl->out_msg[header_len] = own_pubkey_ecpoint_len;
ssl->out_msg[header_len] = (unsigned char) own_pubkey_ecpoint_len;
memcpy( ssl->out_msg + header_len + 1,
own_pubkey_ecpoint, own_pubkey_ecpoint_len );
content_len = own_pubkey_ecpoint_len + 1;