max_early_data_size: rename configuration function

Rename mbedtls_ssl_tls13_conf_max_early_data_size as
mbedtls_ssl_conf_max_early_data_size since in the future
this may not be specific to TLS 1.3.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
Yanray Wang 2023-11-07 11:47:36 +08:00
parent d5ed36ff24
commit 0751761b49
4 changed files with 5 additions and 6 deletions

View file

@ -4080,7 +4080,7 @@
* \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE * \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE
* *
* The default maximum amount of 0-RTT data. See the documentation of * The default maximum amount of 0-RTT data. See the documentation of
* \c mbedtls_ssl_tls13_conf_max_early_data_size() for more information. * \c mbedtls_ssl_conf_max_early_data_size() for more information.
* *
* It must be positive and smaller than UINT32_MAX. * It must be positive and smaller than UINT32_MAX.
* *

View file

@ -2027,7 +2027,7 @@ void mbedtls_ssl_conf_early_data(mbedtls_ssl_config *conf,
* \warning This interface is experimental and may change without notice. * \warning This interface is experimental and may change without notice.
* *
*/ */
void mbedtls_ssl_tls13_conf_max_early_data_size( void mbedtls_ssl_conf_max_early_data_size(
mbedtls_ssl_config *conf, uint32_t max_early_data_size); mbedtls_ssl_config *conf, uint32_t max_early_data_size);
#endif /* MBEDTLS_SSL_SRV_C */ #endif /* MBEDTLS_SSL_SRV_C */

View file

@ -1777,7 +1777,7 @@ void mbedtls_ssl_conf_early_data(mbedtls_ssl_config *conf,
} }
#if defined(MBEDTLS_SSL_SRV_C) #if defined(MBEDTLS_SSL_SRV_C)
void mbedtls_ssl_tls13_conf_max_early_data_size( void mbedtls_ssl_conf_max_early_data_size(
mbedtls_ssl_config *conf, uint32_t max_early_data_size) mbedtls_ssl_config *conf, uint32_t max_early_data_size)
{ {
conf->max_early_data_size = max_early_data_size; conf->max_early_data_size = max_early_data_size;
@ -5249,8 +5249,7 @@ int mbedtls_ssl_config_defaults(mbedtls_ssl_config *conf,
#if defined(MBEDTLS_SSL_EARLY_DATA) #if defined(MBEDTLS_SSL_EARLY_DATA)
mbedtls_ssl_conf_early_data(conf, MBEDTLS_SSL_EARLY_DATA_DISABLED); mbedtls_ssl_conf_early_data(conf, MBEDTLS_SSL_EARLY_DATA_DISABLED);
#if defined(MBEDTLS_SSL_SRV_C) #if defined(MBEDTLS_SSL_SRV_C)
mbedtls_ssl_tls13_conf_max_early_data_size( mbedtls_ssl_conf_max_early_data_size(conf, MBEDTLS_SSL_MAX_EARLY_DATA_SIZE);
conf, MBEDTLS_SSL_MAX_EARLY_DATA_SIZE);
#endif #endif
#endif /* MBEDTLS_SSL_EARLY_DATA */ #endif /* MBEDTLS_SSL_EARLY_DATA */

View file

@ -2778,7 +2778,7 @@ usage:
#if defined(MBEDTLS_SSL_EARLY_DATA) #if defined(MBEDTLS_SSL_EARLY_DATA)
mbedtls_ssl_conf_early_data(&conf, tls13_early_data_enabled); mbedtls_ssl_conf_early_data(&conf, tls13_early_data_enabled);
if (tls13_early_data_enabled == MBEDTLS_SSL_EARLY_DATA_ENABLED) { if (tls13_early_data_enabled == MBEDTLS_SSL_EARLY_DATA_ENABLED) {
mbedtls_ssl_tls13_conf_max_early_data_size( mbedtls_ssl_conf_max_early_data_size(
&conf, opt.max_early_data_size); &conf, opt.max_early_data_size);
} }
#endif /* MBEDTLS_SSL_EARLY_DATA */ #endif /* MBEDTLS_SSL_EARLY_DATA */