Changeset

3663:300ae72fd692

s2smanager: Check for getpeercertificate availability (for old LuaSecs)
author Matthew Wild <mwild1@gmail.com>
date Sat, 27 Nov 2010 22:07:44 +0000
parents 3662:dc3ccef7898f
children 3664:345cd1e04e80
files core/s2smanager.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Sat Nov 27 22:02:30 2010 +0000
+++ b/core/s2smanager.lua	Sat Nov 27 22:07:44 2010 +0000
@@ -376,7 +376,10 @@
 
 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()