dnssec-signzone.c revision 9b9a2770b1f60a47d141584078da330c5311f5ba
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer * Copyright (C) 1999 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
598b502695802c3d4e23316b85368e54f39f5cabMark Andrews#define is_zone_key(key) ((dst_key_flags(key) & DNS_KEYFLAG_OWNERMASK) \
598b502695802c3d4e23316b85368e54f39f5cabMark Andrewstypedef struct signer_array_struct signer_array_t;
598b502695802c3d4e23316b85368e54f39f5cabMark Andrewsstatic inline void
598b502695802c3d4e23316b85368e54f39f5cabMark Andrewsstatic inline void
598b502695802c3d4e23316b85368e54f39f5cabMark Andrewscheck_result(isc_result_t result, char *message) {
9a859983d7059a6eb9c877c1d2ac6a3a5b7170f7Evan Huntset_bit(unsigned char *array, unsigned int index, unsigned int bit) {
if (bit)
static inline isc_boolean_t
static inline isc_boolean_t
isc_buffer_t b;
static signer_key_t *
isc_buffer_t b;
return key;
return (NULL);
return key;
static isc_boolean_t
switch (result) {
case DNS_R_SUCCESS:
case DNS_R_NXDOMAIN:
case DNS_R_NXRDATASET:
return ISC_TRUE;
case DNS_R_DELEGATION:
case DNS_R_CNAME:
case DNS_R_DNAME:
return ISC_FALSE;
static isc_boolean_t
#define allocbufferandrdata \
isc_buffer_t b; \
if (!expired)
if (!expired &&
if (!expired &&
else if (!expired)
if (keep) {
&sig, &b);
else if (resign) {
if (wassignedby[i] != 0) {
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
if (!atorigin) {
NULL);
goto skip;
goto skip;
if (isdelegation) {
case dns_rdatatype_nxt:
case dns_rdatatype_key:
goto skip;
goto skip;
unsigned char *nxt_bits;
skip:
static inline isc_boolean_t
if (!active)
if (!active) {
return (active);
static inline isc_result_t
if (!active) {
return (result);
&nextnode);
int len;
int nkeys, i;
for (i = 0; i < nkeys; i++) {
static isc_stdtime_t
usage() {
exit(0);
int i, ch;
char *endp;
int verbose = 0;
extern char *optarg;
extern int optind;
switch (ch) {
usage();
if (argc == 0) {
for (i = 0; i < argc; i++) {
*algstr++ = 0;
*algstr++ = 0;
alg = 0;