diff options
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/tls_handshake_io.cpp | 22 | ||||
-rw-r--r-- | src/tls/tls_handshake_io.h | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/tls/tls_handshake_io.cpp b/src/tls/tls_handshake_io.cpp index b1f6a0eb5..85bd85c41 100644 --- a/src/tls/tls_handshake_io.cpp +++ b/src/tls/tls_handshake_io.cpp @@ -106,12 +106,12 @@ std::vector<byte> Stream_Handshake_IO::send(const Handshake_Message& msg) if(msg.type() == HANDSHAKE_CCS) { - m_writer(CHANGE_CIPHER_SPEC, msg_bits); + m_send_hs(CHANGE_CIPHER_SPEC, msg_bits); return std::vector<byte>(); // not included in handshake hashes } const std::vector<byte> buf = format(msg_bits, msg.type()); - m_writer(HANDSHAKE, buf); + m_send_hs(HANDSHAKE, buf); return buf; } @@ -323,7 +323,7 @@ Datagram_Handshake_IO::send(const Handshake_Message& msg) if(msg.type() == HANDSHAKE_CCS) { - m_writer(CHANGE_CIPHER_SPEC, msg_bits); + m_send_hs(CHANGE_CIPHER_SPEC, msg_bits); return std::vector<byte>(); // not included in handshake hashes } @@ -333,7 +333,7 @@ Datagram_Handshake_IO::send(const Handshake_Message& msg) m_mtu = 64; if(no_fragment.size() + DTLS_HEADER_SIZE <= m_mtu) - m_writer(HANDSHAKE, no_fragment); + m_send_hs(HANDSHAKE, no_fragment); else { const size_t parts = split_for_mtu(m_mtu, msg_bits.size()); @@ -348,13 +348,13 @@ Datagram_Handshake_IO::send(const Handshake_Message& msg) std::min<size_t>(msg_bits.size() - frag_offset, parts_size); - m_writer(HANDSHAKE, - format_fragment(&msg_bits[frag_offset], - frag_len, - frag_offset, - msg_bits.size(), - msg.type(), - m_out_message_seq)); + m_send_hs(HANDSHAKE, + format_fragment(&msg_bits[frag_offset], + frag_len, + frag_offset, + msg_bits.size(), + msg.type(), + m_out_message_seq)); frag_offset += frag_len; } diff --git a/src/tls/tls_handshake_io.h b/src/tls/tls_handshake_io.h index 9ff580cf8..b026d4160 100644 --- a/src/tls/tls_handshake_io.h +++ b/src/tls/tls_handshake_io.h @@ -67,7 +67,7 @@ class Stream_Handshake_IO : public Handshake_IO { public: Stream_Handshake_IO(handshake_write_fn writer) : - m_writer(writer) {} + m_send_hs(writer) {} Protocol_Version initial_record_version() const override; @@ -86,7 +86,7 @@ class Stream_Handshake_IO : public Handshake_IO get_next_record(bool expecting_ccs) override; private: std::deque<byte> m_queue; - handshake_write_fn m_writer; + handshake_write_fn m_send_hs; }; /** @@ -96,7 +96,7 @@ class Datagram_Handshake_IO : public Handshake_IO { public: Datagram_Handshake_IO(handshake_write_fn writer, u16bit mtu) : - m_flights(1), m_mtu(mtu), m_writer(writer) {} + m_flights(1), m_mtu(mtu), m_send_hs(writer) {} Protocol_Version initial_record_version() const override; @@ -158,7 +158,7 @@ class Datagram_Handshake_IO : public Handshake_IO u16bit m_mtu = 0; u16bit m_in_message_seq = 0; u16bit m_out_message_seq = 0; - handshake_write_fn m_writer; + handshake_write_fn m_send_hs; }; } |