Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 6301:2fdd71b08126
mod_dialback: Short-circuit dialback auth if certificate is considered valid
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Jul 2014 21:48:25 +0200 |
parent | 6259:36f611624987 |
child | 6319:92d009af6eba |
comparison
equal
deleted
inserted
replaced
6300:4b0172dc5e3a | 6301:2fdd71b08126 |
---|---|
233 | 233 |
234 return true; | 234 return true; |
235 end | 235 end |
236 | 236 |
237 --- Helper to check that a session peer's certificate is valid | 237 --- Helper to check that a session peer's certificate is valid |
238 local function check_cert_status(session) | 238 function check_cert_status(session) |
239 local host = session.direction == "outgoing" and session.to_host or session.from_host | 239 local host = session.direction == "outgoing" and session.to_host or session.from_host |
240 local conn = session.conn:socket() | 240 local conn = session.conn:socket() |
241 local cert | 241 local cert |
242 if conn.getpeercertificate then | 242 if conn.getpeercertificate then |
243 cert = conn:getpeercertificate() | 243 cert = conn:getpeercertificate() |