dnssec-signzone.c revision c9d7e543d0da2996d1cc52d3c5920141df49a4ec
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Portions Copyright (C) 1999, 2000 Internet Software Consortium.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Portions Copyright (C) 1995-2000 by Network Associates, Inc.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Permission to use, copy, modify, and distribute this software for any
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * purpose with or without fee is hereby granted, provided that the above
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * copyright notice and this permission notice appear in all copies.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * ASSOCIATES BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/* $Id: dnssec-signzone.c,v 1.115 2000/12/07 01:41:14 bwelling Exp $ */
#include "dnssectool.h"
int verbose;
struct signer_key_struct {
unsigned int position;
struct signer_event {
static unsigned int keycount = 0;
static const char *directory;
static unsigned int ntasks = 0;
if (printstats) { \
counter++; \
if (bit != 0)
static signer_key_t *
return (key);
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
return (ISC_TRUE);
return (ISC_FALSE);
int arraysize;
if (!nosigs)
for (i = 0; i < arraysize; i++)
if (nosigs)
sigstr);
sigstr);
if (!expired)
} else if (!expired) {
if (keep) {
&tuple);
if (resign) {
isc_buffer_t b;
&tuple);
isc_buffer_t b;
&tuple);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
isc_buffer_t b;
if (isc_buffer_availablelength(&b) == 0) {
isc_buffer_putuint8(&b, 0);
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
static isc_boolean_t
return (ISC_FALSE);
goto failure;
goto failure;
goto failure;
goto failure;
goto failure;
return (found);
isc_buffer_t b;
static int warnwild = 0;
if (warnwild++ == 0) {
program);
if (!atorigin) {
NULL);
if (isdelegation) {
NULL);
} else if (childkey) {
if (neednullkey)
goto skip;
goto skip;
if (isdelegation) {
goto skip;
if (neednullkey)
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
soattl(void) {
return (ttl);
if (destroy) {
covers);
presign() {
postsign(void) {
static isc_result_t
goto out;
&rdsiter);
sizeof(dns_name_t));
out:
return (result);
assigned++;
completed++;
isc_buffer_t b;
int len;
unsigned int nkeys, i;
for (i = 0; i < nkeys; i++) {
&pubkey);
goto next;
goto next;
next:
usage(void) {
exit(0);
int i, ch;
char *endp;
unsigned int eflags;
switch (ch) {
usage();
if (!pseudorandom)
if (ntasks == 0)
usage();
if (argc == 0) {
for (i = 0; i < argc; i++) {
usage();
argv[i]);
program);
for (i = 0; i < (int)ntasks; i++) {
if (printstats)
presign();
(void)isc_app_run();
if (!finished)
for (i = 0; i < (int)ntasks; i++)
postsign();
if (printstats)
if (free_output)
(void) isc_app_finish();
if (printstats) {
nsigned);
ndropped);