Software /
code /
verse
Comparison
util/sasl/scram.lua @ 455:753d6983dc45
util.sasl.scram: Add support for 'tls-exporter' channel binding
Ref https://issues.prosody.im/1760
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Aug 2022 03:07:16 +0200 |
parent | 454:9f27a2075e9e |
child | 490:6b2f31da9610 |
comparison
equal
deleted
inserted
replaced
454:9f27a2075e9e | 455:753d6983dc45 |
---|---|
37 | 37 |
38 local function cb(conn) | 38 local function cb(conn) |
39 if conn:ssl() then | 39 if conn:ssl() then |
40 local sock = conn:socket(); | 40 local sock = conn:socket(); |
41 if sock.info and sock:info().protocol == "TLSv1.3" then | 41 if sock.info and sock:info().protocol == "TLSv1.3" then |
42 return false | 42 if sock.exportkeyingmaterial then |
43 return "p=tls-exporter", sock:exportkeyingmaterial("EXPORTER-Channel-Binding", 32, ""); | |
44 end | |
43 elseif sock.getfinished then | 45 elseif sock.getfinished then |
44 return "p=tls-unique", sock:getfinished(); | 46 return "p=tls-unique", sock:getfinished(); |
45 end | 47 end |
46 end | 48 end |
47 end | 49 end |