aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-02-21 21:13:13 +0100
committerKim Alvefur <zash@zash.se>2012-02-21 21:13:13 +0100
commitf9853f402b8257dba0b5bacd5e522ba89c9ade25 (patch)
tree2f400823b9b185a01a1c06174abbe2682badbb09
parent56edb2db8c8c97cd981d7ad34a17c0d19ce46120 (diff)
downloadprosody-f9853f402b8257dba0b5bacd5e522ba89c9ade25.tar.gz
prosody-f9853f402b8257dba0b5bacd5e522ba89c9ade25.zip
core.s2smanager: Fix check_cert_status() for when the stream has no from attr
-rw-r--r--core/s2smanager.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 97cc3e6d..3a625157 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -410,7 +410,12 @@ 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
+ local host;
+ if session.direction == "incoming" then
+ host = session.from_host;
+ else
+ host = session.to_host;
+ end
-- We'll go ahead and verify the asserted identity if the
-- connecting server specified one.