# HG changeset patch # User Kim Alvefur # Date 1587927531 -7200 # Node ID 950082c1669e1056a60e7d80078137026ca51909 # Parent 3695904d2854d187538e405d49edd8f285969910 mod_tls: Log when certificates are (re)loaded Meant to reduce user confusion over what's reloaded and not. diff -r 3695904d2854 -r 950082c1669e plugins/mod_tls.lua --- a/plugins/mod_tls.lua Sun Apr 26 20:39:39 2020 +0200 +++ b/plugins/mod_tls.lua Sun Apr 26 20:58:51 2020 +0200 @@ -36,7 +36,7 @@ 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 @@ 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);