diff options
Diffstat (limited to 'src/lib/tls/tls_blocking.h')
-rw-r--r-- | src/lib/tls/tls_blocking.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/tls/tls_blocking.h b/src/lib/tls/tls_blocking.h index 0f2986710..96928f425 100644 --- a/src/lib/tls/tls_blocking.h +++ b/src/lib/tls/tls_blocking.h @@ -30,8 +30,8 @@ class BOTAN_DLL Blocking_Client * These functions are expected to block until completing entirely, or * fail by throwing an exception. */ - typedef std::function<size_t (byte[], size_t)> read_fn; - typedef std::function<void (const byte[], size_t)> write_fn; + typedef std::function<size_t (uint8_t[], size_t)> read_fn; + typedef std::function<void (const uint8_t[], size_t)> write_fn; BOTAN_DEPRECATED("Use the regular TLS::Client interface") Blocking_Client(read_fn reader, @@ -56,11 +56,12 @@ class BOTAN_DLL Blocking_Client size_t pending() const { return m_plaintext.size(); } /** - * Blocking read, will return at least 1 byte or 0 on connection close + * Blocking read, will return at least 1 byte (eventually) or else 0 if the connection + * is closed. */ - size_t read(byte buf[], size_t buf_len); + size_t read(uint8_t buf[], size_t buf_len); - void write(const byte buf[], size_t buf_len) { m_channel.send(buf, buf_len); } + void write(const uint8_t buf[], size_t buf_len) { m_channel.send(buf, buf_len); } const TLS::Channel& underlying_channel() const { return m_channel; } TLS::Channel& underlying_channel() { return m_channel; } @@ -89,14 +90,14 @@ class BOTAN_DLL Blocking_Client bool handshake_cb(const Session&); - void data_cb(const byte data[], size_t data_len); + void data_cb(const uint8_t data[], size_t data_len); void alert_cb(const Alert& alert); read_fn m_read; std::unique_ptr<Compat_Callbacks> m_callbacks; TLS::Client m_channel; - secure_vector<byte> m_plaintext; + secure_vector<uint8_t> m_plaintext; }; } |