# HG changeset patch # User Kim Alvefur # Date 1513822834 -3600 # Node ID 094f75f316d62ad51913d9d7ab1f5d4c003dd8a2 # Parent 73be17be7d844123bf356bf3b6ff06acf3ff72f0 mod_s2s_auth_posh: Skip POSH if session certificate is already valid diff -r 73be17be7d84 -r 094f75f316d6 mod_s2s_auth_posh/mod_s2s_auth_posh.lua --- 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();