aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-29 14:30:40 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-29 14:30:40 +0100
commitd855a4785d6378c0cf5ba159394a96342d30d60c (patch)
tree3305e8ff9f5282468353fd881c4d7958f9f8dd32 /net
parent81fedc9a08fafb1f2cbbe6568a6e904ebbea25b8 (diff)
downloadprosody-d855a4785d6378c0cf5ba159394a96342d30d60c.tar.gz
prosody-d855a4785d6378c0cf5ba159394a96342d30d60c.zip
net.server: A connection is not secure if we delay the TLS handshake
Diffstat (limited to 'net')
-rw-r--r--net/server.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/server.lua b/net/server.lua
index 9e42b8ff..d7872f51 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -540,6 +540,8 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
handler.sendbuffer = handshake
handshake( socket ) -- do handshake
else
+ -- We're not automatically doing SSL, so we're not secure (yet)
+ ssl = false
handler.starttls = function( now )
if not now then
--out_put "server.lua: we need to do tls, but delaying until later"
@@ -576,6 +578,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
handler.starttls = nil
needtls = nil
+
+ -- Secure now
+ ssl = true
handler.readbuffer = handshake
handler.sendbuffer = handshake