aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Cirillo <maranda@lightwitch.org>2012-02-24 15:34:25 +0000
committerMarco Cirillo <maranda@lightwitch.org>2012-02-24 15:34:25 +0000
commite69011927edb0b979b71b6649be70f0191655616 (patch)
treeaafdca55468201207ed86c6fcd352f1f0d86bc4e
parent3552b31a4fac765a6b5bca81f869423079c2073f (diff)
downloadprosody-e69011927edb0b979b71b6649be70f0191655616.tar.gz
prosody-e69011927edb0b979b71b6649be70f0191655616.zip
mod_s2s, s2sout.lib: import cert verify and add another fallback method in case socket.local_addresses isn't there.
-rw-r--r--plugins/s2s/mod_s2s.lua1
-rw-r--r--plugins/s2s/s2sout.lib.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/s2s/mod_s2s.lua b/plugins/s2s/mod_s2s.lua
index 0de821b2..88e8cded 100644
--- a/plugins/s2s/mod_s2s.lua
+++ b/plugins/s2s/mod_s2s.lua
@@ -20,6 +20,7 @@ local s2s_new_incoming = require "core.s2smanager".new_incoming;
local s2s_new_outgoing = require "core.s2smanager".new_outgoing;
local s2s_destroy_session = require "core.s2smanager".destroy_session;
local uuid_gen = require "util.uuid".generate;
+local cert_verify_identity = require "util.x509".verify_identity;
local s2sout = module:require("s2sout");
diff --git a/plugins/s2s/s2sout.lib.lua b/plugins/s2s/s2sout.lib.lua
index 12669d97..2856a15c 100644
--- a/plugins/s2s/s2sout.lib.lua
+++ b/plugins/s2s/s2sout.lib.lua
@@ -24,7 +24,7 @@ local socket = require "socket";
local s2s_new_outgoing = require "core.s2smanager".new_outgoing;
local s2s_destroy_session = require "core.s2smanager".destroy_session;
-local cfg_sources = config.get("*", "core", "s2s_interfaces") or socket.local_addresses();
+local cfg_sources = config.get("*", "core", "s2s_interfaces") or socket.local_addresses and socket.local_addresses() or { "*" };
local s2sout = {};