mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add mbedtls_ssl_get_max_frag_len()
This is not very useful for TLS as mbedtls_ssl_write() will automatically fragment and return the length used, and the application should check for that anyway, but this is useful for DTLS where mbedtls_ssl_write() returns an error, and the application needs to be able to query the maximum length instead of just guessing.
This commit is contained in:
@ -1946,6 +1946,11 @@ reset:
|
||||
else
|
||||
mbedtls_printf( " [ Record expansion is unknown (compression) ]\n" );
|
||||
|
||||
#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
|
||||
mbedtls_printf( " [ Maximum fragment length is %u ]\n",
|
||||
(unsigned int) mbedtls_ssl_get_max_frag_len( &ssl ) );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_ALPN)
|
||||
if( opt.alpn_string != NULL )
|
||||
{
|
||||
|
Reference in New Issue
Block a user