Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 11530:a90389e7296c
mod_tls: Fix order of debug messages and tls context creation
Originally added in 5b048ccd106f
Merged wrong in ca01c449357f
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 05 May 2021 16:25:33 +0200 |
| parents | df4bd3af4099 |
| children | 9ad5ec65132d |
comparison
equal
deleted
inserted
replaced
| 11528:d3b0049e50f5 | 11530:a90389e7296c |
|---|---|
| 54 local host_s2s = rawgetopt(modhost, "s2s_ssl") or parent_s2s; | 54 local host_s2s = rawgetopt(modhost, "s2s_ssl") or parent_s2s; |
| 55 | 55 |
| 56 module:log("debug", "Creating context for c2s"); | 56 module:log("debug", "Creating context for c2s"); |
| 57 local request_client_certs = { verify = { "peer", "client_once", }; }; | 57 local request_client_certs = { verify = { "peer", "client_once", }; }; |
| 58 | 58 |
| 59 module:log("debug", "Creating context for s2sout"); | |
| 60 ssl_ctx_c2s, err_c2s, ssl_cfg_c2s = create_context(host.host, "server", host_c2s, host_ssl, global_c2s); -- for incoming client connections | 59 ssl_ctx_c2s, err_c2s, ssl_cfg_c2s = create_context(host.host, "server", host_c2s, host_ssl, global_c2s); -- for incoming client connections |
| 61 if not ssl_ctx_c2s then module:log("error", "Error creating context for c2s: %s", err_c2s); end | 60 if not ssl_ctx_c2s then module:log("error", "Error creating context for c2s: %s", err_c2s); end |
| 62 | 61 |
| 63 module:log("debug", "Creating context for s2sin"); | 62 module:log("debug", "Creating context for s2sout"); |
| 64 -- for outgoing server connections | 63 -- for outgoing server connections |
| 65 ssl_ctx_s2sout, err_s2sout, ssl_cfg_s2sout = create_context(host.host, "client", host_s2s, host_ssl, global_s2s, request_client_certs); | 64 ssl_ctx_s2sout, err_s2sout, ssl_cfg_s2sout = create_context(host.host, "client", host_s2s, host_ssl, global_s2s, request_client_certs); |
| 66 if not ssl_ctx_s2sout then module:log("error", "Error creating contexts for s2sout: %s", err_s2sout); end | 65 if not ssl_ctx_s2sout then module:log("error", "Error creating contexts for s2sout: %s", err_s2sout); end |
| 67 | 66 |
| 67 module:log("debug", "Creating context for s2sin"); | |
| 68 -- for incoming server connections | 68 -- for incoming server connections |
| 69 ssl_ctx_s2sin, err_s2sin, ssl_cfg_s2sin = create_context(host.host, "server", host_s2s, host_ssl, global_s2s, request_client_certs); | 69 ssl_ctx_s2sin, err_s2sin, ssl_cfg_s2sin = create_context(host.host, "server", host_s2s, host_ssl, global_s2s, request_client_certs); |
| 70 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err_s2sin); end | 70 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err_s2sin); end |
| 71 | 71 |
| 72 if reload then | 72 if reload then |
