mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 22:35:15 +00:00
ssl_set_curves is no longer ECDHE only
This commit is contained in:
parent
cd49f76898
commit
7f38ed0bfa
|
@ -727,8 +727,7 @@ struct _ssl_context
|
||||||
int disable_renegotiation; /*!< enable/disable renegotiation */
|
int disable_renegotiation; /*!< enable/disable renegotiation */
|
||||||
int allow_legacy_renegotiation; /*!< allow legacy renegotiation */
|
int allow_legacy_renegotiation; /*!< allow legacy renegotiation */
|
||||||
const int *ciphersuite_list[4]; /*!< allowed ciphersuites / version */
|
const int *ciphersuite_list[4]; /*!< allowed ciphersuites / version */
|
||||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
#if defined(POLARSSL_SSL_SET_CURVES)
|
||||||
defined(POLARSSL_SSL_SET_CURVES)
|
|
||||||
const ecp_group_id *curve_list; /*!< allowed curves */
|
const ecp_group_id *curve_list; /*!< allowed curves */
|
||||||
#endif
|
#endif
|
||||||
#if defined(POLARSSL_SSL_TRUNCATED_HMAC)
|
#if defined(POLARSSL_SSL_TRUNCATED_HMAC)
|
||||||
|
@ -1159,8 +1158,7 @@ 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 );
|
int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
#if defined(POLARSSL_SSL_SET_CURVES)
|
||||||
defined(POLARSSL_SSL_SET_CURVES)
|
|
||||||
/**
|
/**
|
||||||
* \brief Set the allowed curves in order of preference.
|
* \brief Set the allowed curves in order of preference.
|
||||||
* (Default: all defined curves.)
|
* (Default: all defined curves.)
|
||||||
|
|
|
@ -3384,8 +3384,7 @@ int ssl_init( ssl_context *ssl )
|
||||||
ssl->ticket_lifetime = SSL_DEFAULT_TICKET_LIFETIME;
|
ssl->ticket_lifetime = SSL_DEFAULT_TICKET_LIFETIME;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
#if defined(POLARSSL_SSL_SET_CURVES)
|
||||||
defined(POLARSSL_SSL_SET_CURVES)
|
|
||||||
ssl->curve_list = ecp_grp_id_list( );
|
ssl->curve_list = ecp_grp_id_list( );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3801,6 +3800,16 @@ int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx )
|
||||||
}
|
}
|
||||||
#endif /* POLARSSL_DHM_C */
|
#endif /* POLARSSL_DHM_C */
|
||||||
|
|
||||||
|
#if defined(POLARSSL_SSL_SET_CURVES)
|
||||||
|
/*
|
||||||
|
* Set the allowed elliptic curves
|
||||||
|
*/
|
||||||
|
void ssl_set_curves( ssl_context *ssl, const ecp_group_id *curve_list )
|
||||||
|
{
|
||||||
|
ssl->curve_list = curve_list;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION)
|
#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION)
|
||||||
int ssl_set_hostname( ssl_context *ssl, const char *hostname )
|
int ssl_set_hostname( ssl_context *ssl, const char *hostname )
|
||||||
{
|
{
|
||||||
|
@ -4616,13 +4625,3 @@ md_type_t ssl_md_alg_from_hash( unsigned char hash )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED) && \
|
|
||||||
defined(POLARSSL_SSL_SET_CURVES)
|
|
||||||
/*
|
|
||||||
* Set the allowed ECDH curves.
|
|
||||||
*/
|
|
||||||
void ssl_set_curves( ssl_context *ssl, const ecp_group_id *curve_list )
|
|
||||||
{
|
|
||||||
ssl->curve_list = curve_list;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue