mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Replace MBEDTLS_CHAR_x with MBEDTLS_BYTE_x
The CHAR macros casted to an unsigned char which in this project is garunteed to be 8 bits - the same as uint8_t (which BYTE casts to) therefore, instances of CHAR have been swapped with BYTE and the number of macros have been cut down Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -112,17 +112,17 @@ static void ssl_tls1_3_hkdf_encode_label(
|
||||
#endif
|
||||
|
||||
*p++ = 0;
|
||||
*p++ = MBEDTLS_CHAR_0( desired_length );
|
||||
*p++ = MBEDTLS_BYTE_0( desired_length );
|
||||
|
||||
/* Add label incl. prefix */
|
||||
*p++ = MBEDTLS_CHAR_0( total_label_len );
|
||||
*p++ = MBEDTLS_BYTE_0( total_label_len );
|
||||
memcpy( p, tls1_3_label_prefix, sizeof(tls1_3_label_prefix) );
|
||||
p += sizeof(tls1_3_label_prefix);
|
||||
memcpy( p, label, llen );
|
||||
p += llen;
|
||||
|
||||
/* Add context value */
|
||||
*p++ = MBEDTLS_CHAR_0( clen );
|
||||
*p++ = MBEDTLS_BYTE_0( clen );
|
||||
if( clen != 0 )
|
||||
memcpy( p, ctx, clen );
|
||||
|
||||
|
Reference in New Issue
Block a user