plugins/mod_tls.lua

changeset 2613
afa20941e098
parent 2607
35a5d1c5ea28
child 2623
1d34b45dec15
equal deleted inserted replaced
2612:475552b04151 2613:afa20941e098
47 if not origin.username and origin.conn.starttls then 47 if not origin.username and origin.conn.starttls then
48 features:add_child(c2s_feature); 48 features:add_child(c2s_feature);
49 end 49 end
50 end); 50 end);
51 module:hook("s2s-stream-features", function(event) 51 module:hook("s2s-stream-features", function(event)
52 local session, features = event.session, event.features; 52 local origin, features = event.origin, event.features;
53 if session.to_host and session.type ~= "s2sin" and session.conn.starttls then 53 if origin.to_host and origin.type ~= "s2sin" and origin.conn.starttls then
54 features:add_child(s2s_feature); 54 features:add_child(s2s_feature);
55 end 55 end
56 end); 56 end);
57 57
58 -- For s2sout connections, start TLS if we can 58 -- For s2sout connections, start TLS if we can

mercurial