Diff

net/server.lua @ 1214:27d4cfb8fb7a

net.server: A connection is not secure if we delay the TLS handshake
author Matthew Wild <mwild1@gmail.com>
date Fri, 29 May 2009 14:30:40 +0100
parent 1100:05d209ef9661
child 1297:9c8f86a3878d
line wrap: on
line diff
--- a/net/server.lua	Fri May 29 14:28:53 2009 +0100
+++ b/net/server.lua	Fri May 29 14:30:40 2009 +0100
@@ -540,6 +540,8 @@
             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 @@
 
                 handler.starttls = nil
                 needtls = nil
+                
+                -- Secure now
+                ssl = true
 
                 handler.readbuffer = handshake
                 handler.sendbuffer = handshake