From 3d2a742ebdbbcb18f8424b21371ed93ed5f42127 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 31 Jan 2010 17:08:57 +0000 Subject: net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl' --- net/connlisteners.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/connlisteners.lua b/net/connlisteners.lua index e0076ddb..ee54f049 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -59,6 +59,10 @@ function start(name, udata) local ssl = (udata and udata.ssl) or nil; local autossl = udata and udata.type == "ssl"; + if autossl and not ssl then + return nil, "no ssl context"; + end + return server.addserver(interface, port, h, mode, autossl and ssl or nil); end -- cgit v1.2.3