# HG changeset patch # User Matthew Wild # Date 1264957737 0 # Node ID 5f15f21014c42ac926a914aff24c60e85e71af53 # Parent 445b1de5652ebfa0b81c89f56e6bb4e42611dd18 net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl' diff -r 445b1de5652e -r 5f15f21014c4 net/connlisteners.lua --- 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