Changeset

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
parents 1213:de66fa750daf
children 1215:d3534badd748
files net/server.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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