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 | 7f02081af251e0be1ce6006cfe858a79384a286d (patch) | |
tree | d368cc6d51d6acfdf6dc4fac83b04a0fd357ca0f /plugins/mod_s2s | |
parent | 78a340ccf79daca7cc45ffc79a9bc614db5048c9 (diff) | |
download | prosody-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.
Diffstat (limited to 'plugins/mod_s2s')
-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 |