diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-26 20:58:51 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-26 20:58:51 +0200 |
commit | 9a480a1f1a7cecebbbc97a21479b013be04bb399 (patch) | |
tree | 0f3554f144cf1f358e01f2da09c164014c2effda /plugins/mod_tls.lua | |
parent | 347a7b20c96566722a9ee5c55228840dfbd89974 (diff) | |
download | prosody-9a480a1f1a7cecebbbc97a21479b013be04bb399.tar.gz prosody-9a480a1f1a7cecebbbc97a21479b013be04bb399.zip |
mod_tls: Log when certificates are (re)loaded
Meant to reduce user confusion over what's reloaded and not.
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r-- | plugins/mod_tls.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index eb208e28..8c0c4e20 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -36,7 +36,7 @@ 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; -function module.load() +function module.load(reload) local NULL, err = {}; local modhost = module.host; local parent = modhost:match("%.(.*)$"); @@ -63,6 +63,12 @@ function module.load() module:log("debug", "Creating context for s2sin"); ssl_ctx_s2sin, err, ssl_cfg_s2sin = create_context(host.host, "server", host_s2s, host_ssl, global_s2s); -- for incoming server connections if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end + + if reload then + module:log("info", "Certificates reloaded"); + else + module:log("info", "Certificates loaded"); + end end module:hook_global("config-reloaded", module.load); |