Mercurial > prosody-hg
comparison plugins/mod_saslauth.lua @ 11214:5fb6563eee1e
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 23 Nov 2020 21:56:26 +0100 |
| parents | 417eadd0f567 992c4498a1e3 |
| children | 11186af62c87 |
comparison
equal
deleted
inserted
replaced
| 11211:1151140fc757 | 11214:5fb6563eee1e |
|---|---|
| 258 if origin.encrypted then | 258 if origin.encrypted then |
| 259 -- check whether LuaSec has the nifty binding to the function needed for tls-unique | 259 -- check whether LuaSec has the nifty binding to the function needed for tls-unique |
| 260 -- FIXME: would be nice to have this check only once and not for every socket | 260 -- FIXME: would be nice to have this check only once and not for every socket |
| 261 if sasl_handler.add_cb_handler then | 261 if sasl_handler.add_cb_handler then |
| 262 local socket = origin.conn:socket(); | 262 local socket = origin.conn:socket(); |
| 263 if socket.getpeerfinished then | 263 local info = socket.info and socket:info(); |
| 264 if info.protocol == "TLSv1.3" then | |
| 265 log("debug", "Channel binding 'tls-unique' undefined in context of TLS 1.3"); | |
| 266 elseif socket.getpeerfinished and socket:getpeerfinished() then | |
| 264 log("debug", "Channel binding 'tls-unique' supported"); | 267 log("debug", "Channel binding 'tls-unique' supported"); |
| 265 sasl_handler:add_cb_handler("tls-unique", tls_unique); | 268 sasl_handler:add_cb_handler("tls-unique", tls_unique); |
| 266 else | 269 else |
| 267 log("debug", "Channel binding 'tls-unique' not supported (by LuaSec?)"); | 270 log("debug", "Channel binding 'tls-unique' not supported (by LuaSec?)"); |
| 268 end | 271 end |
