--- a/plugins/mod_admin_telnet.lua Sat May 18 12:02:25 2013 +0100
+++ b/plugins/mod_admin_telnet.lua Sat May 18 13:11:44 2013 +0200
@@ -682,9 +682,9 @@
error("This version of LuaSec does not support certificate viewing");
end
else
- local certs = conn:getpeerchain();
- local cert = certs[1];
+ local cert = conn:getpeercertificate();
if cert then
+ local certs = conn:getpeerchain();
local digest = cert:digest("sha1");
if not cert_set[digest] then
local chain_valid, chain_errors = conn:getpeerverification();