diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tls/tls_channel.cpp | 6 | ||||
-rw-r--r-- | src/tls/tls_channel.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp index 46c6d36cd..e688f354d 100644 --- a/src/tls/tls_channel.cpp +++ b/src/tls/tls_channel.cpp @@ -182,10 +182,10 @@ void TLS_Channel::read_handshake(byte rec_type, } } -void TLS_Channel::queue_for_sending(const byte buf[], size_t buf_size) +void TLS_Channel::send(const byte buf[], size_t buf_size) { - if(!handshake_completed) - throw std::runtime_error("Application data cannot be queued before handshake"); + if(!is_active()) + throw std::runtime_error("Data cannot be sent on inactive TLS connection"); writer.send(APPLICATION_DATA, buf, buf_size); } diff --git a/src/tls/tls_channel.h b/src/tls/tls_channel.h index 0306d1a74..c86b48f09 100644 --- a/src/tls/tls_channel.h +++ b/src/tls/tls_channel.h @@ -32,7 +32,7 @@ class BOTAN_DLL TLS_Channel /** * Inject plaintext intended for counterparty */ - virtual void queue_for_sending(const byte buf[], size_t buf_size); + virtual void send(const byte buf[], size_t buf_size); /** * Send a close notification alert |