val_nsec.c (256281) | val_nsec.c (269257) |
---|---|
1/* 2 * validator/val_nsec.c - validator NSEC denial of existance functions. 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 7 unchanged lines hidden (view full) --- 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * Neither the name of the NLNET LABS nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 1/* 2 * validator/val_nsec.c - validator NSEC denial of existance functions. 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 7 unchanged lines hidden (view full) --- 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * Neither the name of the NLNET LABS nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. | 24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 */ 35 36/** 37 * \file 38 * 39 * This file contains helper functions for the validator module. 40 * The functions help with NSEC checking, the different NSEC proofs 41 * for denial of existance, and proofs for presence of types. 42 */ 43#include "config.h" | 34 */ 35 36/** 37 * \file 38 * 39 * This file contains helper functions for the validator module. 40 * The functions help with NSEC checking, the different NSEC proofs 41 * for denial of existance, and proofs for presence of types. 42 */ 43#include "config.h" |
44#include <ldns/packet.h> | |
45#include "validator/val_nsec.h" 46#include "validator/val_utils.h" 47#include "util/data/msgreply.h" 48#include "util/data/dname.h" 49#include "util/net_help.h" 50#include "util/module.h" 51#include "services/cache/rrset.h" 52 --- 139 unchanged lines hidden (view full) --- 192 return 1; 193 } 194 return 0; 195} 196 197enum sec_status 198val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve, 199 struct query_info* qinfo, struct reply_info* rep, | 44#include "validator/val_nsec.h" 45#include "validator/val_utils.h" 46#include "util/data/msgreply.h" 47#include "util/data/dname.h" 48#include "util/net_help.h" 49#include "util/module.h" 50#include "services/cache/rrset.h" 51 --- 139 unchanged lines hidden (view full) --- 191 return 1; 192 } 193 return 0; 194} 195 196enum sec_status 197val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve, 198 struct query_info* qinfo, struct reply_info* rep, |
200 struct key_entry_key* kkey, uint32_t* proof_ttl, char** reason) | 199 struct key_entry_key* kkey, time_t* proof_ttl, char** reason) |
201{ 202 struct ub_packed_rrset_key* nsec = reply_find_rrset_section_ns( 203 rep, qinfo->qname, qinfo->qname_len, LDNS_RR_TYPE_NSEC, 204 qinfo->qclass); 205 enum sec_status sec; 206 size_t i; 207 uint8_t* wc = NULL, *ce = NULL; 208 int valid_nsec = 0; --- 395 unchanged lines hidden --- | 200{ 201 struct ub_packed_rrset_key* nsec = reply_find_rrset_section_ns( 202 rep, qinfo->qname, qinfo->qname_len, LDNS_RR_TYPE_NSEC, 203 qinfo->qclass); 204 enum sec_status sec; 205 size_t i; 206 uint8_t* wc = NULL, *ce = NULL; 207 int valid_nsec = 0; --- 395 unchanged lines hidden --- |