Mercurial > prosody-hg
comparison plugins/mod_saslauth.lua @ 11213:992c4498a1e3 0.11
mod_saslauth: Only advertise channel binding if a finished message is available
In some cases this method returns nothing, unclear why.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 23 Nov 2020 21:52:46 +0100 |
| parents | 1bfd238e05ad |
| children | 5fb6563eee1e f1abc34414bc |
comparison
equal
deleted
inserted
replaced
| 11212:1bfd238e05ad | 11213:992c4498a1e3 |
|---|---|
| 253 if sasl_handler.add_cb_handler then | 253 if sasl_handler.add_cb_handler then |
| 254 local socket = origin.conn:socket(); | 254 local socket = origin.conn:socket(); |
| 255 local info = socket.info and socket:info(); | 255 local info = socket.info and socket:info(); |
| 256 if info.protocol == "TLSv1.3" then | 256 if info.protocol == "TLSv1.3" then |
| 257 log("debug", "Channel binding 'tls-unique' undefined in context of TLS 1.3"); | 257 log("debug", "Channel binding 'tls-unique' undefined in context of TLS 1.3"); |
| 258 elseif socket.getpeerfinished then | 258 elseif socket.getpeerfinished and socket:getpeerfinished() then |
| 259 sasl_handler:add_cb_handler("tls-unique", tls_unique); | 259 sasl_handler:add_cb_handler("tls-unique", tls_unique); |
| 260 end | 260 end |
| 261 sasl_handler["userdata"] = { | 261 sasl_handler["userdata"] = { |
| 262 ["tls-unique"] = socket; | 262 ["tls-unique"] = socket; |
| 263 }; | 263 }; |
