Replace session_negotiate->ciphersuite with handshake->ciphersuite_info->id
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
parent
53c4c27d35
commit
6b980011e5
3 changed files with 5 additions and 11 deletions
|
@ -1712,11 +1712,6 @@ static int ssl_tls13_parse_server_hello(mbedtls_ssl_context *ssl,
|
||||||
mbedtls_ssl_optimize_checksum(ssl, ciphersuite_info);
|
mbedtls_ssl_optimize_checksum(ssl, ciphersuite_info);
|
||||||
|
|
||||||
handshake->ciphersuite_info = ciphersuite_info;
|
handshake->ciphersuite_info = ciphersuite_info;
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
|
||||||
if (handshake->resume == 0)
|
|
||||||
#endif
|
|
||||||
ssl->session_negotiate->ciphersuite = cipher_suite;
|
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG(3, ("server hello, chosen ciphersuite: ( %04x ) - %s",
|
MBEDTLS_SSL_DEBUG_MSG(3, ("server hello, chosen ciphersuite: ( %04x ) - %s",
|
||||||
cipher_suite, ciphersuite_info->name));
|
cipher_suite, ciphersuite_info->name));
|
||||||
|
|
||||||
|
|
|
@ -1378,9 +1378,8 @@ int mbedtls_ssl_reset_transcript_for_hrr(mbedtls_ssl_context *ssl)
|
||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
unsigned char hash_transcript[PSA_HASH_MAX_SIZE + 4];
|
unsigned char hash_transcript[PSA_HASH_MAX_SIZE + 4];
|
||||||
size_t hash_len;
|
size_t hash_len;
|
||||||
const mbedtls_ssl_ciphersuite_t *ciphersuite_info;
|
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
|
||||||
uint16_t cipher_suite = ssl->session_negotiate->ciphersuite;
|
ssl->handshake->ciphersuite_info;
|
||||||
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id(cipher_suite);
|
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG(3, ("Reset SSL session for HRR"));
|
MBEDTLS_SSL_DEBUG_MSG(3, ("Reset SSL session for HRR"));
|
||||||
|
|
||||||
|
|
|
@ -1238,7 +1238,7 @@ int mbedtls_ssl_tls13_compute_early_transform(mbedtls_ssl_context *ssl)
|
||||||
ret = mbedtls_ssl_tls13_populate_transform(
|
ret = mbedtls_ssl_tls13_populate_transform(
|
||||||
transform_earlydata,
|
transform_earlydata,
|
||||||
ssl->conf->endpoint,
|
ssl->conf->endpoint,
|
||||||
ssl->session_negotiate->ciphersuite,
|
handshake->ciphersuite_info->id,
|
||||||
&traffic_keys,
|
&traffic_keys,
|
||||||
ssl);
|
ssl);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -1699,7 +1699,7 @@ int mbedtls_ssl_tls13_compute_handshake_transform(mbedtls_ssl_context *ssl)
|
||||||
ret = mbedtls_ssl_tls13_populate_transform(
|
ret = mbedtls_ssl_tls13_populate_transform(
|
||||||
transform_handshake,
|
transform_handshake,
|
||||||
ssl->conf->endpoint,
|
ssl->conf->endpoint,
|
||||||
ssl->session_negotiate->ciphersuite,
|
handshake->ciphersuite_info->id,
|
||||||
&traffic_keys,
|
&traffic_keys,
|
||||||
ssl);
|
ssl);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -1789,7 +1789,7 @@ int mbedtls_ssl_tls13_compute_application_transform(mbedtls_ssl_context *ssl)
|
||||||
ret = mbedtls_ssl_tls13_populate_transform(
|
ret = mbedtls_ssl_tls13_populate_transform(
|
||||||
transform_application,
|
transform_application,
|
||||||
ssl->conf->endpoint,
|
ssl->conf->endpoint,
|
||||||
ssl->session_negotiate->ciphersuite,
|
ssl->handshake->ciphersuite_info->id,
|
||||||
&traffic_keys,
|
&traffic_keys,
|
||||||
ssl);
|
ssl);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
Loading…
Reference in a new issue