summaryrefslogtreecommitdiffstats
path: root/test/handshake_helper.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2017-11-05 17:46:48 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2017-11-05 17:46:48 +0100
commitcf72c7579201086cee303eadcb60bd28eff78dd9 (patch)
tree35c096098b2527a814c95cc674bb54747e3054a0 /test/handshake_helper.c
parentb82acc3c1a7f304c9df31841753a0fa76b5b3cda (diff)
Implement Maximum Fragment Length TLS extension.
Based on patch from Tomasz Moń: https://groups.google.com/forum/#!topic/mailing.openssl.dev/fQxXvCg1uQY Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/1008)
Diffstat (limited to 'test/handshake_helper.c')
-rw-r--r--test/handshake_helper.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/handshake_helper.c b/test/handshake_helper.c
index be96abe3c9..ad1b7090a6 100644
--- a/test/handshake_helper.c
+++ b/test/handshake_helper.c
@@ -490,6 +490,17 @@ static int configure_handshake_ctx(SSL_CTX *server_ctx, SSL_CTX *server2_ctx,
break;
}
+ switch (extra->client.max_fragment_len_mode) {
+ case TLSEXT_max_fragment_length_512:
+ case TLSEXT_max_fragment_length_1024:
+ case TLSEXT_max_fragment_length_2048:
+ case TLSEXT_max_fragment_length_4096:
+ case TLSEXT_max_fragment_length_DISABLED:
+ TEST_true(SSL_CTX_set_tlsext_max_fragment_length(
+ client_ctx, extra->client.max_fragment_len_mode));
+ break;
+ }
+
/*
* Link the two contexts for SNI purposes.
* Also do ClientHello callbacks here, as setting both ClientHello and SNI