Software /
code /
prosody-modules
Comparison
mod_auth_ccert/mod_auth_ccert.lua @ 1324:853a382c9bd6
mod_turncredentials: Advertise the XEP-0215 feature (thanks Gryffus)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 28 Feb 2014 15:36:06 +0100 |
parent | 1092:f46307e8e2f8 |
child | 1325:b21236b6b8d8 |
comparison
equal
deleted
inserted
replaced
1323:c84ff82658cb | 1324:853a382c9bd6 |
---|---|
58 | 58 |
59 | 59 |
60 function get_sasl_handler(session) | 60 function get_sasl_handler(session) |
61 return new_sasl(module.host, { | 61 return new_sasl(module.host, { |
62 external = session.secure and function(authz) | 62 external = session.secure and function(authz) |
63 if not session.secure then | 63 if not session.secure or not session.conn:ssl() then |
64 -- getpeercertificate() on a TCP connection would be bad, abort! | 64 -- getpeercertificate() on a TCP connection would be bad, abort! |
65 (session.log or log)("error", "How did you manage to select EXTERNAL without TLS?"); | 65 (session.log or log)("error", "How did you manage to select EXTERNAL without TLS?"); |
66 return nil, false; | 66 return nil, false; |
67 end | 67 end |
68 local sock = session.conn:socket(); | 68 local sock = session.conn:socket(); |