aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-11-19 14:45:20 +0100
committerKim Alvefur <zash@zash.se>2014-11-19 14:45:20 +0100
commit8e786f387d9eaddc03d62fe534071486b56afed7 (patch)
treead270716e13437edd1212e1ea469e70902ae6cfc
parent2ab66e784aec225601e5d42c49bbdea22916fcb7 (diff)
downloadprosody-8e786f387d9eaddc03d62fe534071486b56afed7.tar.gz
prosody-8e786f387d9eaddc03d62fe534071486b56afed7.zip
mod_saslauth: Make it easier to support multiple channel binding methonds
-rw-r--r--plugins/mod_saslauth.lua6
1 files changed, 4 insertions, 2 deletions
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);