Lines Matching defs:keytable
26 #include <dns/keytable.h>
37 dns_keytable_t *keytable = NULL;
113 /* Common setup: create a keytable and ntatable to test with a few keys */
123 ATF_REQUIRE_EQ(dns_keytable_create(mctx, &keytable), ISC_R_SUCCESS);
129 ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
133 ATF_REQUIRE_EQ(dns_keytable_marksecure(keytable,
149 if (keytable != NULL)
150 dns_keytable_detach(&keytable);
161 atf_tc_set_md_var(tc, "descr", "add keys to the keytable");
178 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("example.com"),
180 ATF_REQUIRE_EQ(dns_keytable_nextkeynode(keytable, keynode,
188 ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
190 ATF_REQUIRE_EQ(dns_keytable_nextkeynode(keytable, keynode,
194 dns_keytable_detachkeynode(keytable, &keynode);
196 ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
198 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("example.com"),
200 ATF_REQUIRE_EQ(dns_keytable_nextkeynode(keytable, keynode,
202 dns_keytable_detachkeynode(keytable, &next_keynode);
208 dns_keytable_detachkeynode(keytable, &keynode);
209 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
212 ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
214 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
218 dns_keytable_detachkeynode(keytable, &null_keynode);
227 ATF_REQUIRE_EQ(dns_keytable_marksecure(keytable,
230 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
234 ATF_REQUIRE_EQ(dns_keytable_nextkeynode(keytable, keynode,
236 dns_keytable_detachkeynode(keytable, &null_keynode);
238 dns_keytable_detachkeynode(keytable, &keynode);
245 atf_tc_set_md_var(tc, "descr", "delete keys from the keytable");
254 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, str2name("example.org")),
256 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, str2name("s.example.com")),
258 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, str2name("example.com")),
262 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, str2name("null.example")),
276 atf_tc_set_md_var(tc, "descr", "delete key nodes from the keytable");
288 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
294 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
300 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
310 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
312 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
314 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, str2name("example.com")),
323 ATF_REQUIRE_EQ(dns_keytable_deletekeynode(keytable, key),
325 ATF_REQUIRE_EQ(dns_keytable_delete(keytable, dst_key_name(key)),
351 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("example.org"),
353 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("sub.example.com"),
355 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("example.com"),
357 dns_keytable_detachkeynode(keytable, &keynode);
358 ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
361 dns_keytable_detachkeynode(keytable, &keynode);
369 ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
373 ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
377 ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
380 ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
391 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
395 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
399 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
403 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
407 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
411 ATF_REQUIRE_EQ(dns_keytable_findkeynode(keytable,
415 dns_keytable_detachkeynode(keytable, &keynode);
442 ATF_REQUIRE_EQ(dns_keytable_issecuredomain(keytable,
454 ATF_REQUIRE_EQ(dns_keytable_issecuredomain(keytable,
479 ATF_REQUIRE_EQ(dns_keytable_dump(keytable, stdout), ISC_R_SUCCESS);
509 result = dns_view_getsecroots(myview, &keytable);
518 result = dns_keytable_add(keytable, ISC_FALSE, &key);
583 dns_keytable_detach(&keytable);
594 atf_tc_set_md_var(tc, "descr", "skipping keytable test");