mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 23:15:43 +01:00
Remove SSL version configuration API if versions are hardcoded
This commit is contained in:
parent
cb8774b6e8
commit
33b9b25a48
@ -3009,6 +3009,8 @@ int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **prot
|
||||
const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl );
|
||||
#endif /* MBEDTLS_SSL_ALPN */
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER) || \
|
||||
!defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER)
|
||||
/**
|
||||
* \brief Set the maximum supported version sent from the client side
|
||||
* and/or accepted at the server side
|
||||
@ -3031,7 +3033,11 @@ const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl );
|
||||
* MBEDTLS_SSL_MINOR_VERSION_3 supported)
|
||||
*/
|
||||
void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor );
|
||||
#endif /* MBEDTLS_SSL_CONF_MAX_MINOR_VER ||
|
||||
MBEDTLS_SSL_CONF_MAX_MAJOR_VER */
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER) || \
|
||||
!defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER)
|
||||
/**
|
||||
* \brief Set the minimum accepted SSL/TLS protocol version
|
||||
* (Default: TLS 1.0)
|
||||
@ -3056,6 +3062,8 @@ void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int mino
|
||||
* MBEDTLS_SSL_MINOR_VERSION_3 supported)
|
||||
*/
|
||||
void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf, int major, int minor );
|
||||
#endif /* MBEDTLS_SSL_CONF_MIN_MINOR_VER ||
|
||||
MBEDTLS_SSL_CONF_MIN_MAJOR_VER */
|
||||
|
||||
#if defined(MBEDTLS_SSL_FALLBACK_SCSV) && defined(MBEDTLS_SSL_CLI_C)
|
||||
/**
|
||||
|
@ -8734,45 +8734,27 @@ const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl )
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_ALPN */
|
||||
|
||||
void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor )
|
||||
#if !defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER) || \
|
||||
!defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER)
|
||||
void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf,
|
||||
int major, int minor )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER) && \
|
||||
defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER)
|
||||
((void) conf);
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MAX_MAJOR_VER)
|
||||
conf->max_major_ver = major;
|
||||
#else
|
||||
((void) major);
|
||||
#endif /* MBEDTLS_SSL_CONF_MAX_MAJOR_VER */
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MAX_MINOR_VER)
|
||||
conf->max_minor_ver = minor;
|
||||
#else
|
||||
((void) minor);
|
||||
#endif /* !MBEDTLS_SSL_CONF_MAX_MINOR_VER */
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_CONF_MAX_MINOR_VER ||
|
||||
MBEDTLS_SSL_CONF_MAX_MAJOR_VER */
|
||||
|
||||
void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf, int major, int minor )
|
||||
#if !defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER) || \
|
||||
!defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER)
|
||||
void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf,
|
||||
int major, int minor )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER) && \
|
||||
defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER)
|
||||
((void) conf);
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MIN_MAJOR_VER)
|
||||
conf->min_major_ver = major;
|
||||
#else
|
||||
((void) major);
|
||||
#endif /* MBEDTLS_SSL_CONF_MIN_MAJOR_VER */
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_MIN_MINOR_VER)
|
||||
conf->min_minor_ver = minor;
|
||||
#else
|
||||
((void) minor);
|
||||
#endif /* !MBEDTLS_SSL_CONF_MIN_MINOR_VER */
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_CONF_MIN_MINOR_VER ||
|
||||
MBEDTLS_SSL_CONF_MIN_MAJOR_VER */
|
||||
|
||||
#if defined(MBEDTLS_SSL_FALLBACK_SCSV) && defined(MBEDTLS_SSL_CLI_C)
|
||||
void mbedtls_ssl_conf_fallback( mbedtls_ssl_config *conf, char fallback )
|
||||
|
Loading…
Reference in New Issue
Block a user