From f3cb3edb512bdcab498d825886c3366c341b3f78 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 11 Dec 2016 15:28:38 -0500 Subject: Convert to using standard uintN_t integer types Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them. --- src/lib/tls/tls_blocking.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/lib/tls/tls_blocking.h') 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 read_fn; - typedef std::function write_fn; + typedef std::function read_fn; + typedef std::function 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 m_callbacks; TLS::Client m_channel; - secure_vector m_plaintext; + secure_vector m_plaintext; }; } -- cgit v1.2.3