diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2017-11-05 17:46:48 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-11-05 17:46:48 +0100 |
commit | cf72c7579201086cee303eadcb60bd28eff78dd9 (patch) | |
tree | 35c096098b2527a814c95cc674bb54747e3054a0 /test/handshake_helper.c | |
parent | aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with binutils-2.29. (diff) | |
download | openssl-cf72c7579201086cee303eadcb60bd28eff78dd9.tar.xz openssl-cf72c7579201086cee303eadcb60bd28eff78dd9.zip |
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.c | 11 |
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 |