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.
--- a/plugins/mod_s2s/mod_s2s.lua Sat Nov 30 23:33:39 2019 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua Sun Dec 01 01:20:34 2019 +0100
@@ -692,6 +692,10 @@
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