Mercurial > prosody-hg
diff core/s2smanager.lua @ 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 | 337391d34b70 |
| children | 26571a99f6e6 |
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()
