dnssectool.c revision 26d8ffe715e74d1e67d268551449b780fec1b95f
/*
* Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.49 2009/07/19 23:47:55 tbox Exp $ */
/*! \file */
/*%
* DNSSEC Support Routines.
*/
#include <config.h>
#include <stdlib.h>
#include <dns/rdatastruct.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include "dnssectool.h"
extern int verbose;
extern const char *program;
typedef struct entropysource entropysource_t;
struct entropysource {
};
void
if (fatalcallback != NULL)
(*fatalcallback)();
exit(1);
}
void
}
void
if (result != ISC_R_SUCCESS)
}
void
return;
}
void
isc_buffer_t b;
isc_region_t r;
isc_buffer_usedregion(&b, &r);
}
void
isc_buffer_t b;
isc_region_t r;
isc_buffer_usedregion(&b, &r);
}
void
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
}
void
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
}
void
int level;
if (verbose < 0)
verbose = 0;
switch (verbose) {
case 0:
/*
* We want to see warnings about things like out-of-zone
* data in the master file even when not verbose.
*/
break;
case 1:
break;
default:
break;
}
/*
* Set up a channel similar to default_stderr except:
* - the logging level is passed in
* - the program name and logging level are printed
* - no time stamp is printed
*/
}
void
return;
}
void
if (result != ISC_R_SUCCESS)
fatal("could not create entropy object");
}
randomfile = NULL;
}
if (result != ISC_R_SUCCESS)
fatal("could not initialize entropy source: %s",
fatal("out of memory");
}
}
void
while (!ISC_LIST_EMPTY(sources)) {
}
}
static isc_stdtime_t
switch(suffix) {
case 'Y': case 'y':
case 'M': case 'm':
case 'W': case 'w':
case 'D': case 'd':
case 'H': case 'h':
return (offset * 3600);
case 'S': case 's': case '\0':
return (offset);
default:
}
return(0); /* silence compiler warning */
}
char *endp;
return ((isc_stdtime_t) 0);
str += 3;
}
if (str[0] == '\0')
return ((isc_stdtime_t) base);
else if (str[0] == '+') {
} else if (str[0] == '-') {
char timestr[15];
if (result != ISC_R_SUCCESS)
} else {
if (result != ISC_R_SUCCESS)
}
return ((isc_stdtime_t) val);
}
strtoclass(const char *str) {
return dns_rdataclass_in;
if (ret != ISC_R_SUCCESS)
return (rdclass);
}