mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 04:35:33 +00:00
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. */
|
/*! The IV for server->client records. */
|
||||||
unsigned char server_write_iv[ MBEDTLS_MAX_IV_LENGTH ];
|
unsigned char server_write_iv[ MBEDTLS_MAX_IV_LENGTH ];
|
||||||
|
|
||||||
size_t keyLen; /*!< The length of client_write_key and
|
size_t key_len; /*!< The length of client_write_key and
|
||||||
* server_write_key, in Bytes. */
|
* server_write_key, in Bytes. */
|
||||||
size_t ivLen; /*!< The length of client_write_iv and
|
size_t iv_len; /*!< The length of client_write_iv and
|
||||||
* server_write_iv, in Bytes. */
|
* server_write_iv, in Bytes. */
|
||||||
};
|
};
|
||||||
typedef struct mbedtls_ssl_key_set mbedtls_ssl_key_set;
|
typedef struct mbedtls_ssl_key_set mbedtls_ssl_key_set;
|
||||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
#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,
|
mbedtls_md_type_t hash_alg,
|
||||||
const unsigned char *client_secret,
|
const unsigned char *client_secret,
|
||||||
const unsigned char *server_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 )
|
mbedtls_ssl_key_set *keys )
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -194,7 +194,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||||
client_secret, slen,
|
client_secret, slen,
|
||||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
keys->client_write_key, keyLen );
|
keys->client_write_key, key_len );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||||
server_secret, slen,
|
server_secret, slen,
|
||||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( key ),
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
keys->server_write_key, keyLen );
|
keys->server_write_key, key_len );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||||
client_secret, slen,
|
client_secret, slen,
|
||||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
keys->client_write_iv, ivLen );
|
keys->client_write_iv, iv_len );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
|
@ -218,12 +218,12 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||||
server_secret, slen,
|
server_secret, slen,
|
||||||
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
MBEDTLS_SSL_TLS1_3_LBL_WITH_LEN( iv ),
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
keys->server_write_iv, ivLen );
|
keys->server_write_iv, iv_len );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
keys->keyLen = keyLen;
|
keys->key_len = key_len;
|
||||||
keys->ivLen = ivLen;
|
keys->iv_len = iv_len;
|
||||||
|
|
||||||
return( 0 );
|
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
|
* This must be a readable buffer of size \p slen Bytes
|
||||||
* \param slen Length of the secrets \p client_secret and
|
* \param slen Length of the secrets \p client_secret and
|
||||||
* \p server_secret in Bytes.
|
* \p server_secret in Bytes.
|
||||||
* \param keyLen The desired length of the key to be extracted in Bytes.
|
* \param key_len 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 iv_len The desired length of the IV to be extracted in Bytes.
|
||||||
* \param keys The address of the structure holding the generated
|
* \param keys The address of the structure holding the generated
|
||||||
* keys and IVs.
|
* keys and IVs.
|
||||||
*
|
*
|
||||||
|
@ -142,7 +142,7 @@ int mbedtls_ssl_tls1_3_make_traffic_keys(
|
||||||
mbedtls_md_type_t hash_alg,
|
mbedtls_md_type_t hash_alg,
|
||||||
const unsigned char *client_secret,
|
const unsigned char *client_secret,
|
||||||
const unsigned char *server_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 );
|
mbedtls_ssl_key_set *keys );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3726,19 +3726,19 @@ void ssl_tls1_3_traffic_key_generation( int hash_alg,
|
||||||
&keys ) == 0 );
|
&keys ) == 0 );
|
||||||
|
|
||||||
ASSERT_COMPARE( keys.client_write_key,
|
ASSERT_COMPARE( keys.client_write_key,
|
||||||
keys.keyLen,
|
keys.key_len,
|
||||||
expected_client_write_key->x,
|
expected_client_write_key->x,
|
||||||
(size_t) desired_key_len );
|
(size_t) desired_key_len );
|
||||||
ASSERT_COMPARE( keys.server_write_key,
|
ASSERT_COMPARE( keys.server_write_key,
|
||||||
keys.keyLen,
|
keys.key_len,
|
||||||
expected_server_write_key->x,
|
expected_server_write_key->x,
|
||||||
(size_t) desired_key_len );
|
(size_t) desired_key_len );
|
||||||
ASSERT_COMPARE( keys.client_write_iv,
|
ASSERT_COMPARE( keys.client_write_iv,
|
||||||
keys.ivLen,
|
keys.iv_len,
|
||||||
expected_client_write_iv->x,
|
expected_client_write_iv->x,
|
||||||
(size_t) desired_iv_len );
|
(size_t) desired_iv_len );
|
||||||
ASSERT_COMPARE( keys.server_write_iv,
|
ASSERT_COMPARE( keys.server_write_iv,
|
||||||
keys.ivLen,
|
keys.iv_len,
|
||||||
expected_server_write_iv->x,
|
expected_server_write_iv->x,
|
||||||
(size_t) desired_iv_len );
|
(size_t) desired_iv_len );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue