/*
* Copyright (C) 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*! \file */
#include <config.h>
#include <stdlib.h>
#include <time.h>
#include <isc/commandline.h>
#include <dns/dbiterator.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
#include <dns/masterdump.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdataclass.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#include <dns/rdatatype.h>
#ifdef PKCS11CRYPTO
#endif
#include "dnssectool.h"
int verbose;
/*%
* Load the zone file from disk
*/
static void
isc_buffer_t b;
int len;
isc_buffer_add(&b, len);
if (result != ISC_R_SUCCESS)
fatal("failed converting name '%s' to dns format: %s",
switch (result) {
case DNS_R_SEENINCLUDE:
case ISC_R_SUCCESS:
break;
case DNS_R_NOTZONETOP:
/*
* Comparing pointers (vs. using strcmp()) is intentional: we
* want to check whether -o was supplied on the command line,
* not whether origin and file contain the same string.
*/
fatal("failed loading zone '%s' from file '%s': "
"use -o to specify a different zone origin",
}
/* FALLTHROUGH */
default:
fatal("failed loading zone from '%s': %s",
}
}
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
#if defined(PKCS11CRYPTO)
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
"(default is \"pkcs11\")\n");
#else
#endif
"not ZSKs\n");
exit(0);
}
int
#ifdef USE_PKCS11
#else
#endif
char *endp;
int ch;
#define CMDLINE_FLAGS \
"hm:o:I:c:E:v:Vxz"
/*
* Process memory debugging argument first.
*/
switch (ch) {
case 'm':
break;
default:
break;
}
}
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#ifdef PKCS11CRYPTO
#endif
switch (ch) {
case 'c':
break;
case 'E':
break;
case 'I':
break;
case 'm':
break;
case 'o':
break;
case 'v':
if (*endp != '\0')
fatal("verbose level must be numeric");
break;
case 'x':
break;
case 'z':
break;
case '?':
if (isc_commandline_option != '?')
/* FALLTHROUGH */
case 'h':
/* Does not return. */
usage();
case 'V':
/* Does not return. */
default:
exit(1);
}
}
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
if (argc < 1)
usage();
argc -= 1;
argv += 1;
if (inputformatstr != NULL) {
else
}
dns_db_detach(&gdb);
if (verbose > 10)
(void) isc_app_finish();
return (0);
}