Software /
code /
prosody
Comparison
plugins/mod_tls.lua @ 9971:5b048ccd106f 0.11
mod_tls: Log debug message for each kind of TLS context created
Creating TLS contexts triggers a lot of messages from certmanager that
don't really describe their purpose. This is meant to provide hints
about that.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Apr 2019 19:13:50 +0200 |
parent | 8131:c8e3a0caa0a9 |
child | 9975:ca01c449357f |
child | 10783:950082c1669e |
comparison
equal
deleted
inserted
replaced
9962:29bc3dff3419 | 9971:5b048ccd106f |
---|---|
50 | 50 |
51 local global_s2s = rawgetopt("*", "s2s_ssl") or NULL; | 51 local global_s2s = rawgetopt("*", "s2s_ssl") or NULL; |
52 local parent_s2s = rawgetopt(parent, "s2s_ssl") or NULL; | 52 local parent_s2s = rawgetopt(parent, "s2s_ssl") or NULL; |
53 local host_s2s = rawgetopt(modhost, "s2s_ssl") or parent_s2s; | 53 local host_s2s = rawgetopt(modhost, "s2s_ssl") or parent_s2s; |
54 | 54 |
55 module:log("debug", "Creating context for c2s"); | |
55 ssl_ctx_c2s, err, ssl_cfg_c2s = create_context(host.host, "server", host_c2s, host_ssl, global_c2s); -- for incoming client connections | 56 ssl_ctx_c2s, err, ssl_cfg_c2s = create_context(host.host, "server", host_c2s, host_ssl, global_c2s); -- for incoming client connections |
56 if not ssl_ctx_c2s then module:log("error", "Error creating context for c2s: %s", err); end | 57 if not ssl_ctx_c2s then module:log("error", "Error creating context for c2s: %s", err); end |
57 | 58 |
59 module:log("debug", "Creating context for s2sout"); | |
58 ssl_ctx_s2sout, err, ssl_cfg_s2sout = create_context(host.host, "client", host_s2s, host_ssl, global_s2s); -- for outgoing server connections | 60 ssl_ctx_s2sout, err, ssl_cfg_s2sout = create_context(host.host, "client", host_s2s, host_ssl, global_s2s); -- for outgoing server connections |
59 if not ssl_ctx_s2sout then module:log("error", "Error creating contexts for s2sout: %s", err); end | 61 if not ssl_ctx_s2sout then module:log("error", "Error creating contexts for s2sout: %s", err); end |
60 | 62 |
63 module:log("debug", "Creating context for s2sin"); | |
61 ssl_ctx_s2sin, err, ssl_cfg_s2sin = create_context(host.host, "server", host_s2s, host_ssl, global_s2s); -- for incoming server connections | 64 ssl_ctx_s2sin, err, ssl_cfg_s2sin = create_context(host.host, "server", host_s2s, host_ssl, global_s2s); -- for incoming server connections |
62 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end | 65 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end |
63 end | 66 end |
64 | 67 |
65 module:hook_global("config-reloaded", module.load); | 68 module:hook_global("config-reloaded", module.load); |