# HG changeset patch # User Matthew Wild # Date 1290895664 0 # Node ID 300ae72fd692df893648bd0ec7387b8654ac50f1 # Parent dc3ccef7898f7fb11b8025c805a778c7213c530b s2smanager: Check for getpeercertificate availability (for old LuaSecs) diff -r dc3ccef7898f -r 300ae72fd692 core/s2smanager.lua --- 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()