mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Add basic first tests for MTU setting
For now, just check that it causes us to fragment. More tests are coming in follow-up commits to ensure we respect the exact value set, including when renegotiating.
This commit is contained in:
parent
637e234d9f
commit
b747c6cf9b
4 changed files with 103 additions and 6 deletions
|
|
@ -2905,6 +2905,9 @@ int mbedtls_ssl_flight_transmit( mbedtls_ssl_context *ssl )
|
|||
const size_t frag_len = rem_len > max_hs_fragment_len
|
||||
? max_hs_fragment_len : rem_len;
|
||||
|
||||
if( frag_off == 0 && frag_len != hs_len )
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2, ( "fragmenting handshake message" ) );
|
||||
|
||||
/* Messages are stored with handshake headers as if not fragmented,
|
||||
* copy beginning of headers then fill fragmentation fields.
|
||||
* Handshake headers: type(1) len(3) seq(2) f_off(3) f_len(3) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue