diff options
author | lloyd <[email protected]> | 2011-12-30 18:51:01 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-12-30 18:51:01 +0000 |
commit | 766f5eeb5c99936e7ddcf3e4c82095f087b6e928 (patch) | |
tree | 17b95459926b1064b538889a1b7c732ff2298470 /src/tls/tls_server.cpp | |
parent | 07b11b4b3d9c7ef289050252c29bc8174d102148 (diff) |
Add support for the maximum fragment length extension. No hooks for it
on the client side at the moment. Tested with gnutls-cli --recordsize.
Save the fragment size and the secure renegotiation flags in the
session state.
Diffstat (limited to 'src/tls/tls_server.cpp')
-rw-r--r-- | src/tls/tls_server.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp index 3f65fa735..3077476e3 100644 --- a/src/tls/tls_server.cpp +++ b/src/tls/tls_server.cpp @@ -190,8 +190,12 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, session_info.session_id(), session_info.ciphersuite(), session_info.compression_method(), + session_info.fragment_size(), Version_Code(session_info.version())); + if(session_info.fragment_size()) + writer.set_maximum_fragment_size(session_info.fragment_size()); + state->suite = CipherSuite(state->server_hello->ciphersuite()); state->keys = SessionKeys(state->suite, state->version, @@ -224,6 +228,9 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, rng.random_vec(32), state->version); + if(state->client_hello->fragment_size()) + writer.set_maximum_fragment_size(state->client_hello->fragment_size()); + state->suite = CipherSuite(state->server_hello->ciphersuite()); if(state->suite.sig_type() != TLS_ALGO_SIGNER_ANON) @@ -376,6 +383,8 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, state->server_hello->ciphersuite(), state->server_hello->compression_method(), SERVER, + secure_renegotiation.supported(), + state->server_hello->fragment_size(), peer_certs, client_requested_hostname, "" |