dnssec-revoke.c revision cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88
/*
* Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
*
* 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: dnssec-revoke.c,v 1.2 2009/06/30 02:52:32 each Exp $ */
/*! \file */
#include <config.h>
#include <libgen.h>
#include <stdlib.h>
#include <unistd.h>
#include <isc/commandline.h>
#include <dns/keyvalues.h>
#include "dnssectool.h"
const char *program = "dnssec-revoke";
int verbose;
static void
usage(void) {
"creating revoked version\n");
"K<name>+<alg>+<new id>.private\n");
exit (-1);
}
int
char keystr[KEY_FORMATSIZE];
char *endp;
int ch;
if (argc == 1)
usage();
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
switch (ch) {
case 'd':
break;
case 'f':
break;
case 'r':
break;
case 'v':
if (*endp != '\0')
fatal("-v must be followed by a number");
break;
case '?':
if (isc_commandline_option != '?')
/* Falls into */
case 'h':
usage();
default:
exit(1);
}
}
fatal("The key file name was not specified");
fatal("Extraneous arguments");
if (result != ISC_R_SUCCESS)
fatal("Could not initialize hash");
if (result != ISC_R_SUCCESS)
fatal("Could not initialize dst");
if (result != ISC_R_SUCCESS)
fatal("Invalid keyfile name %s: %s",
if (verbose > 2) {
char keystr[KEY_FORMATSIZE];
}
if ((flags & DNS_KEYFLAG_REVOKE) == 0) {
fatal("Key file %s already exists; "
"use -f to force overwrite", newname);
}
dir);
if (result != ISC_R_SUCCESS) {
}
/*
* Remove old key file, if told to (and if
* it isn't the same as the new file)
*/
goto cleanup;
}
} else {
}
dst_key_free(&key);
if (verbose > 10)
return (0);
}