Changeset

4907:32b638a8da5b

net.server_event: Internal changes to get plain-SSL outgoing connections working (as for HTTPS)
author Matthew Wild <mwild1@gmail.com>
date Thu, 24 May 2012 03:33:14 +0100
parents 4906:89df1f03546a
children 4908:8c5b5ebaacb0
files net/server_event.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Thu May 24 03:08:42 2012 +0100
+++ b/net/server_event.lua	Thu May 24 03:33:14 2012 +0100
@@ -143,7 +143,7 @@
 					debug( "new connection failed. id:", self.id, "error:", self.fatalerror )
 				else
 					if plainssl and ssl then  -- start ssl session
-						self:starttls(nil, true)
+						self:starttls(self._sslctx, true)
 					else  -- normal connection
 						self:_start_session(true)
 					end
@@ -473,7 +473,7 @@
 	local coroutine_wrap = coroutine.wrap
 	local socket_gettime = socket.gettime
 	local coroutine_yield = coroutine.yield
-	function handleclient( client, ip, port, server, pattern, listener, _, sslctx )  -- creates an client interface
+	function handleclient( client, ip, port, server, pattern, listener, sslctx )  -- creates an client interface
 		--vdebug("creating client interfacce...")
 		local interface = {
 			type = "client";
@@ -692,7 +692,7 @@
 				end
 				local client_ip, client_port = client:getpeername( )
 				interface._connections = interface._connections + 1  -- increase connection count
-				local clientinterface = handleclient( client, client_ip, client_port, interface, pattern, listener, nil, sslctx )
+				local clientinterface = handleclient( client, client_ip, client_port, interface, pattern, listener, sslctx )
 				--vdebug( "client id:", clientinterface, "startssl:", startssl )
 				if ssl and sslctx then
 					clientinterface:starttls(sslctx, true)