Merge pull request #7935 from AgathiyanB/add-enum-casts
Add type casts for integer and enum types
This commit is contained in:
commit
bb07377458
11 changed files with 58 additions and 40 deletions
|
@ -1166,7 +1166,8 @@ read_record_header:
|
|||
*/
|
||||
MBEDTLS_SSL_DEBUG_BUF(3, "client hello, version", buf, 2);
|
||||
|
||||
ssl->tls_version = mbedtls_ssl_read_version(buf, ssl->conf->transport);
|
||||
ssl->tls_version = (mbedtls_ssl_protocol_version) mbedtls_ssl_read_version(buf,
|
||||
ssl->conf->transport);
|
||||
ssl->session_negotiate->tls_version = ssl->tls_version;
|
||||
|
||||
if (ssl->tls_version != MBEDTLS_SSL_VERSION_TLS1_2) {
|
||||
|
@ -3799,7 +3800,8 @@ static int ssl_parse_client_key_exchange(mbedtls_ssl_context *ssl)
|
|||
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
if ((ret = mbedtls_ssl_psk_derive_premaster(ssl,
|
||||
ciphersuite_info->key_exchange)) != 0) {
|
||||
(mbedtls_key_exchange_type_t) ciphersuite_info->
|
||||
key_exchange)) != 0) {
|
||||
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ssl_psk_derive_premaster", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -3831,7 +3833,8 @@ static int ssl_parse_client_key_exchange(mbedtls_ssl_context *ssl)
|
|||
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
if ((ret = mbedtls_ssl_psk_derive_premaster(ssl,
|
||||
ciphersuite_info->key_exchange)) != 0) {
|
||||
(mbedtls_key_exchange_type_t) ciphersuite_info->
|
||||
key_exchange)) != 0) {
|
||||
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ssl_psk_derive_premaster", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -3872,7 +3875,8 @@ static int ssl_parse_client_key_exchange(mbedtls_ssl_context *ssl)
|
|||
MBEDTLS_SSL_DEBUG_MPI(3, "DHM: K ", &ssl->handshake->dhm_ctx.K);
|
||||
#else
|
||||
if ((ret = mbedtls_ssl_psk_derive_premaster(ssl,
|
||||
ciphersuite_info->key_exchange)) != 0) {
|
||||
(mbedtls_key_exchange_type_t) ciphersuite_info->
|
||||
key_exchange)) != 0) {
|
||||
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ssl_psk_derive_premaster", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -3979,7 +3983,8 @@ static int ssl_parse_client_key_exchange(mbedtls_ssl_context *ssl)
|
|||
MBEDTLS_DEBUG_ECDH_QP);
|
||||
|
||||
if ((ret = mbedtls_ssl_psk_derive_premaster(ssl,
|
||||
ciphersuite_info->key_exchange)) != 0) {
|
||||
(mbedtls_key_exchange_type_t) ciphersuite_info->
|
||||
key_exchange)) != 0) {
|
||||
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ssl_psk_derive_premaster", ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue