mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-23 15:01:00 +03:00
Remove per-version ciphersuite configuration API
This commit removes the API ``` mbedtls_ssl_conf_ciphersuites_for_version() ``` which allows to configure lists of acceptable ciphersuites for each supported version of SSL/TLS: SSL3, TLS 1.{0,1,2}. With Mbed TLS 3.0, support for SSL3, TLS 1.0 and TLS 1.1 is dropped. Moreover, upcoming TLS 1.3 support has a different notion of cipher suite and will require a different API. This means that it's only for TLS 1.2 that we require a ciphersuite configuration API, and ``` mbedtls_ssl_conf_ciphersuites() ``` can be used for that. The version-specific ciphersuite configuration API `mbedtls_ssl_conf_ciphersuites_for_version()`, in turn, is no longer needed. Signed-off-by: Hanno Becker <hanno.becker@arm.com> Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
committed by
Manuel Pégourié-Gonnard
parent
0c1a42a147
commit
d60b6c62d5
@ -976,10 +976,8 @@ struct mbedtls_ssl_config
|
||||
* Pointers
|
||||
*/
|
||||
|
||||
/** Allowed ciphersuites per version. To access list's elements, please use
|
||||
* \c mbedtls_ssl_get_protocol_version_ciphersuites
|
||||
*/
|
||||
const int *ciphersuite_list[3];
|
||||
/** Allowed ciphersuites for (D)TLS 1.2 (0-terminated) */
|
||||
const int *ciphersuite_list;
|
||||
|
||||
/** Callback for printing debug output */
|
||||
void (*f_dbg)(void *, int, const char *, int, const char *);
|
||||
@ -2508,17 +2506,6 @@ const mbedtls_ssl_session *mbedtls_ssl_get_session_pointer( const mbedtls_ssl_co
|
||||
void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf,
|
||||
const int *ciphersuites );
|
||||
|
||||
/**
|
||||
* \brief Get ciphersuite for given protocol's minor version.
|
||||
*
|
||||
* \param conf The SSL configuration.
|
||||
* \param prot_version Protocol version. One of MBEDTLS_SSL_MINOR_VERSION_x macros.
|
||||
* \return Ciphersuites pointer if successful.
|
||||
* \return \c NULL if no ciphersuites where found.
|
||||
*/
|
||||
const int *mbedtls_ssl_get_protocol_version_ciphersuites(
|
||||
const mbedtls_ssl_config *conf, int prot_version );
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
#define MBEDTLS_SSL_UNEXPECTED_CID_IGNORE 0
|
||||
#define MBEDTLS_SSL_UNEXPECTED_CID_FAIL 1
|
||||
@ -2558,27 +2545,6 @@ int mbedtls_ssl_conf_cid( mbedtls_ssl_config *conf, size_t len,
|
||||
int ignore_other_cids );
|
||||
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
|
||||
|
||||
/**
|
||||
* \brief Set the list of allowed ciphersuites and the
|
||||
* preference order for a specific version of the protocol.
|
||||
* (Only useful on the server side)
|
||||
*
|
||||
* The ciphersuites array is not copied, and must remain
|
||||
* valid for the lifetime of the ssl_config.
|
||||
*
|
||||
* \param conf SSL configuration
|
||||
* \param ciphersuites 0-terminated list of allowed ciphersuites
|
||||
* \param major Major version number (only MBEDTLS_SSL_MAJOR_VERSION_3
|
||||
* supported)
|
||||
* \param minor Minor version number (only MBEDTLS_SSL_MINOR_VERSION_3
|
||||
* supported)
|
||||
*
|
||||
* \note With DTLS, use MBEDTLS_SSL_MINOR_VERSION_3 for DTLS 1.2
|
||||
*/
|
||||
void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf,
|
||||
const int *ciphersuites,
|
||||
int major, int minor );
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
/**
|
||||
* \brief Set the X.509 security profile used for verification
|
||||
|
Reference in New Issue
Block a user