Comparison

mod_auth_ccert/mod_auth_ccert.lua @ 1063:b2a4679e7d20

mod_auth_ccert: Accidentally not
author Kim Alvefur <zash@zash.se>
date Thu, 13 Jun 2013 21:27:41 +0200
parent 1062:f853a1a3aa15
child 1065:3d04d9377a67
comparison
equal deleted inserted replaced
1062:f853a1a3aa15 1063:b2a4679e7d20
11 local now = os.time; 11 local now = os.time;
12 12
13 function get_sasl_handler(session) 13 function get_sasl_handler(session)
14 return new_sasl(module.host, { 14 return new_sasl(module.host, {
15 external = session.secure and function(authz) 15 external = session.secure and function(authz)
16 if session.secure then 16 if not session.secure then
17 -- getpeercertificate() on a TCP connection would be bad, abort! 17 -- getpeercertificate() on a TCP connection would be bad, abort!
18 (session.log or log)("error", "How did you manage to select EXTERNAL without TLS?"); 18 (session.log or log)("error", "How did you manage to select EXTERNAL without TLS?");
19 return nil, false; 19 return nil, false;
20 end 20 end
21 local sock = session.conn:socket(); 21 local sock = session.conn:socket();