dnssec.c revision 50df1ec60af410fca6b7a85d5c85e8f31bb13bc3
e7ddc97b4578c281de6559fcd26aa1d68de4531fMark Andrews * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1999-2003 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
1ab9944f6b41e6b52da60ff2e328aa49b30e3989Automatic Updater * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
e7ddc97b4578c281de6559fcd26aa1d68de4531fMark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
e7ddc97b4578c281de6559fcd26aa1d68de4531fMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
e7ddc97b4578c281de6559fcd26aa1d68de4531fMark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8d19e0443db60dd84f18715e8f07822ca8591f8aAndreas Gustafsson * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c41c261fc7b2ae573fab3675a03a5f1ef099a2eaMark Andrews * PERFORMANCE OF THIS SOFTWARE.
c41c261fc7b2ae573fab3675a03a5f1ef099a2eaMark Andrews * $Id: dnssec.c,v 1.92 2008/11/14 22:53:46 marka Exp $
e223d4bb266cdab827c8f8276d577b312a1d4d95Mark Andrews#define is_response(msg) (msg->flags & DNS_MESSAGEFLAG_QR)
e7ddc97b4578c281de6559fcd26aa1d68de4531fMark Andrews#define RETERR(x) do { \
static isc_result_t
static isc_result_t
static isc_result_t
return (ISC_R_NOMEMORY);
return (ret);
*nrdata = n;
return (ISC_R_SUCCESS);
isc_buffer_t b;
isc_region_t r;
static isc_result_t
isc_region_t r;
return (ret);
== ISC_R_SUCCESS);
int nrdatas, i;
isc_region_t r;
unsigned int sigsize;
return (DNS_R_INVALIDTIME);
return (DNS_R_KEYUNAUTHORIZED);
return (DNS_R_KEYUNAUTHORIZED);
return (ret);
* The actual contents of sig.signature are not important yet, since
return (ISC_R_NOMEMORY);
goto cleanup_signature;
goto cleanup_databuf;
goto cleanup_databuf;
goto cleanup_context;
goto cleanup_context;
for (i = 0; i < nrdatas; i++) {
goto cleanup_array;
goto cleanup_array;
goto cleanup_array;
goto cleanup_array;
goto cleanup_array;
return (ret);
isc_region_t r;
int nrdatas, i;
int labels = 0;
return (ret);
return (DNS_R_SIGINVALID);
return (DNS_R_SIGINVALID);
if (!ignoretime) {
return (DNS_R_SIGFUTURE);
return (DNS_R_SIGEXPIRED);
case dns_rdatatype_ns:
case dns_rdatatype_soa:
case dns_rdatatype_dnskey:
return (DNS_R_SIGINVALID);
case dns_rdatatype_ds:
return (DNS_R_SIGINVALID);
return (DNS_R_SIGINVALID);
return (DNS_R_KEYUNAUTHORIZED);
return (DNS_R_KEYUNAUTHORIZED);
goto cleanup_struct;
goto cleanup_context;
goto cleanup_context;
for (i = 0; i < nrdatas; i++) {
goto cleanup_array;
goto cleanup_array;
goto cleanup_array;
return (ret);
return (result);
unsigned int *nkeys)
unsigned int count = 0;
*nkeys = 0;
goto next;
goto next;
count++;
goto next;
goto failure;
goto next;
count++;
next:
goto failure;
if (count == 0)
while (count > 0)
return (result);
unsigned int *nkeys)
unsigned int sigsize;
isc_region_t r;
goto failure;
return (ISC_R_SUCCESS);
if (signeedsfree)
return (result);
return (DNS_R_UNEXPECTEDTSIG);
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
return (ISC_R_SUCCESS);
if (signeedsfree)
return (result);