aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-03-11 21:39:15 +0100
committerKim Alvefur <zash@zash.se>2013-03-11 21:39:15 +0100
commit404b1966b175f26175a10c4a91194d7797f46fab (patch)
tree8a3b05be3b74c78f03f2d148450e101cec41c3ba /plugins/mod_s2s
parenta32c615bc8170ff7a5a5cb48db751ef7f3803afa (diff)
downloadprosody-404b1966b175f26175a10c4a91194d7797f46fab.tar.gz
prosody-404b1966b175f26175a10c4a91194d7797f46fab.zip
mod_s2s: Make sure host variable is reachable
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index cabe8ea2..74014457 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -136,6 +136,7 @@ end
--- Helper to check that a session peer's certificate is valid
local function check_cert_status(session)
+ local host = session.direction == "incoming" and session.from_host or session.to_host
local conn = session.conn:socket()
local cert
if conn.getpeercertificate then
@@ -155,8 +156,6 @@ local function check_cert_status(session)
(session.log or log)("debug", "certificate chain validation result: valid");
session.cert_chain_status = "valid";
- local host = session.direction == "incoming" and session.from_host or session.to_host
-
-- We'll go ahead and verify the asserted identity if the
-- connecting server specified one.
if host then