mod_saslauth: Only advertise channel binding if a finished message is available 0.11
authorKim Alvefur <zash@zash.se>
Mon, 23 Nov 2020 21:52:46 +0100
branch0.11
changeset 11217 992c4498a1e3
parent 11216 1bfd238e05ad
child 11218 5fb6563eee1e
child 11230 b3ae48362f78
mod_saslauth: Only advertise channel binding if a finished message is available In some cases this method returns nothing, unclear why.
plugins/mod_saslauth.lua
--- 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"] = {