aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_blocking.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/tls/tls_blocking.h
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
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.
Diffstat (limited to 'src/lib/tls/tls_blocking.h')
-rw-r--r--src/lib/tls/tls_blocking.h15
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;
};
}