Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 10473:b2dd1219a321
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Dec 2019 01:20:34 +0100 (2019-12-01) |
parent | 10472:676e6a1b23d4 |
child | 10476:035027a868bc |
comparison
equal
deleted
inserted
replaced
10472:676e6a1b23d4 | 10473:b2dd1219a321 |
---|---|
690 function listener.ondisconnect(conn, err) | 690 function listener.ondisconnect(conn, err) |
691 local session = sessions[conn]; | 691 local session = sessions[conn]; |
692 if session then | 692 if session then |
693 sessions[conn] = nil; | 693 sessions[conn] = nil; |
694 (session.log or log)("debug", "s2s disconnected: %s->%s (%s)", session.from_host, session.to_host, err or "connection closed"); | 694 (session.log or log)("debug", "s2s disconnected: %s->%s (%s)", session.from_host, session.to_host, err or "connection closed"); |
695 if session.secure == false and err then | |
696 -- TODO util.error-ify this | |
697 err = "Error during negotiation of encrypted connection: "..err; | |
698 end | |
695 s2s_destroy_session(session, err); | 699 s2s_destroy_session(session, err); |
696 end | 700 end |
697 end | 701 end |
698 | 702 |
699 function listener.onfail(data, err) | 703 function listener.onfail(data, err) |