Skip to content
Snippets Groups Projects
Commit ce6969ac authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

trust anchors: add KeyTag into comments

Fixes #167.
parent 262396f9
Branches
Tags
2 merge requests!254Knot Resolver 1.2.5,!233trust anchors: store in prettier format
Pipeline #2411 passed with stages
in 30 minutes and 22 seconds
......@@ -219,6 +219,7 @@ local function keyset_write(keyset, path)
for i = 1, #keyset do
local ta = keyset[i]
ta.comment = ' ' .. ta.state .. ':' .. (ta.timer or '')
.. ' ; KeyTag:' .. ta.key_tag -- the tag is just for humans
local rr_str = kres.rr2str(ta) .. '\n'
if ta.state ~= key_state.Valid and ta.state ~= key_state.Missing then
rr_str = '; '..rr_str -- Invalidate key string (for older kresd versions)
......@@ -280,6 +281,11 @@ local function keyset_read(path)
end
end
end
local _k, ta
for _k, ta in pairs(tas) do
ta.key_tag = C.kr_dnssec_key_tag(ta.type, ta.rdata, #ta.rdata)
end
return tas
end
......
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