aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_handshake_state.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-08-03 14:40:08 +0000
committerlloyd <[email protected]>2012-08-03 14:40:08 +0000
commitdb2a5f10716f69a58f8c554c8e65d21e198ffbc5 (patch)
tree1c7a302a3f34fb46f201bf6b658884421609a559 /src/tls/tls_handshake_state.h
parentba0e7cc86e7fa6606a04c3ae34be354d8ed801b3 (diff)
Combine Handshake_Writer and Handshake_Reader into Handshake_IO.
This is mostly just a minor code savings for TLS, but it actually seems important for DTLS because getting a handshake message can be a trigger for retransmitting previously sent handshake messages in some circumstances. Having the reading and writing all in one layer makes it a bit easier to accomplish that.
Diffstat (limited to 'src/tls/tls_handshake_state.h')
-rw-r--r--src/tls/tls_handshake_state.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/tls/tls_handshake_state.h b/src/tls/tls_handshake_state.h
index 0f48c976b..49470fecb 100644
--- a/src/tls/tls_handshake_state.h
+++ b/src/tls/tls_handshake_state.h
@@ -9,8 +9,7 @@
#define BOTAN_TLS_HANDSHAKE_STATE_H__
#include <botan/internal/tls_handshake_hash.h>
-#include <botan/internal/tls_handshake_reader.h>
-#include <botan/internal/tls_handshake_writer.h>
+#include <botan/internal/tls_handshake_io.h>
#include <botan/internal/tls_session_key.h>
#include <botan/pk_keys.h>
#include <botan/pubkey.h>
@@ -32,8 +31,7 @@ class Policy;
class Handshake_State
{
public:
- Handshake_State(Handshake_Reader* reader,
- Handshake_Writer* writer);
+ Handshake_State(Handshake_IO* io);
~Handshake_State();
@@ -108,12 +106,9 @@ class Handshake_State
*/
std::function<std::string (std::vector<std::string>)> client_npn_cb;
- Handshake_Reader& handshake_reader() { return *m_handshake_reader; }
-
- Handshake_Writer& handshake_writer() { return *m_handshake_writer; }
+ Handshake_IO& handshake_io() { return *m_handshake_io; }
private:
- Handshake_Reader* m_handshake_reader = nullptr;
- Handshake_Writer* m_handshake_writer = nullptr;
+ Handshake_IO* m_handshake_io = nullptr;
u32bit m_hand_expecting_mask = 0;
u32bit m_hand_received_mask = 0;