diff options
author | lloyd <[email protected]> | 2012-01-06 15:32:21 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-06 15:32:21 +0000 |
commit | ab5ff573a861b3371aa4c9dd2c2fee675a5165a6 (patch) | |
tree | 4958f26a74d7e2558efbd0dffbe661f87fa267dc /src/tls/tls_channel.cpp | |
parent | 098a3fe831d567f6a143679872de72a7b210d24a (diff) |
Remove the version getter in TLS_Channel - caller should use the
handshake callback info instead. Clean up the buffer consumption code
in the record reader.
Diffstat (limited to 'src/tls/tls_channel.cpp')
-rw-r--r-- | src/tls/tls_channel.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp index 7fda4bc86..6d554e425 100644 --- a/src/tls/tls_channel.cpp +++ b/src/tls/tls_channel.cpp @@ -32,13 +32,6 @@ TLS_Channel::~TLS_Channel() state = 0; } -Version_Code TLS_Channel::protocol_version() const - { - if(!handshake_completed) - throw std::logic_error("Version not known until handshake complete"); - return writer.get_version(); - } - size_t TLS_Channel::received_data(const byte buf[], size_t buf_size) { try @@ -56,6 +49,8 @@ size_t TLS_Channel::received_data(const byte buf[], size_t buf_size) buf += consumed; buf_size -= consumed; + BOTAN_ASSERT_IMPLICATAION(needed, buf_size == 0); + if(buf_size == 0 && needed != 0) return needed; // need more data to complete record |