Calls verification unit tests. More...
#include "config.h"
#include "util/log.h"
#include "testcode/unitmain.h"
#include "validator/val_sigcrypt.h"
#include "util/data/packed_rrset.h"
#include "validator/val_nsec.h"
#include "util/rbtree.h"
#include "validator/validator.h"
#include "testcode/ldns-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/net_help.h"
#include "util/module.h"
#include "util/config_file.h"
Functions | |
static void | entry_to_buf (struct entry *e, ldns_buffer *pkt) |
entry to packet buffer with wireformat | |
static void | entry_to_repinfo (struct entry *e, struct alloc_cache *alloc, struct regional *region, ldns_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, ldns_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 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, ldns_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, ldns_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 () |
Test NSEC type bitmap routine. | |
static void | nsec3_hash_test_entry (struct entry *e, rbtree_t *ct, struct alloc_cache *alloc, struct regional *region, ldns_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 () |
unit test for verification functions | |
Variables | |
static int | vsig = 0 |
verbose signature test |
Calls verification unit tests.
Exits with code 1 on a failure.