aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-09-11 14:45:25 +0000
committerlloyd <[email protected]>2012-09-11 14:45:25 +0000
commit841cc39716104b3438757188d1328a68c1464f81 (patch)
tree41feea43871703f532d3daccf370cc148ba89d4c /src/tls
parent1a90d151f7b0eaeada4ecae58eea90e1a27462a2 (diff)
The write buffer is cleared and rewritten by write_record, so we don't
need to pre-size it. Reorganize Channel members a bit
Diffstat (limited to 'src/tls')
-rw-r--r--src/tls/tls_channel.cpp1
-rw-r--r--src/tls/tls_channel.h10
2 files changed, 5 insertions, 6 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp
index 6fa75766a..7aac56ecc 100644
--- a/src/tls/tls_channel.cpp
+++ b/src/tls/tls_channel.cpp
@@ -30,7 +30,6 @@ Channel::Channel(std::function<void (const byte[], size_t)> output_fn,
m_output_fn(output_fn),
m_rng(rng),
m_session_manager(session_manager),
- m_writebuf(TLS_HEADER_SIZE + MAX_CIPHERTEXT_SIZE),
m_readbuf(TLS_HEADER_SIZE + MAX_CIPHERTEXT_SIZE)
{
}
diff --git a/src/tls/tls_channel.h b/src/tls/tls_channel.h
index 367c3560d..a461d16f3 100644
--- a/src/tls/tls_channel.h
+++ b/src/tls/tls_channel.h
@@ -177,21 +177,21 @@ class BOTAN_DLL Channel
RandomNumberGenerator& m_rng;
Session_Manager& m_session_manager;
+ /* cipher/sequence state */
std::unique_ptr<class Connection_Sequence_Numbers> m_sequence_numbers;
-
- /* writing cipher state */
- std::vector<byte> m_writebuf;
std::unique_ptr<class Connection_Cipher_State> m_write_cipherstate;
+ std::unique_ptr<class Connection_Cipher_State> m_read_cipherstate;
- /* reading cipher state */
+ /* I/O buffers */
+ std::vector<byte> m_writebuf;
std::vector<byte> m_readbuf;
size_t m_readbuf_pos = 0;
- std::unique_ptr<class Connection_Cipher_State> m_read_cipherstate;
/* connection parameters */
std::unique_ptr<Handshake_State> m_active_state;
std::unique_ptr<Handshake_State> m_pending_state;
+ /* misc, should be removed? */
size_t m_max_fragment = MAX_PLAINTEXT_SIZE;
bool m_secure_renegotiation = false;