aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_channel.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-27 17:57:27 +0000
committerlloyd <[email protected]>2011-12-27 17:57:27 +0000
commit38ea0ba913135a908419fd64611cba84dc0299ca (patch)
treea2ee6dcc6c176d6dd52dcfb59a464b84452aa76a /src/tls/tls_channel.cpp
parentfa5529e90a5e6cc48cca7669018d574802e13f08 (diff)
First rev of working session resumption (server side only). Only works
with TLS at the moment, SessionKeys is a mess.
Diffstat (limited to 'src/tls/tls_channel.cpp')
-rw-r--r--src/tls/tls_channel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp
index 1121de1a1..8aa52a307 100644
--- a/src/tls/tls_channel.cpp
+++ b/src/tls/tls_channel.cpp
@@ -48,7 +48,13 @@ size_t TLS_Channel::received_data(const byte buf[], size_t buf_size)
{
if(active)
{
- proc_fn(&record[0], record.size(), NO_ALERT_TYPE);
+ /*
+ * OpenSSL among others sends empty records in versions
+ * before TLS v1.1 in order to randomize the IV of the
+ * following record. Avoid spurious callbacks.
+ */
+ if(record.size() > 0)
+ proc_fn(&record[0], record.size(), NO_ALERT_TYPE);
}
else
{