Calls verification unit tests. More...
#include "config.h"#include "util/log.h"#include "testcode/unitmain.h"#include "validator/val_sigcrypt.h"#include "validator/val_secalgo.h"#include "validator/val_nsec.h"#include "validator/val_nsec3.h"#include "validator/validator.h"#include "testcode/testpkts.h"#include "util/data/msgreply.h"#include "util/data/msgparse.h"#include "util/data/dname.h"#include "util/regional.h"#include "util/alloc.h"#include "util/rbtree.h"#include "util/net_help.h"#include "util/module.h"#include "util/config_file.h"#include "sldns/sbuffer.h"#include "sldns/keyraw.h"#include "sldns/str2wire.h"#include "sldns/wire2str.h"Macros | |
| #define | xstr(s) str(s) |
| #define | str(s) #s |
| #define | SRCDIRSTR xstr(SRCDIR) |
Functions | |
| static void | entry_to_buf (struct entry *e, sldns_buffer *pkt) |
| entry to packet buffer with wireformat | |
| static void | entry_to_repinfo (struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct query_info *qi, struct reply_info **rep) |
| entry to reply info conversion | |
| static struct ub_packed_rrset_key * | extract_keys (struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt) |
| extract DNSKEY rrset from answer and convert it | |
| static int | should_be_bogus (struct ub_packed_rrset_key *rrset, struct query_info *qinfo) |
| return true if answer should be bogus | |
| static size_t | rrset_get_count (struct ub_packed_rrset_key *rrset) |
| return number of rrs in an rrset | |
| static void | setup_sigalg (struct ub_packed_rrset_key *dnskey, uint8_t *sigalg) |
| setup sig alg list from dnskey | |
| static void | verifytest_rrset (struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, struct query_info *qinfo) |
| verify and test one rrset against the key rrset | |
| static void | verifytest_entry (struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct ub_packed_rrset_key *dnskey, struct module_env *env, struct val_env *ve) |
| verify and test an entry - every rr in the message | |
| static struct ub_packed_rrset_key * | find_rrset_type (struct reply_info *rep, uint16_t type) |
| find RRset in reply by type | |
| static void | dstest_entry (struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct module_env *env) |
| DS sig test an entry - get DNSKEY and DS in entry and verify. | |
| static void | verifytest_file (const char *fname, const char *at_date) |
| verify from a file | |
| static void | dstest_file (const char *fname) |
| verify DS matches DNSKEY from a file | |
| static int | unitest_nsec_has_type_rdata (char *bitmap, size_t len, uint16_t type) |
| helper for unittest of NSEC routines | |
| static void | nsectest (void) |
| Test NSEC type bitmap routine. | |
| static void | nsec3_hash_test_entry (struct entry *e, rbtree_type *ct, struct alloc_cache *alloc, struct regional *region, sldns_buffer *buf) |
| Test hash algo - NSEC3 hash it and compare result. | |
| static void | nsec3_hash_test (const char *fname) |
| Read file to test NSEC3 hash algo. | |
| void | verify_test (void) |
| unit test for verification functions | |
Variables | |
| static int | vsig = 0 |
| verbose signature test | |
Calls verification unit tests.
Exits with code 1 on a failure.