Mercurial > prosody-hg
comparison core/s2smanager.lua @ 2800:5880c621f082
s2smanager: require_s2s_encryption -> s2s_require_encryption
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 30 Jan 2010 17:00:47 +0000 |
| parents | 0dc7b5ceaf8f |
| children | 0323bdb1fcfa |
comparison
equal
deleted
inserted
replaced
| 2799:0dc7b5ceaf8f | 2800:5880c621f082 |
|---|---|
| 449 end | 449 end |
| 450 | 450 |
| 451 function make_authenticated(session, host) | 451 function make_authenticated(session, host) |
| 452 if not session.secure then | 452 if not session.secure then |
| 453 local local_host = session.direction == "incoming" and session.to_host or session.from_host; | 453 local local_host = session.direction == "incoming" and session.to_host or session.from_host; |
| 454 if config.get(local_host, "core", "require_s2s_encryption")) then | 454 if config.get(local_host, "core", "s2s_require_encryption")) then |
| 455 session:close({ | 455 session:close({ |
| 456 condition = "policy-violation", | 456 condition = "policy-violation", |
| 457 text = "Encrypted server-to-server communication is required but was not " | 457 text = "Encrypted server-to-server communication is required but was not " |
| 458 ..((session.direction == "outgoing" and "offered") or "used") | 458 ..((session.direction == "outgoing" and "offered") or "used") |
| 459 }); | 459 }); |
