Commit a177b07d authored by Tony Finch's avatar Tony Finch Committed by Evan Hunt
Browse files

bin/dnssec: move a little boilerplate into shared code

parent 42ed7e43
......@@ -59,12 +59,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-cds";
int verbose;
/*
* Infrastructure
......
......@@ -47,12 +47,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-dsfromkey";
int verbose;
static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;
......
......@@ -46,12 +46,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-importkey";
int verbose;
static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;
......
......@@ -46,7 +46,6 @@
#define MAX_RSA 4096 /* should be long enough... */
const char *program = "dnssec-keyfromlabel";
int verbose;
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
......
......@@ -61,7 +61,6 @@
#define MAX_RSA 4096 /* should be long enough... */
const char *program = "dnssec-keygen";
int verbose;
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
......
......@@ -37,7 +37,6 @@
#include "dnssectool.h"
const char *program = "dnssec-revoke";
int verbose;
static isc_mem_t *mctx = NULL;
......
......@@ -40,7 +40,6 @@
#include "dnssectool.h"
const char *program = "dnssec-settime";
int verbose;
static isc_mem_t *mctx = NULL;
......
......@@ -86,12 +86,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-signzone";
int verbose;
typedef struct hashlist hashlist_t;
......
......@@ -67,7 +67,6 @@
#include "dnssectool.h"
const char *program = "dnssec-verify";
int verbose;
static isc_stdtime_t now;
static isc_mem_t *mctx = NULL;
......
......@@ -57,8 +57,7 @@
#include "dnssectool.h"
extern int verbose;
extern const char *program;
int verbose;
static fatalcallback_t *fatalcallback = NULL;
......
......@@ -21,6 +21,16 @@
#include <dns/rdatastruct.h>
#include <dst/dst.h>
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
/*! verbosity: set by -v option in each program, defined in dnssectool.c */
extern int verbose;
/*! program name, statically initialized in each program */
extern const char *program;
typedef void (fatalcallback_t)(void);
ISC_PLATFORM_NORETURN_PRE void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment