mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-18 21:22:58 +00:00
Make ssl_set_ecdh_curves() a compile-time option
This commit is contained in:
@@ -813,6 +813,22 @@
|
||||
*/
|
||||
#define POLARSSL_SSL_TRUNCATED_HMAC
|
||||
|
||||
/**
|
||||
* \def POLARSSL_SSL_SET_ECDH_CURVES
|
||||
*
|
||||
* Enable ssl_set_ecdh_curves().
|
||||
*
|
||||
* This is disabled by default since it breaks binary compatibility with the
|
||||
* 1.3.x line. If you choose to enable it, you will need to rebuild your
|
||||
* application against the new header files, relinking will not be enough.
|
||||
* It will be enabled by default, or no longer an option, in the 1.4 branch.
|
||||
*
|
||||
* TODO: actually disable it when done working on this branch ,)
|
||||
*
|
||||
* Uncomment to make ssl_set_ecdh_curves() available.
|
||||
*/
|
||||
#define POLARSSL_SSL_SET_ECDH_CURVES
|
||||
|
||||
/**
|
||||
* \def POLARSSL_THREADING_ALT
|
||||
*
|
||||
|
||||
@@ -727,7 +727,8 @@ struct _ssl_context
|
||||
int disable_renegotiation; /*!< enable/disable renegotiation */
|
||||
int allow_legacy_renegotiation; /*!< allow legacy renegotiation */
|
||||
const int *ciphersuite_list[4]; /*!< allowed ciphersuites / version */
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED)
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
||||
defined(POLARSSL_SSL_SET_ECDH_CURVES)
|
||||
const ecp_group_id *ecdh_curve_list;/*!< allowed curves for ECDH */
|
||||
#endif
|
||||
#if defined(POLARSSL_SSL_TRUNCATED_HMAC)
|
||||
@@ -1158,9 +1159,11 @@ int ssl_set_dh_param( ssl_context *ssl, const char *dhm_P, const char *dhm_G );
|
||||
int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx );
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED)
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
||||
defined(POLARSSL_SSL_SET_ECDH_CURVES)
|
||||
/**
|
||||
* \brief Set the allowed ECDH curves.
|
||||
* (Default: all defined curves.)
|
||||
*
|
||||
* The sequence of the curves in the list also determines the
|
||||
* handshake curve preference.
|
||||
@@ -1168,7 +1171,8 @@ int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx );
|
||||
* \param ssl SSL context
|
||||
* \param ecdh_curve_list Zero terminated list of the allowed ECDH curves
|
||||
*/
|
||||
void ssl_set_ecdh_curves( ssl_context *ssl, const ecp_group_id *ecdh_curve_list );
|
||||
void ssl_set_ecdh_curves( ssl_context *ssl,
|
||||
const ecp_group_id *ecdh_curve_list );
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION)
|
||||
|
||||
Reference in New Issue
Block a user