aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tls/rec_wri.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tls/rec_wri.cpp b/src/tls/rec_wri.cpp
index 0e8a6228c..ade2bd2d6 100644
--- a/src/tls/rec_wri.cpp
+++ b/src/tls/rec_wri.cpp
@@ -223,7 +223,8 @@ void Record_Writer::send_record(byte type, const byte input[], size_t length)
mac->update(input, length);
const size_t buf_size = round_up(iv_size + length +
- mac->output_length() + 1,
+ mac->output_length() +
+ (block_size ? 1 : 0),
block_size);
if(buf_size >= MAX_CIPHERTEXT_SIZE)