mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Make query API for state of MFL extension internal
This commit makes the API - mbedtls_ssl_get_output_max_frag_len() - mbedtls_ssl_get_input_max_frag_len() - mbedtls_ssl_get__max_frag_len() for querying the state of the Maximum Fragment Length extension internal. Rationale: The value those APIs provide to the user is in upper bounds for the size of incoming and outgoing records, which can be used to size application data buffers apporpriately before passing them to mbedtls_ssl_{read,write}(). However, there are other factors which influence such upper bounds, such as the MTU or other extensions (specifically, the record_size_limit extension which is still to be implemented) which should be taken into account. There should be more general APIs for querying the maximum size of incoming and outgoing records. For the maximum size of outgoing records, we already have such, namely mbedtls_ssl_get_max_out_record_payload(). For the maximum size of incoming records, a new API will be added in a subsequent commit. Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
@ -2083,13 +2083,6 @@ int main( int argc, char *argv[] )
|
||||
else
|
||||
mbedtls_printf( " [ Record expansion is unknown ]\n" );
|
||||
|
||||
#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
|
||||
mbedtls_printf( " [ Maximum input fragment length is %u ]\n",
|
||||
(unsigned int) mbedtls_ssl_get_input_max_frag_len( &ssl ) );
|
||||
mbedtls_printf( " [ Maximum output fragment length is %u ]\n",
|
||||
(unsigned int) mbedtls_ssl_get_output_max_frag_len( &ssl ) );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_ALPN)
|
||||
if( opt.alpn_string != NULL )
|
||||
{
|
||||
|
Reference in New Issue
Block a user