aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-01 01:20:34 +0100
committerKim Alvefur <zash@zash.se>2019-12-01 01:20:34 +0100
commit7f02081af251e0be1ce6006cfe858a79384a286d (patch)
treed368cc6d51d6acfdf6dc4fac83b04a0fd357ca0f
parent78a340ccf79daca7cc45ffc79a9bc614db5048c9 (diff)
downloadprosody-7f02081af251e0be1ce6006cfe858a79384a286d.tar.gz
prosody-7f02081af251e0be1ce6006cfe858a79384a286d.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.lua4
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