Remove instances of camelCase in TLS 1.3 key schedule
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
fb08096b9b
commit
493ea7f4ae
@ -395,10 +395,10 @@ struct mbedtls_ssl_key_set
|
||||
/*! The IV for server->client records. */
|
||||
unsigned char server_write_iv[ MBEDTLS_MAX_IV_LENGTH ];
|
||||
|
||||
size_t keyLen; /*!< The length of client_write_key and
|
||||
* server_write_key, in Bytes. */
|
||||
size_t ivLen; /*!< The length of client_write_iv and
|
||||
* server_write_iv, in Bytes. */
|
||||
size_t key_len; /*!< The length of client_write_key and
|
||||
* server_write_key, in Bytes. */
|
||||
size_t iv_len; /*!< The length of client_write_iv and
|
||||
* server_write_iv, in Bytes. */
|
||||
};
|
||||
typedef struct mbedtls_ssl_key_set mbedtls_ssl_key_set;
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
|
@ -185,7 +185,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
mbedtls_md_type_t hash_alg,
|
||||
const unsigned char *client_secret,
|
||||
const unsigned char *server_secret,
|
||||
size_t slen, size_t keyLen, size_t ivLen,
|
||||
size_t slen, size_t key_len, size_t iv_len,
|
||||
mbedtls_ssl_key_set *keys )
|
||||
{
|
||||
int ret = 0;
|
||||
@ -194,7 +194,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
client_secret, slen,
|
||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
||||
NULL, 0,
|
||||
keys->client_write_key, keyLen );
|
||||
keys->client_write_key, key_len );
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
@ -202,7 +202,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
server_secret, slen,
|
||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
||||
NULL, 0,
|
||||
keys->server_write_key, keyLen );
|
||||
keys->server_write_key, key_len );
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
@ -210,7 +210,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
client_secret, slen,
|
||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
||||
NULL, 0,
|
||||
keys->client_write_iv, ivLen );
|
||||
keys->client_write_iv, iv_len );
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
@ -218,12 +218,12 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
server_secret, slen,
|
||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
||||
NULL, 0,
|
||||
keys->server_write_iv, ivLen );
|
||||
keys->server_write_iv, iv_len );
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
keys->keyLen = keyLen;
|
||||
keys->ivLen = ivLen;
|
||||
keys->key_len = key_len;
|
||||
keys->iv_len = iv_len;
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
@ -129,8 +129,8 @@ int mbedtls_ssl_tls1_3_hkdf_expand_label(
|
||||
* This must be a readable buffer of size \p slen Bytes
|
||||
* \param slen Length of the secrets \p client_secret and
|
||||
* \p server_secret in Bytes.
|
||||
* \param keyLen The desired length of the key to be extracted in Bytes.
|
||||
* \param ivLen The desired length of the IV to be extracted in Bytes.
|
||||
* \param key_len The desired length of the key to be extracted in Bytes.
|
||||
* \param iv_len The desired length of the IV to be extracted in Bytes.
|
||||
* \param keys The address of the structure holding the generated
|
||||
* keys and IVs.
|
||||
*
|
||||
@ -142,7 +142,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||
mbedtls_md_type_t hash_alg,
|
||||
const unsigned char *client_secret,
|
||||
const unsigned char *server_secret,
|
||||
size_t slen, size_t keyLen, size_t ivLen,
|
||||
size_t slen, size_t key_len, size_t iv_len,
|
||||
mbedtls_ssl_key_set *keys );
|
||||
|
||||
/**
|
||||
|
@ -3726,19 +3726,19 @@ void ssl_tls1_3_traffic_key_generation( int hash_alg,
|
||||
&keys ) == 0 );
|
||||
|
||||
ASSERT_COMPARE( keys.client_write_key,
|
||||
keys.keyLen,
|
||||
keys.key_len,
|
||||
expected_client_write_key->x,
|
||||
(size_t) desired_key_len );
|
||||
ASSERT_COMPARE( keys.server_write_key,
|
||||
keys.keyLen,
|
||||
keys.key_len,
|
||||
expected_server_write_key->x,
|
||||
(size_t) desired_key_len );
|
||||
ASSERT_COMPARE( keys.client_write_iv,
|
||||
keys.ivLen,
|
||||
keys.iv_len,
|
||||
expected_client_write_iv->x,
|
||||
(size_t) desired_iv_len );
|
||||
ASSERT_COMPARE( keys.server_write_iv,
|
||||
keys.ivLen,
|
||||
keys.iv_len,
|
||||
expected_server_write_iv->x,
|
||||
(size_t) desired_iv_len );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user