Skip to content
Snippets Groups Projects

daemon/lua/trust_anchors: don't crash when dealing with unknown algorhitm

Merged Tomas Krizek requested to merge key-rollover into master
5 files
+ 12
13
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -22,7 +22,7 @@ local function test_revoked_key()
same(root_ta.rrs.count, 1, 'the root TA set contains one RR')
end
local function test_distrust()
local function test_remove()
-- uses root key from the previous test
assert(trust_anchors.keysets['\0'], 'root key must be there from previous test')
local ta_c = kres.context().trust_anchors
@@ -30,7 +30,7 @@ local function test_distrust()
assert(root_ta ~= nil, 'we got non-NULL TA RRset')
assert(root_ta.rrs.count, 1, 'we have a root TA set to be deleted')
trust_anchors.distrust('.')
trust_anchors.remove('.')
same(trust_anchors.keysets['\0'], nil, 'Lua interface does not have the removed key')
local root_ta = ffi.C.kr_ta_get(ta_c, '\0')
@@ -39,6 +39,6 @@ end
return {
test_revoked_key,
test_distrust
test_remove,
}
Loading