signer.c revision edcd1247ad7e81bb8b430e610d9718f64c70f05d
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Permission to use, copy, modify, and distribute this software for any
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct signer_key_struct {
struct signer_array_struct {
int verbose;
isc_buffer_t b;
isc_region_t r;
isc_buffer_used(&b, &r);
return (char *) r.base;
isc_buffer_t b;
isc_region_t r;
isc_buffer_used(&b, &r);
return (char *) r.base;
isc_buffer_t b;
isc_region_t r;
isc_buffer_used(&b, &r);
return (char *) r.base;
if (bit)
static inline isc_boolean_t
static inline isc_boolean_t
isc_buffer_t b;
static signer_key_t *
char *keyname;
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 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) {
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) {
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);
lastcut);
if (!atorigin) {
0, &rdsiter);
sizeof(dns_name_t));
int len;
unsigned int nkeys, i;
for (i = 0; i < nkeys; i++) {
static isc_stdtime_t
usage() {
exit(0);
int i, ch;
char *endp;
switch (ch) {
usage();
if (verbose > 0) {
== ISC_R_SUCCESS);
usage();
if (argc == 0) {
for (i = 0; i < argc; i++) {
*algstr++ = 0;
if (s != NULL) {
algstr = s;
alg = 0;
if (alg == 0)