aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index fe60dc78..18c18823 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -630,30 +630,35 @@ end
function interface:ssl_info()
local sock = self.conn;
+ if not sock then return nil, "not-connected" end
if not sock.info then return nil, "not-implemented"; end
return sock:info();
end
function interface:ssl_peercertificate()
local sock = self.conn;
+ if not sock then return nil, "not-connected" end
if not sock.getpeercertificate then return nil, "not-implemented"; end
return sock:getpeercertificate();
end
function interface:ssl_peerverification()
local sock = self.conn;
+ if not sock then return nil, "not-connected" end
if not sock.getpeerverification then return nil, { { "Chain verification not supported" } }; end
return sock:getpeerverification();
end
function interface:ssl_peerfinished()
local sock = self.conn;
+ if not sock then return nil, "not-connected" end
if not sock.getpeerfinished then return nil, "not-implemented"; end
return sock:getpeerfinished();
end
function interface:ssl_exportkeyingmaterial(label, len, context)
local sock = self.conn;
+ if not sock then return nil, "not-connected" end
if sock.exportkeyingmaterial then
return sock:exportkeyingmaterial(label, len, context);
end