mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-06 15:03:20 +08:00
Refine the state change after write client hello
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
parent
7892b6caad
commit
44051f6376
@ -963,17 +963,18 @@ int mbedtls_ssl_write_client_hello(mbedtls_ssl_context *ssl)
|
|||||||
buf_len,
|
buf_len,
|
||||||
msg_len));
|
msg_len));
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
/*
|
||||||
if (mbedtls_ssl_conf_is_tls12_only(ssl->conf)) {
|
* Set next state. Note that if TLS 1.3 is proposed, this may be
|
||||||
|
* overwritten by mbedtls_ssl_tls13_finalize_write_client_hello().
|
||||||
|
*/
|
||||||
mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_SERVER_HELLO);
|
mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_SERVER_HELLO);
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
|
||||||
mbedtls_ssl_tls13_finalize_write_client_hello(ssl);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||||
|
if (ssl->handshake->min_tls_version <= MBEDTLS_SSL_VERSION_TLS1_3 &&
|
||||||
|
MBEDTLS_SSL_VERSION_TLS1_3 <= ssl->tls_version) {
|
||||||
|
ret = mbedtls_ssl_tls13_finalize_write_client_hello(ssl);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user