From 7a24d4e46faeb5e80fa860cf166dc1ce99716b1c Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 21 Nov 2018 10:30:24 -0800 Subject: [PATCH] Adds new `WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST` macro around non-standard feature. This allows for adjustment of the maximum fragment size post handshake. --- src/ssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index 1b047ccef..ef904659b 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1954,6 +1954,7 @@ int wolfSSL_UseMaxFragment(WOLFSSL* ssl, byte mfl) if (ssl == NULL) return BAD_FUNC_ARG; +#ifdef WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST /* The following is a non-standard way to reconfigure the max packet size post-handshake for wolfSSL_write/woflSSL_read */ if (ssl->options.handShakeState == HANDSHAKE_DONE) { @@ -1968,6 +1969,7 @@ int wolfSSL_UseMaxFragment(WOLFSSL* ssl, byte mfl) } return WOLFSSL_SUCCESS; } +#endif /* WOLFSSL_MAX_FRAGMENT_ADJUST */ /* This call sets the max fragment TLS extension, which gets sent to server. The server_hello response is what sets the `ssl->max_fragment` in