Sun, 31 Jan 2010 17:08:57 +0000
net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'
net/connlisteners.lua | file | annotate | diff | comparison | revisions |
--- a/net/connlisteners.lua Sun Jan 31 16:40:47 2010 +0000 +++ b/net/connlisteners.lua Sun Jan 31 17:08:57 2010 +0000 @@ -59,6 +59,10 @@ 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