diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-01-31 17:08:57 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-01-31 17:08:57 +0000 |
commit | 3d2a742ebdbbcb18f8424b21371ed93ed5f42127 (patch) | |
tree | 8fb3fc2e35dd82b2d0c79b28b96854c763a37a33 /net | |
parent | bfe6db96f1067bd4532ff9670a3aa799339bc109 (diff) | |
download | prosody-3d2a742ebdbbcb18f8424b21371ed93ed5f42127.tar.gz prosody-3d2a742ebdbbcb18f8424b21371ed93ed5f42127.zip |
net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'
Diffstat (limited to 'net')
-rw-r--r-- | net/connlisteners.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |