mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add Character byte reading macros
These cast to an unsigned char rather than a uint8_t like with MBEDTLS_BYTE_x These save alot of space and will improve maintence by replacing the appropriate code with MBEDTLS_CHAR_x Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -113,17 +113,17 @@ static void ssl_tls1_3_hkdf_encode_label(
|
||||
#endif
|
||||
|
||||
*p++ = 0;
|
||||
*p++ = (unsigned char)( ( desired_length >> 0 ) & 0xFF );
|
||||
*p++ = MBEDTLS_CHAR_0( desired_length );
|
||||
|
||||
/* Add label incl. prefix */
|
||||
*p++ = (unsigned char)( total_label_len & 0xFF );
|
||||
*p++ = MBEDTLS_CHAR_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++ = (unsigned char)( clen & 0xFF );
|
||||
*p++ = MBEDTLS_CHAR_0( clen );
|
||||
if( clen != 0 )
|
||||
memcpy( p, ctx, clen );
|
||||
|
||||
|
Reference in New Issue
Block a user