diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-29 14:30:40 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-29 14:30:40 +0100 |
commit | d855a4785d6378c0cf5ba159394a96342d30d60c (patch) | |
tree | 3305e8ff9f5282468353fd881c4d7958f9f8dd32 /net/server.lua | |
parent | 81fedc9a08fafb1f2cbbe6568a6e904ebbea25b8 (diff) | |
download | prosody-d855a4785d6378c0cf5ba159394a96342d30d60c.tar.gz prosody-d855a4785d6378c0cf5ba159394a96342d30d60c.zip |
net.server: A connection is not secure if we delay the TLS handshake
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 5 |
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
|