trust_anchors nitpicks: silence luacheck warnings

parent e789c969
...@@ -545,12 +545,12 @@ local add_file = function (path, unmanaged) ...@@ -545,12 +545,12 @@ local add_file = function (path, unmanaged)
trust_anchors.keysets[owner] = keyset trust_anchors.keysets[owner] = keyset
-- Parse new keys, refresh eventually -- Parse new keys, refresh eventually
if keyset_publish(keyset) == 0 then if keyset_publish(keyset) ~= 0 and verbose() then
-- TODO: try to rebootstrap if for root?
elseif verbose() then
log('[ ta ] installed trust anchors for domain ' .. owner_str .. ' are:\n' log('[ ta ] installed trust anchors for domain ' .. owner_str .. ' are:\n'
.. trust_anchors.summary(owner)) .. trust_anchors.summary(owner))
end end
-- TODO: if failed and for root, try to rebootstrap?
refresh_plan(keyset, 10 * sec, false) refresh_plan(keyset, 10 * sec, false)
end end
...@@ -572,7 +572,7 @@ local function ta_str(owner) ...@@ -572,7 +572,7 @@ local function ta_str(owner)
if #msg > 0 then if #msg > 0 then
msg = msg .. 'WARNING! negative trust anchor also has an explicit TA\n' msg = msg .. 'WARNING! negative trust anchor also has an explicit TA\n'
end end
for idx, ta in ipairs(trust_anchors.keysets[owner]) do for _, ta in ipairs(trust_anchors.keysets[owner]) do
msg = msg .. kres.rr2str(ta) .. '\n' msg = msg .. kres.rr2str(ta) .. '\n'
end end
return msg return msg
...@@ -622,9 +622,9 @@ trust_anchors = { ...@@ -622,9 +622,9 @@ trust_anchors = {
end end
trust_anchors.insecure = list trust_anchors.insecure = list
end, end,
summary = function (owner) summary = function (single_owner)
Please register or sign in to reply
if owner then -- single domain if single_owner then -- single domain
return ta_str(owner) return ta_str(single_owner)
end end
-- all domains -- all domains
...@@ -632,7 +632,7 @@ trust_anchors = { ...@@ -632,7 +632,7 @@ trust_anchors = {
local ta_count = 0 local ta_count = 0
local seen = {} local seen = {}
for _, nta_str in pairs(trust_anchors.insecure) do for _, nta_str in pairs(trust_anchors.insecure) do
owner = kres.str2dname(nta_str) local owner = kres.str2dname(nta_str)
seen[owner] = true seen[owner] = true
msg = msg .. ta_str(owner) msg = msg .. ta_str(owner)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment