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.
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index ea46d85..b05d288 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -2905,6 +2905,9 @@
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) */