From 972ed38d125a6b3d842289b8e6b83a5b3c2b1f28 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 21 Feb 2012 21:13:13 +0100 Subject: core.s2smanager: Fix check_cert_status() for when the stream has no from attr --- core/s2smanager.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3