Mercurial > prosody-hg
comparison plugins/mod_s2s/mod_s2s.lua @ 6382:57d23c26039b
Merge 0.9->0.10
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 02 Sep 2014 22:33:11 +0200 |
| parents | 769a3577dd85 4220ffb87b22 |
| children | 166d1bd8fc38 |
comparison
equal
deleted
inserted
replaced
| 6377:50e5aed4eeea | 6382:57d23c26039b |
|---|---|
| 348 send(features); | 348 send(features); |
| 349 end | 349 end |
| 350 session.notopen = nil; | 350 session.notopen = nil; |
| 351 elseif session.direction == "outgoing" then | 351 elseif session.direction == "outgoing" then |
| 352 session.notopen = nil; | 352 session.notopen = nil; |
| 353 -- If we are just using the connection for verifying dialback keys, we won't try and auth it | 353 if not attr.id then |
| 354 if not attr.id then error("stream response did not give us a streamid!!!"); end | 354 log("error", "Stream response did not give us a stream id!"); |
| 355 session:close({ condition = "undefined-condition", text = "Missing stream ID" }); | |
| 356 return; | |
| 357 end | |
| 355 session.streamid = attr.id; | 358 session.streamid = attr.id; |
| 356 | 359 |
| 357 if session.secure and not session.cert_chain_status then | 360 if session.secure and not session.cert_chain_status then |
| 358 if check_cert_status(session) == false then | 361 if check_cert_status(session) == false then |
| 359 return; | 362 return; |
| 615 function listener.register_outgoing(conn, session) | 618 function listener.register_outgoing(conn, session) |
| 616 sessions[conn] = session; | 619 sessions[conn] = session; |
| 617 initialize_session(session); | 620 initialize_session(session); |
| 618 end | 621 end |
| 619 | 622 |
| 623 function listener.ondetach(conn) | |
| 624 sessions[conn] = nil; | |
| 625 end | |
| 626 | |
| 620 function check_auth_policy(event) | 627 function check_auth_policy(event) |
| 621 local host, session = event.host, event.session; | 628 local host, session = event.host, event.session; |
| 622 local must_secure = secure_auth; | 629 local must_secure = secure_auth; |
| 623 | 630 |
| 624 if not must_secure and secure_domains[host] then | 631 if not must_secure and secure_domains[host] then |
