Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 10337:39111f0e83d0
mod_saslauth: Log (debug) messages about channel binding
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 15 Oct 2019 21:37:19 +0200 |
parent | 10334:2147942710bb |
child | 10338:56a0f68b7797 |
comparison
equal
deleted
inserted
replaced
10336:55dccd4a3522 | 10337:39111f0e83d0 |
---|---|
248 -- check whether LuaSec has the nifty binding to the function needed for tls-unique | 248 -- check whether LuaSec has the nifty binding to the function needed for tls-unique |
249 -- FIXME: would be nice to have this check only once and not for every socket | 249 -- FIXME: would be nice to have this check only once and not for every socket |
250 if sasl_handler.add_cb_handler then | 250 if sasl_handler.add_cb_handler then |
251 local socket = origin.conn:socket(); | 251 local socket = origin.conn:socket(); |
252 if socket.getpeerfinished then | 252 if socket.getpeerfinished then |
253 log("debug", "Channel binding 'tls-unique' supported"); | |
253 sasl_handler:add_cb_handler("tls-unique", tls_unique); | 254 sasl_handler:add_cb_handler("tls-unique", tls_unique); |
255 else | |
256 log("debug", "Channel binding 'tls-unique' not supported (by LuaSec?)"); | |
254 end | 257 end |
255 sasl_handler["userdata"] = { | 258 sasl_handler["userdata"] = { |
256 ["tls-unique"] = socket; | 259 ["tls-unique"] = socket; |
257 }; | 260 }; |
261 else | |
262 log("debug", "Channel binding not supported by SASL handler"); | |
258 end | 263 end |
259 end | 264 end |
260 local mechanisms = st.stanza("mechanisms", mechanisms_attr); | 265 local mechanisms = st.stanza("mechanisms", mechanisms_attr); |
261 local sasl_mechanisms = sasl_handler:mechanisms() | 266 local sasl_mechanisms = sasl_handler:mechanisms() |
262 for mechanism in pairs(sasl_mechanisms) do | 267 for mechanism in pairs(sasl_mechanisms) do |