mod_saslauth: Only advertise channel binding if a finished message is available
In some cases this method returns nothing, unclear why.
--- a/plugins/mod_saslauth.lua Mon Nov 23 21:42:52 2020 +0100
+++ b/plugins/mod_saslauth.lua Mon Nov 23 21:52:46 2020 +0100
@@ -255,7 +255,7 @@
local info = socket.info and socket:info();
if info.protocol == "TLSv1.3" then
log("debug", "Channel binding 'tls-unique' undefined in context of TLS 1.3");
- elseif socket.getpeerfinished then
+ elseif socket.getpeerfinished and socket:getpeerfinished() then
sasl_handler:add_cb_handler("tls-unique", tls_unique);
end
sasl_handler["userdata"] = {