diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-01 01:20:34 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-01 01:20:34 +0100 |
commit | 33ba4c2dbad8a92dcd7d9a94cc32bbb82b688b93 (patch) | |
tree | d368cc6d51d6acfdf6dc4fac83b04a0fd357ca0f | |
parent | 56500e6e054e18fef1ec47f53e7b58bcc0841e95 (diff) | |
download | prosody-33ba4c2dbad8a92dcd7d9a94cc32bbb82b688b93.tar.gz prosody-33ba4c2dbad8a92dcd7d9a94cc32bbb82b688b93.zip |
mod_s2s: Improve TLS handshake error messages
This should make it clearer that it's about the TLS handshake. Otherwise
it's something like "unsupported protocol" or "no shared ciphers" that
might not be that obvious.
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index d0176cea..82f6a95d 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -692,6 +692,10 @@ function listener.ondisconnect(conn, err) if session then sessions[conn] = nil; (session.log or log)("debug", "s2s disconnected: %s->%s (%s)", session.from_host, session.to_host, err or "connection closed"); + if session.secure == false and err then + -- TODO util.error-ify this + err = "Error during negotiation of encrypted connection: "..err; + end s2s_destroy_session(session, err); end end |