diff options
author | lloyd <[email protected]> | 2014-05-01 02:03:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-05-01 02:03:22 +0000 |
commit | 2c91264a5e65d1db035412a0bc82526bd0c75e88 (patch) | |
tree | f35d709d8cc349caf2cc53fdd7c9f4f19d6aee78 /src/lib/tls | |
parent | 4783a605bf19106ddb9eb56e835218db24bb7cae (diff) |
Avoid initializer lists here, VC2013 doesn't like it. Github #18
Diffstat (limited to 'src/lib/tls')
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 4 | ||||
-rw-r--r-- | src/lib/tls/tls_channel.h | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 8ed876b3f..30f30d623 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -33,6 +33,10 @@ Channel::Channel(std::function<void (const byte[], size_t)> output_fn, m_rng(rng), m_session_manager(session_manager) { + /* epoch 0 is plaintext, thus null cipher state */ + m_write_cipher_states[0] = nullptr; + m_read_cipher_states[0] = nullptr; + m_writebuf.reserve(reserved_io_buffer_size); m_readbuf.reserve(reserved_io_buffer_size); } diff --git a/src/lib/tls/tls_channel.h b/src/lib/tls/tls_channel.h index 4e8fb47e5..6c159689a 100644 --- a/src/lib/tls/tls_channel.h +++ b/src/lib/tls/tls_channel.h @@ -240,11 +240,9 @@ class BOTAN_DLL Channel std::unique_ptr<Handshake_State> m_active_state; std::unique_ptr<Handshake_State> m_pending_state; - /* cipher states for each epoch - epoch 0 is plaintext, thus null cipher state */ - std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_write_cipher_states = - { { 0, nullptr } }; - std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_read_cipher_states = - { { 0, nullptr } }; + /* cipher states for each epoch */ + std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_write_cipher_states; + std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_read_cipher_states; /* I/O buffers */ secure_vector<byte> m_writebuf; |