mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-02 05:24:20 +01:00
Fix guards around use of legacy ECDH context
mbedtls_ssl_handshake_params::ecdh_ctx should only be guarded by MBEDTLS_ECDH_C, not by MBEDTLS_ECDSA_C.
This commit is contained in:
parent
49dc8edd26
commit
975b9ee3c8
@ -1404,7 +1404,7 @@ static int ssl_parse_supported_point_formats_ext( mbedtls_ssl_context *ssl,
|
|||||||
if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED ||
|
if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED ||
|
||||||
p[0] == MBEDTLS_ECP_PF_COMPRESSED )
|
p[0] == MBEDTLS_ECP_PF_COMPRESSED )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
|
#if defined(MBEDTLS_ECDH_C)
|
||||||
ssl->handshake->ecdh_ctx.point_format = p[0];
|
ssl->handshake->ecdh_ctx.point_format = p[0];
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||||
|
@ -350,7 +350,7 @@ static int ssl_parse_supported_point_formats( mbedtls_ssl_context *ssl,
|
|||||||
if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED ||
|
if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED ||
|
||||||
p[0] == MBEDTLS_ECP_PF_COMPRESSED )
|
p[0] == MBEDTLS_ECP_PF_COMPRESSED )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
|
#if defined(MBEDTLS_ECDH_C)
|
||||||
ssl->handshake->ecdh_ctx.point_format = p[0];
|
ssl->handshake->ecdh_ctx.point_format = p[0];
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||||
|
Loading…
Reference in New Issue
Block a user