From 47389e6d48107288b1489da9b253adad7a2bdb17 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 19 Nov 2014 14:45:20 +0100 Subject: mod_saslauth: Make it easier to support multiple channel binding methonds --- plugins/mod_saslauth.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/mod_saslauth.lua') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 6cb3e3a7..7e9b0720 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -215,7 +215,7 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:abort", function(event) end); local function tls_unique(self) - return self.userdata:getpeerfinished(); + return self.userdata["tls-unique"]:getpeerfinished(); end local mechanisms_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-sasl' }; @@ -237,7 +237,9 @@ module:hook("stream-features", function(event) if socket.getpeerfinished then sasl_handler:add_cb_handler("tls-unique", tls_unique); end - sasl_handler["userdata"] = socket; + sasl_handler["userdata"] = { + ["tls-unique"] = socket; + }; end end local mechanisms = st.stanza("mechanisms", mechanisms_attr); -- cgit v1.2.3