summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-28 23:55:49 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-28 23:58:40 +0100
commit7559d59bae11f5f0f26eed8fae8527a0b366271e (patch)
treed7083832a20266105f47fcbf51863abcf64ff050 /src
parent2a205cd7ca3de576fc340fbaceac27e6765fd752 (diff)
downloadgnutls-7559d59bae11f5f0f26eed8fae8527a0b366271e.tar.gz
removed unused variables.
Diffstat (limited to 'src')
-rw-r--r--src/danetool-args.c235
-rw-r--r--src/danetool-args.def15
-rw-r--r--src/danetool-args.h42
-rw-r--r--src/danetool.c26
4 files changed, 110 insertions, 208 deletions
diff --git a/src/danetool-args.c b/src/danetool-args.c
index c3ce5040ad..03036ba1cc 100644
--- a/src/danetool-args.c
+++ b/src/danetool-args.c
@@ -2,7 +2,7 @@
*
* DO NOT EDIT THIS FILE (danetool-args.c)
*
- * It has been AutoGen-ed October 13, 2012 at 10:33:32 PM by AutoGen 5.16
+ * It has been AutoGen-ed October 28, 2012 at 11:58:30 PM by AutoGen 5.16
* From the definitions danetool-args.def
* and the template file options
*
@@ -67,7 +67,7 @@ extern FILE * option_usage_fp;
/*
* danetool option static const strings
*/
-static char const danetool_opt_strs[2262] =
+static char const danetool_opt_strs[2152] =
/* 0 */ "danetool @VERSION@\n"
"Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
@@ -111,48 +111,43 @@ static char const danetool_opt_strs[2262] =
/* 1226 */ "no\0"
/* 1229 */ "This is an alias for 'inder'\0"
/* 1258 */ "inraw\0"
-/* 1264 */ "Use DER format for output certificates and private keys\0"
-/* 1320 */ "OUTDER\0"
-/* 1327 */ "no-outder\0"
-/* 1337 */ "This is an alias for 'outder'\0"
-/* 1367 */ "outraw\0"
-/* 1374 */ "Print the DANE RR data on a certificate or public key\0"
-/* 1428 */ "TLSA_RR\0"
-/* 1436 */ "tlsa-rr\0"
-/* 1444 */ "Specify the hostname to be used in the DANE RR\0"
-/* 1491 */ "HOST\0"
-/* 1496 */ "host\0"
-/* 1501 */ "The protocol set for DANE data (tcp, udp etc.)\0"
-/* 1548 */ "PROTO\0"
-/* 1554 */ "proto\0"
-/* 1560 */ "Specify the port number for the DANE data.\0"
-/* 1603 */ "PORT\0"
-/* 1608 */ "port\0"
-/* 1613 */ "Whether the provided certificate or public key is a Certificate\n"
+/* 1264 */ "Print the DANE RR data on a certificate or public key\0"
+/* 1318 */ "TLSA_RR\0"
+/* 1326 */ "tlsa-rr\0"
+/* 1334 */ "Specify the hostname to be used in the DANE RR\0"
+/* 1381 */ "HOST\0"
+/* 1386 */ "host\0"
+/* 1391 */ "The protocol set for DANE data (tcp, udp etc.)\0"
+/* 1438 */ "PROTO\0"
+/* 1444 */ "proto\0"
+/* 1450 */ "Specify the port number for the DANE data.\0"
+/* 1493 */ "PORT\0"
+/* 1498 */ "port\0"
+/* 1503 */ "Whether the provided certificate or public key is a Certificate\n"
"authority.\0"
-/* 1688 */ "CA\0"
-/* 1691 */ "ca\0"
-/* 1694 */ "Use the hash of the X.509 certificate, rather than the public key.\0"
-/* 1761 */ "X509\0"
-/* 1766 */ "x509\0"
-/* 1771 */ "The provided certificate or public key is a local entity.\0"
-/* 1829 */ "LOCAL\0"
-/* 1835 */ "local\0"
-/* 1841 */ "Display extended usage information and exit\0"
-/* 1885 */ "help\0"
-/* 1890 */ "Extended usage information passed thru pager\0"
-/* 1935 */ "more-help\0"
-/* 1945 */ "Output version information and exit\0"
-/* 1981 */ "version\0"
-/* 1989 */ "DANETOOL\0"
-/* 1998 */ "danetool - GnuTLS DANE tool - Ver. @VERSION@\n"
+/* 1578 */ "CA\0"
+/* 1581 */ "ca\0"
+/* 1584 */ "Use the hash of the X.509 certificate, rather than the public key.\0"
+/* 1651 */ "X509\0"
+/* 1656 */ "x509\0"
+/* 1661 */ "The provided certificate or public key is a local entity.\0"
+/* 1719 */ "LOCAL\0"
+/* 1725 */ "local\0"
+/* 1731 */ "Display extended usage information and exit\0"
+/* 1775 */ "help\0"
+/* 1780 */ "Extended usage information passed thru pager\0"
+/* 1825 */ "more-help\0"
+/* 1835 */ "Output version information and exit\0"
+/* 1871 */ "version\0"
+/* 1879 */ "DANETOOL\0"
+/* 1888 */ "danetool - GnuTLS DANE tool - Ver. @VERSION@\n"
"USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
-/* 2101 */ "bug-gnutls@gnu.org\0"
-/* 2120 */ "\n\n\0"
-/* 2123 */ "\n"
+/* 1991 */ "bug-gnutls@gnu.org\0"
+/* 2010 */ "\n\n\0"
+/* 2013 */ "\n"
"Tool generate DNS resource records for the DANE protocol.\n\0"
-/* 2183 */ "danetool @VERSION@\0"
-/* 2202 */ "danetool [options]\n"
+/* 2073 */ "danetool @VERSION@\0"
+/* 2092 */ "danetool [options]\n"
"danetool --help for usage instructions.\n";
/*
@@ -236,30 +231,12 @@ static char const danetool_opt_strs[2262] =
#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS)
/*
- * outder option description:
- */
-#define OUTDER_DESC (danetool_opt_strs+1264)
-#define OUTDER_NAME (danetool_opt_strs+1320)
-#define NOT_OUTDER_name (danetool_opt_strs+1327)
-#define NOT_OUTDER_PFX (danetool_opt_strs+1226)
-#define OUTDER_name (NOT_OUTDER_name + 3)
-#define OUTDER_FLAGS (OPTST_DISABLED)
-
-/*
- * outraw option description:
- */
-#define OUTRAW_DESC (danetool_opt_strs+1337)
-#define OUTRAW_NAME NULL
-#define OUTRAW_name (danetool_opt_strs+1367)
-#define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS)
-
-/*
* tlsa-rr option description with
* "Must also have options" and "Incompatible options":
*/
-#define TLSA_RR_DESC (danetool_opt_strs+1374)
-#define TLSA_RR_NAME (danetool_opt_strs+1428)
-#define TLSA_RR_name (danetool_opt_strs+1436)
+#define TLSA_RR_DESC (danetool_opt_strs+1264)
+#define TLSA_RR_NAME (danetool_opt_strs+1318)
+#define TLSA_RR_name (danetool_opt_strs+1326)
static int const aTlsa_RrMustList[] = {
INDEX_OPT_HOST, NO_EQUIVALENT };
#define TLSA_RR_FLAGS (OPTST_DISABLED)
@@ -267,62 +244,62 @@ static int const aTlsa_RrMustList[] = {
/*
* host option description:
*/
-#define HOST_DESC (danetool_opt_strs+1444)
-#define HOST_NAME (danetool_opt_strs+1491)
-#define HOST_name (danetool_opt_strs+1496)
+#define HOST_DESC (danetool_opt_strs+1334)
+#define HOST_NAME (danetool_opt_strs+1381)
+#define HOST_name (danetool_opt_strs+1386)
#define HOST_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* proto option description:
*/
-#define PROTO_DESC (danetool_opt_strs+1501)
-#define PROTO_NAME (danetool_opt_strs+1548)
-#define PROTO_name (danetool_opt_strs+1554)
+#define PROTO_DESC (danetool_opt_strs+1391)
+#define PROTO_NAME (danetool_opt_strs+1438)
+#define PROTO_name (danetool_opt_strs+1444)
#define PROTO_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* port option description:
*/
-#define PORT_DESC (danetool_opt_strs+1560)
-#define PORT_NAME (danetool_opt_strs+1603)
-#define PORT_name (danetool_opt_strs+1608)
+#define PORT_DESC (danetool_opt_strs+1450)
+#define PORT_NAME (danetool_opt_strs+1493)
+#define PORT_name (danetool_opt_strs+1498)
#define PORT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* ca option description:
*/
-#define CA_DESC (danetool_opt_strs+1613)
-#define CA_NAME (danetool_opt_strs+1688)
-#define CA_name (danetool_opt_strs+1691)
+#define CA_DESC (danetool_opt_strs+1503)
+#define CA_NAME (danetool_opt_strs+1578)
+#define CA_name (danetool_opt_strs+1581)
#define CA_FLAGS (OPTST_DISABLED)
/*
* x509 option description:
*/
-#define X509_DESC (danetool_opt_strs+1694)
-#define X509_NAME (danetool_opt_strs+1761)
-#define X509_name (danetool_opt_strs+1766)
+#define X509_DESC (danetool_opt_strs+1584)
+#define X509_NAME (danetool_opt_strs+1651)
+#define X509_name (danetool_opt_strs+1656)
#define X509_FLAGS (OPTST_DISABLED)
/*
* local option description:
*/
-#define LOCAL_DESC (danetool_opt_strs+1771)
-#define LOCAL_NAME (danetool_opt_strs+1829)
-#define LOCAL_name (danetool_opt_strs+1835)
+#define LOCAL_DESC (danetool_opt_strs+1661)
+#define LOCAL_NAME (danetool_opt_strs+1719)
+#define LOCAL_name (danetool_opt_strs+1725)
#define LOCAL_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (danetool_opt_strs+1841)
-#define HELP_name (danetool_opt_strs+1885)
+#define HELP_DESC (danetool_opt_strs+1731)
+#define HELP_name (danetool_opt_strs+1775)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (danetool_opt_strs+1890)
-#define MORE_HELP_name (danetool_opt_strs+1935)
+#define MORE_HELP_DESC (danetool_opt_strs+1780)
+#define MORE_HELP_name (danetool_opt_strs+1825)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC NULL
@@ -335,8 +312,8 @@ static int const aTlsa_RrMustList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (danetool_opt_strs+1945)
-#define VER_name (danetool_opt_strs+1981)
+#define VER_DESC (danetool_opt_strs+1835)
+#define VER_name (danetool_opt_strs+1871)
/*
* Declare option callback procedures
*/
@@ -346,7 +323,7 @@ extern tOptProc
optionStackArg, optionTimeDate, optionTimeVal,
optionUnstackArg, optionVendorOption;
static tOptProc
- doOptDebug, doOptInfile, doOptInraw, doOptOutraw, doUsageOpt;
+ doOptDebug, doOptInfile, doOptInraw, doUsageOpt;
#define VER_PROC optionPrintVersion
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -464,32 +441,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name,
/* disablement strs */ 0, 0 },
- { /* entry idx, value */ 9, VALUE_OPT_OUTDER,
- /* equiv idx, value */ 9, VALUE_OPT_OUTDER,
- /* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OUTDER_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --outder */
- /* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ OUTDER_DESC, OUTDER_NAME, OUTDER_name,
- /* disablement strs */ NOT_OUTDER_name, NOT_OUTDER_PFX },
-
- { /* entry idx, value */ 10, VALUE_OPT_OUTRAW,
- /* equiv idx, value */ 10, VALUE_OPT_OUTRAW,
- /* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OUTRAW_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --outraw */
- /* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
- /* option proc */ doOptOutraw,
- /* desc, NAME, name */ OUTRAW_DESC, OUTRAW_NAME, OUTRAW_name,
- /* disablement strs */ 0, 0 },
-
- { /* entry idx, value */ 11, VALUE_OPT_TLSA_RR,
- /* equiv idx, value */ 11, VALUE_OPT_TLSA_RR,
+ { /* entry idx, value */ 9, VALUE_OPT_TLSA_RR,
+ /* equiv idx, value */ 9, VALUE_OPT_TLSA_RR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ TLSA_RR_FLAGS, 0,
@@ -500,8 +453,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ TLSA_RR_DESC, TLSA_RR_NAME, TLSA_RR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_HOST,
- /* equiv idx, value */ 12, VALUE_OPT_HOST,
+ { /* entry idx, value */ 10, VALUE_OPT_HOST,
+ /* equiv idx, value */ 10, VALUE_OPT_HOST,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ HOST_FLAGS, 0,
@@ -512,8 +465,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ HOST_DESC, HOST_NAME, HOST_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 13, VALUE_OPT_PROTO,
- /* equiv idx, value */ 13, VALUE_OPT_PROTO,
+ { /* entry idx, value */ 11, VALUE_OPT_PROTO,
+ /* equiv idx, value */ 11, VALUE_OPT_PROTO,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROTO_FLAGS, 0,
@@ -524,8 +477,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PROTO_DESC, PROTO_NAME, PROTO_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 14, VALUE_OPT_PORT,
- /* equiv idx, value */ 14, VALUE_OPT_PORT,
+ { /* entry idx, value */ 12, VALUE_OPT_PORT,
+ /* equiv idx, value */ 12, VALUE_OPT_PORT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PORT_FLAGS, 0,
@@ -536,8 +489,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 15, VALUE_OPT_CA,
- /* equiv idx, value */ 15, VALUE_OPT_CA,
+ { /* entry idx, value */ 13, VALUE_OPT_CA,
+ /* equiv idx, value */ 13, VALUE_OPT_CA,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ CA_FLAGS, 0,
@@ -548,8 +501,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ CA_DESC, CA_NAME, CA_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_X509,
- /* equiv idx, value */ 16, VALUE_OPT_X509,
+ { /* entry idx, value */ 14, VALUE_OPT_X509,
+ /* equiv idx, value */ 14, VALUE_OPT_X509,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ X509_FLAGS, 0,
@@ -560,8 +513,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ X509_DESC, X509_NAME, X509_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_LOCAL,
- /* equiv idx, value */ 17, VALUE_OPT_LOCAL,
+ { /* entry idx, value */ 15, VALUE_OPT_LOCAL,
+ /* equiv idx, value */ 15, VALUE_OPT_LOCAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOCAL_FLAGS, 0,
@@ -616,14 +569,14 @@ static tOptDesc optDesc[OPTION_CT] = {
*
* Define the danetool Option Environment
*/
-#define zPROGNAME (danetool_opt_strs+1989)
-#define zUsageTitle (danetool_opt_strs+1998)
+#define zPROGNAME (danetool_opt_strs+1879)
+#define zUsageTitle (danetool_opt_strs+1888)
#define zRcName NULL
#define apzHomeList NULL
-#define zBugsAddr (danetool_opt_strs+2101)
-#define zExplain (danetool_opt_strs+2120)
-#define zDetail (danetool_opt_strs+2123)
-#define zFullVersion (danetool_opt_strs+2183)
+#define zBugsAddr (danetool_opt_strs+1991)
+#define zExplain (danetool_opt_strs+2010)
+#define zDetail (danetool_opt_strs+2013)
+#define zFullVersion (danetool_opt_strs+2073)
/* extracted from optcode.tlib near line 350 */
#if defined(ENABLE_NLS)
@@ -637,7 +590,7 @@ static tOptDesc optDesc[OPTION_CT] = {
#define danetool_full_usage (NULL)
-#define danetool_short_usage (danetool_opt_strs+2202)
+#define danetool_short_usage (danetool_opt_strs+2092)
#endif /* not defined __doxygen__ */
@@ -732,22 +685,6 @@ doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc)
USAGE(DANETOOL_EXIT_FAILURE);
}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/**
- * Code to handle the outraw option.
- *
- * @param pOptions the danetool options data structure
- * @param pOptDesc the option descriptor for this option.
- */
-static void
-doOptOutraw(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_OUTDER);
- if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
- USAGE(DANETOOL_EXIT_FAILURE);
-
-}
/* extracted from optmain.tlib near line 1113 */
/**
@@ -812,7 +749,7 @@ tOptions danetoolOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 21 /* full option count */, 18 /* user option count */,
+ 19 /* full option count */, 16 /* user option count */,
danetool_full_usage, danetool_short_usage,
NULL, NULL,
PKGDATADIR, danetool_packager_info
diff --git a/src/danetool-args.def b/src/danetool-args.def
index d6578043e4..25102307ed 100644
--- a/src/danetool-args.def
+++ b/src/danetool-args.def
@@ -6,7 +6,7 @@ detail = "Tool generate DNS resource records for the DANE protocol.";
short-usage = "danetool [options]\ndanetool --help for usage instructions.\n";
explain = "";
-#define INFILE_OPT 1
+#define INFILE_OPT 0
#define OUTFILE_OPT 1
#define VERBOSE_OPT 1
#include args-std.def
@@ -48,19 +48,6 @@ flag = {
};
flag = {
- name = outder;
- descrip = "Use DER format for output certificates and private keys";
- disabled;
- disable = "no";
- doc = "The output will be in DER or RAW format.";
-};
-
-flag = {
- name = outraw;
- aliases = outder;
-};
-
-flag = {
name = tlsa-rr;
descrip = "Print the DANE RR data on a certificate or public key";
flags_must = host;
diff --git a/src/danetool-args.h b/src/danetool-args.h
index de3da54f42..7c6747fd55 100644
--- a/src/danetool-args.h
+++ b/src/danetool-args.h
@@ -2,7 +2,7 @@
*
* DO NOT EDIT THIS FILE (danetool-args.h)
*
- * It has been AutoGen-ed October 13, 2012 at 10:33:32 PM by AutoGen 5.16
+ * It has been AutoGen-ed October 28, 2012 at 11:58:30 PM by AutoGen 5.16
* From the definitions danetool-args.def
* and the template file options
*
@@ -76,21 +76,19 @@ typedef enum {
INDEX_OPT_HASH = 6,
INDEX_OPT_INDER = 7,
INDEX_OPT_INRAW = 8,
- INDEX_OPT_OUTDER = 9,
- INDEX_OPT_OUTRAW = 10,
- INDEX_OPT_TLSA_RR = 11,
- INDEX_OPT_HOST = 12,
- INDEX_OPT_PROTO = 13,
- INDEX_OPT_PORT = 14,
- INDEX_OPT_CA = 15,
- INDEX_OPT_X509 = 16,
- INDEX_OPT_LOCAL = 17,
- INDEX_OPT_VERSION = 18,
- INDEX_OPT_HELP = 19,
- INDEX_OPT_MORE_HELP = 20
+ INDEX_OPT_TLSA_RR = 9,
+ INDEX_OPT_HOST = 10,
+ INDEX_OPT_PROTO = 11,
+ INDEX_OPT_PORT = 12,
+ INDEX_OPT_CA = 13,
+ INDEX_OPT_X509 = 14,
+ INDEX_OPT_LOCAL = 15,
+ INDEX_OPT_VERSION = 16,
+ INDEX_OPT_HELP = 17,
+ INDEX_OPT_MORE_HELP = 18
} teOptIndex;
-#define OPTION_CT 21
+#define OPTION_CT 19
#define DANETOOL_VERSION "@VERSION@"
#define DANETOOL_FULL_VERSION "danetool @VERSION@"
@@ -139,17 +137,15 @@ typedef enum {
#define VALUE_OPT_HASH 6
#define VALUE_OPT_INDER 7
#define VALUE_OPT_INRAW 8
-#define VALUE_OPT_OUTDER 9
-#define VALUE_OPT_OUTRAW 10
-#define VALUE_OPT_TLSA_RR 11
-#define VALUE_OPT_HOST 12
-#define VALUE_OPT_PROTO 13
-#define VALUE_OPT_PORT 14
+#define VALUE_OPT_TLSA_RR 9
+#define VALUE_OPT_HOST 10
+#define VALUE_OPT_PROTO 11
+#define VALUE_OPT_PORT 12
#define OPT_VALUE_PORT (DESC(PORT).optArg.argInt)
-#define VALUE_OPT_CA 15
-#define VALUE_OPT_X509 16
-#define VALUE_OPT_LOCAL 17
+#define VALUE_OPT_CA 13
+#define VALUE_OPT_X509 14
+#define VALUE_OPT_LOCAL 15
#define VALUE_OPT_HELP 'h'
#define VALUE_OPT_MORE_HELP '!'
#define VALUE_OPT_VERSION 'v'
diff --git a/src/danetool.c b/src/danetool.c
index 55b4cb8be8..2014cd603c 100644
--- a/src/danetool.c
+++ b/src/danetool.c
@@ -54,9 +54,7 @@ static void dane_info(const char* host, const char* proto, unsigned int port,
unsigned int ca, unsigned int local, common_info_st * cinfo);
FILE *outfile;
-FILE *infile;
static gnutls_digest_algorithm_t default_dig;
-static unsigned int incert_format, outcert_format;
/* non interactive operation if set
*/
@@ -96,25 +94,6 @@ cmd_parser (int argc, char **argv)
else
outfile = stdout;
- if (HAVE_OPT(INFILE))
- {
- infile = fopen (OPT_ARG(INFILE), "rb");
- if (infile == NULL)
- error (EXIT_FAILURE, errno, "%s", OPT_ARG(INFILE));
- }
- else
- infile = stdin;
-
- if (HAVE_OPT(INDER) || HAVE_OPT(INRAW))
- incert_format = GNUTLS_X509_FMT_DER;
- else
- incert_format = GNUTLS_X509_FMT_PEM;
-
- if (HAVE_OPT(OUTDER) || HAVE_OPT(OUTRAW))
- outcert_format = GNUTLS_X509_FMT_DER;
- else
- outcert_format = GNUTLS_X509_FMT_PEM;
-
default_dig = GNUTLS_DIG_UNKNOWN;
if (HAVE_OPT(HASH))
{
@@ -157,7 +136,10 @@ cmd_parser (int argc, char **argv)
memset (&cinfo, 0, sizeof (cinfo));
- cinfo.incert_format = incert_format;
+ if (HAVE_OPT(INDER) || HAVE_OPT(INRAW))
+ cinfo.incert_format = GNUTLS_X509_FMT_DER;
+ else
+ cinfo.incert_format = GNUTLS_X509_FMT_PEM;
if (HAVE_OPT(VERBOSE))
cinfo.verbose = 1;