aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_record.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/tls_record.h')
-rw-r--r--src/tls/tls_record.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tls/tls_record.h b/src/tls/tls_record.h
index 9b1f7e0f7..0b67f9a63 100644
--- a/src/tls/tls_record.h
+++ b/src/tls/tls_record.h
@@ -50,13 +50,15 @@ class BOTAN_DLL Record_Writer
void set_maximum_fragment_size(size_t max_fragment);
- Record_Writer(std::function<void (const byte[], size_t)> output_fn);
+ Record_Writer(std::function<void (const byte[], size_t)> output_fn,
+ RandomNumberGenerator& rng);
+
+ Record_Writer(const Record_Writer&) = delete;
+
+ Record_Writer& operator=(const Record_Writer&) = delete;
~Record_Writer() { delete m_mac; }
private:
- Record_Writer(const Record_Writer&) {}
- Record_Writer& operator=(const Record_Writer&) { return (*this); }
-
void send_record(byte type, const byte input[], size_t length);
std::function<void (const byte[], size_t)> m_output_fn;
@@ -65,6 +67,7 @@ class BOTAN_DLL Record_Writer
Pipe m_cipher;
MessageAuthenticationCode* m_mac;
+ RandomNumberGenerator& m_rng;
size_t m_block_size, m_mac_size, m_iv_size, m_max_fragment;
@@ -109,11 +112,11 @@ class BOTAN_DLL Record_Reader
Record_Reader();
+ Record_Reader(const Record_Reader&) = delete;
+ Record_Reader& operator=(const Record_Reader&) = delete;
+
~Record_Reader() { delete m_mac; }
private:
- Record_Reader(const Record_Reader&) {}
- Record_Reader& operator=(const Record_Reader&) { return (*this); }
-
size_t fill_buffer_to(const byte*& input,
size_t& input_size,
size_t& input_consumed,