plugins/mod_s2s_auth_certs.lua
changeset 12484 7e9ebdc75ce4
parent 11839 a405884c62f4
child 12812 12bd40b8e105
--- a/plugins/mod_s2s_auth_certs.lua	Mon Apr 25 16:35:10 2022 +0100
+++ b/plugins/mod_s2s_auth_certs.lua	Wed Apr 27 17:44:14 2022 +0200
@@ -9,7 +9,7 @@
 
 module:hook("s2s-check-certificate", function(event)
 	local session, host, cert = event.session, event.host, event.cert;
-	local conn = session.conn:socket();
+	local conn = session.conn;
 	local log = session.log or log;
 
 	if not cert then
@@ -18,8 +18,8 @@
 	end
 
 	local chain_valid, errors;
-	if conn.getpeerverification then
-		chain_valid, errors = conn:getpeerverification();
+	if conn.ssl_peerverification then
+		chain_valid, errors = conn:ssl_peerverification();
 	else
 		chain_valid, errors = false, { { "Chain verification not supported by this version of LuaSec" } };
 	end