equal
deleted
inserted
replaced
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", "s2s_require_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 }); |