diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-25 21:50:36 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-25 21:50:36 +0200 |
commit | f0abacc21570cef472c5bc7ec09ea35038f3f0aa (patch) | |
tree | 959bb1e739a129790b77b286fedc4f9b1cb0b551 | |
parent | 34a3e7327ee7e7d419e39363213afb338db2a3a3 (diff) | |
download | prosody-f0abacc21570cef472c5bc7ec09ea35038f3f0aa.tar.gz prosody-f0abacc21570cef472c5bc7ec09ea35038f3f0aa.zip |
mod_tls: Rebuild SSL context objects on configuration reload - #701
-rw-r--r-- | plugins/mod_tls.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 48613b9a..029ddd1d 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -35,7 +35,8 @@ local host = hosts[module.host]; local ssl_ctx_c2s, ssl_ctx_s2sout, ssl_ctx_s2sin; local ssl_cfg_c2s, ssl_cfg_s2sout, ssl_cfg_s2sin; -do + +function module.load() local NULL, err = {}; local modhost = module.host; local parent = modhost:match("%.(.*)$"); @@ -61,6 +62,8 @@ do if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end end +module:hook_global("config-reloaded", module.load); + local function can_do_tls(session) if not session.conn.starttls then if not session.secure then |