From e4f94b6285c8db53ba725f82a409f6782645e223 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 25 Mar 2010 18:56:38 +0000 Subject: Also remove compression bits from record writer --- src/ssl/rec_wri.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/ssl/rec_wri.cpp') diff --git a/src/ssl/rec_wri.cpp b/src/ssl/rec_wri.cpp index 258b4ec17..0e30da759 100644 --- a/src/ssl/rec_wri.cpp +++ b/src/ssl/rec_wri.cpp @@ -1,6 +1,6 @@ /** -* TLS Record Writing -* (C) 2004-2006 Jack Lloyd +* TLS Record Writing +* (C) 2004-2010 Jack Lloyd * * Released under the terms of the Botan license */ @@ -26,11 +26,9 @@ Record_Writer::Record_Writer(Socket& sock) : */ void Record_Writer::reset() { - compress.reset(); cipher.reset(); mac.reset(); buffer.clear(); - do_compress = false; major = minor = buf_type = 0; pad_amount = mac_size = buf_pos = 0; seq_no = 0; @@ -48,15 +46,6 @@ void Record_Writer::set_version(Version_Code version) minor = (version & 0xFF); } -/** -* Set the compression algorithm -*/ -void Record_Writer::set_compressor(Filter* compressor) - { - throw TLS_Exception(INTERNAL_ERROR, "Compression not implemented (FIXME)"); - compress.append(compressor); - } - /** * Set the keys for writing */ @@ -203,6 +192,8 @@ void Record_Writer::send_record(byte type, const byte buf[], u32bit length) mac.write(buf, length); mac.end_msg(); + // TODO: This could all use a single buffer + SecureVector buf_mac = mac.read_all(Pipe::LAST_MESSAGE); cipher.start_msg(); @@ -240,7 +231,6 @@ void Record_Writer::send_record(byte type, byte major, byte minor, for(u32bit j = 0; j != 2; j++) header[j+3] = get_byte(j, length); - // FIXME: tradoff of TCP/syscall overhead vs copy overhead socket.write(header, 5); socket.write(out, length); } -- cgit v1.2.3