Changeset

6519:367db22cf7d2

mod_saslauth: Make it easier to support multiple channel binding methonds
author Kim Alvefur <zash@zash.se>
date Wed, 19 Nov 2014 14:45:20 +0100
parents 6518:c0d221b0c94c
children 6520:c6caaa440e74
files plugins/mod_saslauth.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Wed Nov 19 14:44:41 2014 +0100
+++ b/plugins/mod_saslauth.lua	Wed Nov 19 14:45:20 2014 +0100
@@ -215,7 +215,7 @@
 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 @@
 				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);