mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-30 15:32:58 +00:00
tls: fix guards for legacy ECDH contexts
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
3d237b5ff1
commit
6eb005435c
@ -752,10 +752,10 @@ struct mbedtls_ssl_handshake_params {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||||
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED)
|
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED)
|
||||||
mbedtls_ecdh_context ecdh_ctx; /*!< ECDH key exchange */
|
mbedtls_ecdh_context ecdh_ctx; /*!< ECDH key exchange */
|
||||||
#endif /* !MBEDTLS_USE_PSA_CRYPTO &&
|
#endif /* !MBEDTLS_USE_PSA_CRYPTO &&
|
||||||
MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED */
|
MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED */
|
||||||
|
|
||||||
#if defined(PSA_WANT_ALG_ECDH) && defined(PSA_WANT_ALG_FFDH)
|
#if defined(PSA_WANT_ALG_ECDH) && defined(PSA_WANT_ALG_FFDH)
|
||||||
#if (MBEDTLS_PSA_MAX_FFDH_PUBKEY_LENGTH >= MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH)
|
#if (MBEDTLS_PSA_MAX_FFDH_PUBKEY_LENGTH >= MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH)
|
||||||
|
@ -988,7 +988,7 @@ static void ssl_handshake_params_init(mbedtls_ssl_handshake_params *handshake)
|
|||||||
mbedtls_dhm_init(&handshake->dhm_ctx);
|
mbedtls_dhm_init(&handshake->dhm_ctx);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||||
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED)
|
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED)
|
||||||
mbedtls_ecdh_init(&handshake->ecdh_ctx);
|
mbedtls_ecdh_init(&handshake->ecdh_ctx);
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||||
@ -4134,7 +4134,7 @@ void mbedtls_ssl_handshake_free(mbedtls_ssl_context *ssl)
|
|||||||
mbedtls_dhm_free(&handshake->dhm_ctx);
|
mbedtls_dhm_free(&handshake->dhm_ctx);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
#if !defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||||
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED)
|
defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED)
|
||||||
mbedtls_ecdh_free(&handshake->ecdh_ctx);
|
mbedtls_ecdh_free(&handshake->ecdh_ctx);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user