dnssec-signzone.c revision aabfa856aaa78e3f2db9a1b727f9b72cdd6e7a08
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * Portions Copyright (C) 1999, 2000 Internet Software Consortium.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * Portions Copyright (C) 1995-2000 by Network Associates, Inc.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * Permission to use, copy, modify, and distribute this software for any
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * purpose with or without fee is hereby granted, provided that the above
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * copyright notice and this permission notice appear in all copies.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews * NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews * SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt * FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
/* $Id: dnssec-signzone.c,v 1.86 2000/08/02 13:51:02 bwelling Exp $ */
#include <config.h>
#include <stdlib.h>
#include "dnssectool.h"
int verbose;
struct signer_key_struct {
struct signer_array_struct {
if (bit != 0)
if (tryverify) {
static inline isc_boolean_t
static inline isc_boolean_t
static signer_key_t *
return key;
return (NULL);
return key;
static isc_boolean_t
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_NXDOMAIN:
case DNS_R_NXRRSET:
return ISC_TRUE;
case DNS_R_DELEGATION:
case DNS_R_CNAME:
case DNS_R_DNAME:
return ISC_FALSE;
static inline isc_boolean_t
#define allocbufferandrdata \
isc_buffer_t b; \
if (!nosigs) {
if (!expired)
if (!expired &&
if (!expired &&
else if (!expired) {
if (keep) {
&sig, &b);
else if (resign) {
if (wassignedby[i] != 0) {
0, NULL);
else if (!nosigs) {
#ifndef USE_ZONESTATUS
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
isc_buffer_t b;
if (isc_buffer_availablelength(&b) == 0)
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
static isc_boolean_t
isc_buffer_t b;
if (isc_buffer_availablelength(&b) == 0)
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
return (found);
static int warnwild = 0;
if (warnwild++ == 0) {
program);
if (!atorigin) {
NULL);
goto skip;
goto skip;
if (isdelegation) {
case dns_rdatatype_nxt:
#ifndef USE_ZONESTATUS
case dns_rdatatype_key:
goto skip;
goto skip;
unsigned char *nxt_bits;
isc_buffer_t b;
#ifdef USE_ZONESTATUS
0, 0, &keyset,
NULL);
goto alreadyhavenullkey;
isc_buffer_usedregion(&b, &r);
dns_rdatatype_key, &r);
link);
&keyset);
NULL);
} else if (isdelegation) {
skip:
static inline isc_boolean_t
if (!active)
if (!active) {
dns_rdatatype_nxt, 0);
return (active);
static inline isc_result_t
if (!active) {
return (result);
static inline isc_result_t
return (ISC_R_SUCCESS);
return (result);
static dns_ttl_t
return (ttl);
lastcut);
0, &rdsiter);
sizeof(dns_name_t));
int len;
unsigned int nkeys, i;
for (i = 0; i < nkeys; i++) {
static isc_stdtime_t
char *endp;
usage(void) {
exit(0);
int i, ch;
char *endp;
unsigned int eflags;
switch (ch) {
usage();
if (!pseudorandom)
usage();
if (argc == 0) {
for (i = 0; i < argc; i++) {
usage();
argv[i]);
if (free_output)