aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-11-27 22:07:44 +0000
committerMatthew Wild <mwild1@gmail.com>2010-11-27 22:07:44 +0000
commit37cf0024b2d222a63bc89c43ad5ef0799bfb4c00 (patch)
tree30db6f323e66d6ec64de72dbe555c8f49d807fd8 /core
parent846b1120ca5cacfc1b906bd24e817318dd9cb364 (diff)
downloadprosody-37cf0024b2d222a63bc89c43ad5ef0799bfb4c00.tar.gz
prosody-37cf0024b2d222a63bc89c43ad5ef0799bfb4c00.zip
s2smanager: Check for getpeercertificate availability (for old LuaSecs)
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index be5c04fc..0990a0aa 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -376,7 +376,10 @@ end
local function check_cert_status(session)
local conn = session.conn:socket()
- local cert = conn:getpeercertificate()
+ local cert
+ if conn.getpeercertificate then
+ cert = conn:getpeercertificate()
+ end
if cert then
local chain_valid, err = conn:getpeerchainvalid()