dnssec.c revision 9860862cedd41ffaf69e7806e8f8959263552721
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Copyright (C) 1999-2003 Internet Software Consortium.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Permission to use, copy, modify, and distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
683da0cd900532fc45fa4dfb687b5041156ec8abAndreas Gustafsson * $Id: dnssec.c,v 1.88 2007/05/18 05:50:35 marka Exp $
683da0cd900532fc45fa4dfb687b5041156ec8abAndreas Gustafsson#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
f4cbe536b11da614fe05aeaeff41e324854cda7bMark Andrews#define is_response(msg) (msg->flags & DNS_MESSAGEFLAG_QR)
683da0cd900532fc45fa4dfb687b5041156ec8abAndreas Gustafsson#define RETERR(x) do { \
#define TYPE_SIGN 0
static isc_result_t
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);
if (!ignoretime) {
return (DNS_R_SIGFUTURE);
return (DNS_R_SIGEXPIRED);
return (DNS_R_KEYUNAUTHORIZED);
return (DNS_R_KEYUNAUTHORIZED);
goto cleanup_struct;
goto cleanup_context;
NULL)
== ISC_R_SUCCESS);
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;
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);