Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 3574:1e088ec07d33
mod_tls: Pass the hostname rather than host session to certmanager.create_context() (thanks darkrain)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 08 Nov 2010 03:12:30 +0000 |
| parents | 675d65036f31 |
| children | ef86ba720f00 |
comparison
equal
deleted
inserted
replaced
| 3573:f31fa6520a4b | 3574:1e088ec07d33 |
|---|---|
| 89 return true; | 89 return true; |
| 90 end); | 90 end); |
| 91 | 91 |
| 92 function module.load() | 92 function module.load() |
| 93 local ssl_config = module:get_option("ssl"); | 93 local ssl_config = module:get_option("ssl"); |
| 94 host.ssl_ctx = create_context(host, "client", ssl_config); -- for outgoing connections | 94 host.ssl_ctx = create_context(host.host, "client", ssl_config); -- for outgoing connections |
| 95 host.ssl_ctx_in = create_context(host, "server", ssl_config); -- for incoming connections | 95 host.ssl_ctx_in = create_context(host.host, "server", ssl_config); -- for incoming connections |
| 96 end | 96 end |
| 97 | 97 |
| 98 function module.unload() | 98 function module.unload() |
| 99 host.ssl_ctx = nil; | 99 host.ssl_ctx = nil; |
| 100 host.ssl_ctx_in = nil; | 100 host.ssl_ctx_in = nil; |
