diff options
author | lloyd <[email protected]> | 2014-10-06 01:29:13 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-10-06 01:29:13 +0000 |
commit | 2d6a5e530c8db496aad61b5a9ab3107dd1ed646b (patch) | |
tree | 29d92fc311f65ca88b812dadf3462c3ad1fdb0f9 /src/lib/tls/tls_channel.h | |
parent | 97010abaf527fdbe6e308cb3570f9167c1dc9ec1 (diff) |
Add support for DTLS handshake timeouts and retransmissions.
Diffstat (limited to 'src/lib/tls/tls_channel.h')
-rw-r--r-- | src/lib/tls/tls_channel.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/tls/tls_channel.h b/src/lib/tls/tls_channel.h index 6c159689a..3cdfe3d5e 100644 --- a/src/lib/tls/tls_channel.h +++ b/src/lib/tls/tls_channel.h @@ -1,6 +1,6 @@ /* * TLS Channel -* (C) 2011,2012 Jack Lloyd +* (C) 2011,2012,2014 Jack Lloyd * * Released under the terms of the Botan license */ @@ -46,17 +46,28 @@ class BOTAN_DLL Channel size_t received_data(const std::vector<byte>& buf); /** + * Perform a handshake timeout check. This does nothing unless + * this is a DTLS channel with a pending handshake state, in + * which case we check for timeout and potentially retransmit + * handshake packets. + */ + bool timeout_check(); + + /** * Inject plaintext intended for counterparty + * Throws an exception if is_active() is false */ void send(const byte buf[], size_t buf_size); /** * Inject plaintext intended for counterparty + * Throws an exception if is_active() is false */ void send(const std::string& val); /** * Inject plaintext intended for counterparty + * Throws an exception if is_active() is false */ template<typename Alloc> void send(const std::vector<unsigned char, Alloc>& val) @@ -209,7 +220,7 @@ class BOTAN_DLL Channel const byte input[], size_t length); void write_record(Connection_Cipher_State* cipher_state, - byte type, const byte input[], size_t length); + u16bit epoch, byte type, const byte input[], size_t length); Connection_Sequence_Numbers& sequence_numbers() const; |