# HG changeset patch # User Kim Alvefur # Date 1613055087 -3600 # Node ID 58a112bd979205a598c99449bb6944f38d3879f3 # Parent 95262bd1bcb2685c381b1f97304401d2668a88eb mod_s2s_auth_posh: Use unused loop variable for something [luacheck] Saves a function call, shuts up luacheck. In no case does the input list of certificates not result in a list of fingerprints of equal length. diff -r 95262bd1bcb2 -r 58a112bd9792 mod_s2s_auth_posh/mod_s2s_auth_posh.lua --- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Mon Feb 15 21:04:19 2021 +0100 +++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Thu Feb 11 15:51:27 2021 +0100 @@ -144,7 +144,7 @@ local cert_pem = cert:read("*a"); local cert_der, typ = pem2der(cert_pem); if typ == "CERTIFICATE" then - table.insert(jwkset.fingerprints, { ["sha-256"] = base64.encode(hashes.sha256(cert_der)); }); + jwkset.fingerprints[i] = { ["sha-256"] = base64.encode(hashes.sha256(cert_der)); }; elseif typ then io.stderr:write(cert_file, " contained a ", typ:lower(), ", was expecting a certificate\n"); return 1;