--- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Thu Dec 21 03:19:56 2017 +0100
+++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Thu Dec 21 03:20:34 2017 +0100
@@ -72,6 +72,11 @@
module:hook("s2s-check-certificate", function(event)
local session, cert = event.session, event.cert;
local log = session.log or module._log;
+ if session.cert_identity_status == "valid" then
+ log("debug", "Not trying POSH because certificate is already valid");
+ return;
+ end
+
log("info", "Trying POSH authentication.");
-- if session.cert_identity_status ~= "valid" and session.posh then
local wait, done = async.waiter();