Software /
code /
prosody
Diff
net/connlisteners.lua @ 2551:5f15f21014c4
net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 31 Jan 2010 17:08:57 +0000 |
parent | 2547:b2cb0935f158 |
child | 2925:692b3c6c5bd2 |
line wrap: on
line diff
--- 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