From: Nikos Mavrogiannopoulos Date: Tue, 5 Nov 2013 20:01:32 +0000 (+0100) Subject: removed autogenerated files X-Git-Tag: gnutls_3_2_7~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a2df234e768c88ed931032cc2baf83fdb6e3fb1;p=thirdparty%2Fgnutls.git removed autogenerated files --- diff --git a/src/certtool-args.c b/src/certtool-args.c deleted file mode 100644 index 300fa77505..0000000000 --- a/src/certtool-args.c +++ /dev/null @@ -1,1945 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (certtool-args.c) - * - * It has been AutoGen-ed October 31, 2013 at 10:37:31 AM by AutoGen 5.17 - * From the definitions certtool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the certtool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The certtool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * certtool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * certtool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "certtool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; - -/* TRANSLATORS: choose the translation for option names wisely because you - cannot ever change your mind. */ -#define zCopyright (certtool_opt_strs+0) -#define zLicenseDescrip (certtool_opt_strs+279) - - -#ifndef NULL -# define NULL 0 -#endif - -/* - * certtool option static const strings - */ -static char const certtool_opt_strs[4877] = -/* 0 */ "certtool @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" - "redistribution under the terms of the\n" - "GNU General Public License, version 3 or later\n" - " \n\0" -/* 279 */ "certtool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "certtool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 884 */ "Enable debugging.\0" -/* 902 */ "DEBUG\0" -/* 908 */ "debug\0" -/* 914 */ "More verbose output\0" -/* 934 */ "VERBOSE\0" -/* 942 */ "verbose\0" -/* 950 */ "Input file\0" -/* 961 */ "INFILE\0" -/* 968 */ "infile\0" -/* 975 */ "Output file\0" -/* 987 */ "OUTFILE\0" -/* 995 */ "outfile\0" -/* 1003 */ "Generate a self-signed certificate\0" -/* 1038 */ "GENERATE_SELF_SIGNED\0" -/* 1059 */ "generate-self-signed\0" -/* 1080 */ "Generate a signed certificate\0" -/* 1110 */ "GENERATE_CERTIFICATE\0" -/* 1131 */ "generate-certificate\0" -/* 1152 */ "Generates a proxy certificate\0" -/* 1182 */ "GENERATE_PROXY\0" -/* 1197 */ "generate-proxy\0" -/* 1212 */ "Generate a CRL\0" -/* 1227 */ "GENERATE_CRL\0" -/* 1240 */ "generate-crl\0" -/* 1253 */ "Update a signed certificate\0" -/* 1281 */ "UPDATE_CERTIFICATE\0" -/* 1300 */ "update-certificate\0" -/* 1319 */ "Generate a private key\0" -/* 1342 */ "GENERATE_PRIVKEY\0" -/* 1359 */ "generate-privkey\0" -/* 1376 */ "Generate a PKCS #10 certificate request\0" -/* 1416 */ "GENERATE_REQUEST\0" -/* 1433 */ "generate-request\0" -/* 1450 */ "Verify a PEM encoded certificate chain.\0" -/* 1490 */ "VERIFY_CHAIN\0" -/* 1503 */ "verify-chain\0" -/* 1516 */ "Verify a PEM encoded certificate chain using a trusted list.\0" -/* 1577 */ "VERIFY\0" -/* 1584 */ "verify\0" -/* 1591 */ "Verify a CRL using a trusted list.\0" -/* 1626 */ "VERIFY_CRL\0" -/* 1637 */ "verify-crl\0" -/* 1648 */ "Generate PKCS #3 encoded Diffie-Hellman parameters.\0" -/* 1700 */ "GENERATE_DH_PARAMS\0" -/* 1719 */ "generate-dh-params\0" -/* 1738 */ "Get the included PKCS #3 encoded Diffie-Hellman parameters.\0" -/* 1798 */ "GET_DH_PARAMS\0" -/* 1812 */ "get-dh-params\0" -/* 1826 */ "Print information PKCS #3 encoded Diffie-Hellman parameters\0" -/* 1886 */ "DH_INFO\0" -/* 1894 */ "dh-info\0" -/* 1902 */ "Loads a private key file\0" -/* 1927 */ "LOAD_PRIVKEY\0" -/* 1940 */ "load-privkey\0" -/* 1953 */ "Loads a public key file\0" -/* 1977 */ "LOAD_PUBKEY\0" -/* 1989 */ "load-pubkey\0" -/* 2001 */ "Loads a certificate request file\0" -/* 2034 */ "LOAD_REQUEST\0" -/* 2047 */ "load-request\0" -/* 2060 */ "Loads a certificate file\0" -/* 2085 */ "LOAD_CERTIFICATE\0" -/* 2102 */ "load-certificate\0" -/* 2119 */ "Loads the certificate authority's private key file\0" -/* 2170 */ "LOAD_CA_PRIVKEY\0" -/* 2186 */ "load-ca-privkey\0" -/* 2202 */ "Loads the certificate authority's certificate file\0" -/* 2253 */ "LOAD_CA_CERTIFICATE\0" -/* 2273 */ "load-ca-certificate\0" -/* 2293 */ "Password to use\0" -/* 2309 */ "PASSWORD\0" -/* 2318 */ "password\0" -/* 2327 */ "Print big number in an easier format to parse\0" -/* 2373 */ "HEX_NUMBERS\0" -/* 2385 */ "hex-numbers\0" -/* 2397 */ "In certain operations it prints the information is C-friendly format\0" -/* 2466 */ "CPRINT\0" -/* 2473 */ "cprint\0" -/* 2480 */ "Enforce a NULL password\0" -/* 2504 */ "NULL_PASSWORD\0" -/* 2518 */ "null-password\0" -/* 2532 */ "Print information on the given certificate\0" -/* 2575 */ "CERTIFICATE_INFO\0" -/* 2592 */ "certificate-info\0" -/* 2609 */ "Print certificate's public key\0" -/* 2640 */ "CERTIFICATE_PUBKEY\0" -/* 2659 */ "certificate-pubkey\0" -/* 2678 */ "Print information on the given OpenPGP certificate\0" -/* 2729 */ "PGP_CERTIFICATE_INFO\0" -/* 2750 */ "pgp-certificate-info\0" -/* 2771 */ "Print information on the given OpenPGP keyring structure\0" -/* 2828 */ "PGP_RING_INFO\0" -/* 2842 */ "pgp-ring-info\0" -/* 2856 */ "Print information on the given CRL structure\0" -/* 2901 */ "CRL_INFO\0" -/* 2910 */ "crl-info\0" -/* 2919 */ "Print information on the given certificate request\0" -/* 2970 */ "CRQ_INFO\0" -/* 2979 */ "crq-info\0" -/* 2988 */ "Do not use extensions in certificate requests\0" -/* 3034 */ "NO_CRQ_EXTENSIONS\0" -/* 3052 */ "no-crq-extensions\0" -/* 3070 */ "Print information on a PKCS #12 structure\0" -/* 3112 */ "P12_INFO\0" -/* 3121 */ "p12-info\0" -/* 3130 */ "Print information on a PKCS #7 structure\0" -/* 3171 */ "P7_INFO\0" -/* 3179 */ "p7-info\0" -/* 3187 */ "Convert S/MIME to PKCS #7 structure\0" -/* 3223 */ "SMIME_TO_P7\0" -/* 3235 */ "smime-to-p7\0" -/* 3247 */ "Print information on a private key\0" -/* 3282 */ "KEY_INFO\0" -/* 3291 */ "key-info\0" -/* 3300 */ "Print information on an OpenPGP private key\0" -/* 3344 */ "PGP_KEY_INFO\0" -/* 3357 */ "pgp-key-info\0" -/* 3370 */ "Print information on a public key\0" -/* 3404 */ "PUBKEY_INFO\0" -/* 3416 */ "pubkey-info\0" -/* 3428 */ "Generate an X.509 version 1 certificate (with no extensions)\0" -/* 3489 */ "V1\0" -/* 3492 */ "v1\0" -/* 3495 */ "Generate a PKCS #12 structure\0" -/* 3525 */ "TO_P12\0" -/* 3532 */ "to-p12\0" -/* 3539 */ "Generate a PKCS #8 structure\0" -/* 3568 */ "TO_P8\0" -/* 3574 */ "to-p8\0" -/* 3580 */ "Use PKCS #8 format for private keys\0" -/* 3616 */ "PKCS8\0" -/* 3622 */ "pkcs8\0" -/* 3628 */ "Generate RSA key\0" -/* 3645 */ "RSA\0" -/* 3649 */ "rsa\0" -/* 3653 */ "Generate DSA key\0" -/* 3670 */ "DSA\0" -/* 3674 */ "dsa\0" -/* 3678 */ "Generate ECC (ECDSA) key\0" -/* 3703 */ "ECC\0" -/* 3707 */ "ecc\0" -/* 3711 */ "This is an alias for 'ecc'\0" -/* 3738 */ "ecdsa\0" -/* 3744 */ "Hash algorithm to use for signing.\0" -/* 3779 */ "HASH\0" -/* 3784 */ "hash\0" -/* 3789 */ "Use DER format for input certificates and private keys.\0" -/* 3845 */ "INDER\0" -/* 3851 */ "no-inder\0" -/* 3860 */ "no\0" -/* 3863 */ "This is an alias for 'inder'\0" -/* 3892 */ "inraw\0" -/* 3898 */ "Use DER format for output certificates and private keys\0" -/* 3954 */ "OUTDER\0" -/* 3961 */ "no-outder\0" -/* 3971 */ "This is an alias for 'outder'\0" -/* 4001 */ "outraw\0" -/* 4008 */ "Specify the number of bits for key generate\0" -/* 4052 */ "BITS\0" -/* 4057 */ "bits\0" -/* 4062 */ "Specify the security level [low, legacy, normal, high, ultra].\0" -/* 4125 */ "SEC_PARAM\0" -/* 4135 */ "sec-param\0" -/* 4145 */ "No effect\0" -/* 4155 */ "DISABLE_QUICK_RANDOM\0" -/* 4176 */ "disable-quick-random\0" -/* 4197 */ "Template file to use for non-interactive operation\0" -/* 4248 */ "TEMPLATE\0" -/* 4257 */ "template\0" -/* 4266 */ "Cipher to use for PKCS #8 and #12 operations\0" -/* 4311 */ "PKCS_CIPHER\0" -/* 4323 */ "pkcs-cipher\0" -/* 4335 */ "Display extended usage information and exit\0" -/* 4379 */ "help\0" -/* 4384 */ "Extended usage information passed thru pager\0" -/* 4429 */ "more-help\0" -/* 4439 */ "Output version information and exit\0" -/* 4475 */ "version\0" -/* 4483 */ "CERTTOOL\0" -/* 4492 */ "certtool - GnuTLS certificate tool - Ver. @VERSION@\n" - "USAGE: %s [ - [] | --[{=| }] ]...\n\0" -/* 4602 */ "bug-gnutls@gnu.org\0" -/* 4621 */ "\n\n\0" -/* 4624 */ "\n" - "Tool to parse and generate X.509 certificates, requests and private keys.\n" - "It can be used interactively or non interactively by specifying the\n" - "template command line option.\n\0" -/* 4798 */ "certtool @VERSION@\0" -/* 4817 */ "certtool [options]\n" - "certtool --help for usage instructions.\n"; - -/* - * debug option description: - */ -#define DEBUG_DESC (certtool_opt_strs+884) -#define DEBUG_NAME (certtool_opt_strs+902) -#define DEBUG_name (certtool_opt_strs+908) -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * verbose option description: - */ -#define VERBOSE_DESC (certtool_opt_strs+914) -#define VERBOSE_NAME (certtool_opt_strs+934) -#define VERBOSE_name (certtool_opt_strs+942) -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/* - * infile option description: - */ -#define INFILE_DESC (certtool_opt_strs+950) -#define INFILE_NAME (certtool_opt_strs+961) -#define INFILE_name (certtool_opt_strs+968) -#define INFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * outfile option description: - */ -#define OUTFILE_DESC (certtool_opt_strs+975) -#define OUTFILE_NAME (certtool_opt_strs+987) -#define OUTFILE_name (certtool_opt_strs+995) -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * generate-self-signed option description: - */ -#define GENERATE_SELF_SIGNED_DESC (certtool_opt_strs+1003) -#define GENERATE_SELF_SIGNED_NAME (certtool_opt_strs+1038) -#define GENERATE_SELF_SIGNED_name (certtool_opt_strs+1059) -#define GENERATE_SELF_SIGNED_FLAGS (OPTST_DISABLED) - -/* - * generate-certificate option description: - */ -#define GENERATE_CERTIFICATE_DESC (certtool_opt_strs+1080) -#define GENERATE_CERTIFICATE_NAME (certtool_opt_strs+1110) -#define GENERATE_CERTIFICATE_name (certtool_opt_strs+1131) -#define GENERATE_CERTIFICATE_FLAGS (OPTST_DISABLED) - -/* - * generate-proxy option description: - */ -#define GENERATE_PROXY_DESC (certtool_opt_strs+1152) -#define GENERATE_PROXY_NAME (certtool_opt_strs+1182) -#define GENERATE_PROXY_name (certtool_opt_strs+1197) -#define GENERATE_PROXY_FLAGS (OPTST_DISABLED) - -/* - * generate-crl option description: - */ -#define GENERATE_CRL_DESC (certtool_opt_strs+1212) -#define GENERATE_CRL_NAME (certtool_opt_strs+1227) -#define GENERATE_CRL_name (certtool_opt_strs+1240) -#define GENERATE_CRL_FLAGS (OPTST_DISABLED) - -/* - * update-certificate option description: - */ -#define UPDATE_CERTIFICATE_DESC (certtool_opt_strs+1253) -#define UPDATE_CERTIFICATE_NAME (certtool_opt_strs+1281) -#define UPDATE_CERTIFICATE_name (certtool_opt_strs+1300) -#define UPDATE_CERTIFICATE_FLAGS (OPTST_DISABLED) - -/* - * generate-privkey option description: - */ -#define GENERATE_PRIVKEY_DESC (certtool_opt_strs+1319) -#define GENERATE_PRIVKEY_NAME (certtool_opt_strs+1342) -#define GENERATE_PRIVKEY_name (certtool_opt_strs+1359) -#define GENERATE_PRIVKEY_FLAGS (OPTST_DISABLED) - -/* - * generate-request option description with - * "Must also have options" and "Incompatible options": - */ -#define GENERATE_REQUEST_DESC (certtool_opt_strs+1376) -#define GENERATE_REQUEST_NAME (certtool_opt_strs+1416) -#define GENERATE_REQUEST_name (certtool_opt_strs+1433) -static int const aGenerate_RequestCantList[] = { - INDEX_OPT_INFILE, NO_EQUIVALENT }; -#define GENERATE_REQUEST_FLAGS (OPTST_DISABLED) - -/* - * verify-chain option description: - */ -#define VERIFY_CHAIN_DESC (certtool_opt_strs+1450) -#define VERIFY_CHAIN_NAME (certtool_opt_strs+1490) -#define VERIFY_CHAIN_name (certtool_opt_strs+1503) -#define VERIFY_CHAIN_FLAGS (OPTST_DISABLED) - -/* - * verify option description with - * "Must also have options" and "Incompatible options": - */ -#define VERIFY_DESC (certtool_opt_strs+1516) -#define VERIFY_NAME (certtool_opt_strs+1577) -#define VERIFY_name (certtool_opt_strs+1584) -static int const aVerifyMustList[] = { - INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT }; -#define VERIFY_FLAGS (OPTST_DISABLED) - -/* - * verify-crl option description with - * "Must also have options" and "Incompatible options": - */ -#define VERIFY_CRL_DESC (certtool_opt_strs+1591) -#define VERIFY_CRL_NAME (certtool_opt_strs+1626) -#define VERIFY_CRL_name (certtool_opt_strs+1637) -static int const aVerify_CrlMustList[] = { - INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT }; -#define VERIFY_CRL_FLAGS (OPTST_DISABLED) - -/* - * generate-dh-params option description: - */ -#define GENERATE_DH_PARAMS_DESC (certtool_opt_strs+1648) -#define GENERATE_DH_PARAMS_NAME (certtool_opt_strs+1700) -#define GENERATE_DH_PARAMS_name (certtool_opt_strs+1719) -#define GENERATE_DH_PARAMS_FLAGS (OPTST_DISABLED) - -/* - * get-dh-params option description: - */ -#define GET_DH_PARAMS_DESC (certtool_opt_strs+1738) -#define GET_DH_PARAMS_NAME (certtool_opt_strs+1798) -#define GET_DH_PARAMS_name (certtool_opt_strs+1812) -#define GET_DH_PARAMS_FLAGS (OPTST_DISABLED) - -/* - * dh-info option description: - */ -#define DH_INFO_DESC (certtool_opt_strs+1826) -#define DH_INFO_NAME (certtool_opt_strs+1886) -#define DH_INFO_name (certtool_opt_strs+1894) -#define DH_INFO_FLAGS (OPTST_DISABLED) - -/* - * load-privkey option description: - */ -#define LOAD_PRIVKEY_DESC (certtool_opt_strs+1902) -#define LOAD_PRIVKEY_NAME (certtool_opt_strs+1927) -#define LOAD_PRIVKEY_name (certtool_opt_strs+1940) -#define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * load-pubkey option description: - */ -#define LOAD_PUBKEY_DESC (certtool_opt_strs+1953) -#define LOAD_PUBKEY_NAME (certtool_opt_strs+1977) -#define LOAD_PUBKEY_name (certtool_opt_strs+1989) -#define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * load-request option description: - */ -#define LOAD_REQUEST_DESC (certtool_opt_strs+2001) -#define LOAD_REQUEST_NAME (certtool_opt_strs+2034) -#define LOAD_REQUEST_name (certtool_opt_strs+2047) -#define LOAD_REQUEST_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * load-certificate option description: - */ -#define LOAD_CERTIFICATE_DESC (certtool_opt_strs+2060) -#define LOAD_CERTIFICATE_NAME (certtool_opt_strs+2085) -#define LOAD_CERTIFICATE_name (certtool_opt_strs+2102) -#define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * load-ca-privkey option description: - */ -#define LOAD_CA_PRIVKEY_DESC (certtool_opt_strs+2119) -#define LOAD_CA_PRIVKEY_NAME (certtool_opt_strs+2170) -#define LOAD_CA_PRIVKEY_name (certtool_opt_strs+2186) -#define LOAD_CA_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * load-ca-certificate option description: - */ -#define LOAD_CA_CERTIFICATE_DESC (certtool_opt_strs+2202) -#define LOAD_CA_CERTIFICATE_NAME (certtool_opt_strs+2253) -#define LOAD_CA_CERTIFICATE_name (certtool_opt_strs+2273) -#define LOAD_CA_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * password option description: - */ -#define PASSWORD_DESC (certtool_opt_strs+2293) -#define PASSWORD_NAME (certtool_opt_strs+2309) -#define PASSWORD_name (certtool_opt_strs+2318) -#define PASSWORD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * hex-numbers option description: - */ -#define HEX_NUMBERS_DESC (certtool_opt_strs+2327) -#define HEX_NUMBERS_NAME (certtool_opt_strs+2373) -#define HEX_NUMBERS_name (certtool_opt_strs+2385) -#define HEX_NUMBERS_FLAGS (OPTST_DISABLED) - -/* - * cprint option description: - */ -#define CPRINT_DESC (certtool_opt_strs+2397) -#define CPRINT_NAME (certtool_opt_strs+2466) -#define CPRINT_name (certtool_opt_strs+2473) -#define CPRINT_FLAGS (OPTST_DISABLED) - -/* - * null-password option description: - */ -#define NULL_PASSWORD_DESC (certtool_opt_strs+2480) -#define NULL_PASSWORD_NAME (certtool_opt_strs+2504) -#define NULL_PASSWORD_name (certtool_opt_strs+2518) -#define NULL_PASSWORD_FLAGS (OPTST_DISABLED) - -/* - * certificate-info option description: - */ -#define CERTIFICATE_INFO_DESC (certtool_opt_strs+2532) -#define CERTIFICATE_INFO_NAME (certtool_opt_strs+2575) -#define CERTIFICATE_INFO_name (certtool_opt_strs+2592) -#define CERTIFICATE_INFO_FLAGS (OPTST_DISABLED) - -/* - * certificate-pubkey option description: - */ -#define CERTIFICATE_PUBKEY_DESC (certtool_opt_strs+2609) -#define CERTIFICATE_PUBKEY_NAME (certtool_opt_strs+2640) -#define CERTIFICATE_PUBKEY_name (certtool_opt_strs+2659) -#define CERTIFICATE_PUBKEY_FLAGS (OPTST_DISABLED) - -/* - * pgp-certificate-info option description: - */ -#define PGP_CERTIFICATE_INFO_DESC (certtool_opt_strs+2678) -#define PGP_CERTIFICATE_INFO_NAME (certtool_opt_strs+2729) -#define PGP_CERTIFICATE_INFO_name (certtool_opt_strs+2750) -#define PGP_CERTIFICATE_INFO_FLAGS (OPTST_DISABLED) - -/* - * pgp-ring-info option description: - */ -#define PGP_RING_INFO_DESC (certtool_opt_strs+2771) -#define PGP_RING_INFO_NAME (certtool_opt_strs+2828) -#define PGP_RING_INFO_name (certtool_opt_strs+2842) -#define PGP_RING_INFO_FLAGS (OPTST_DISABLED) - -/* - * crl-info option description: - */ -#define CRL_INFO_DESC (certtool_opt_strs+2856) -#define CRL_INFO_NAME (certtool_opt_strs+2901) -#define CRL_INFO_name (certtool_opt_strs+2910) -#define CRL_INFO_FLAGS (OPTST_DISABLED) - -/* - * crq-info option description: - */ -#define CRQ_INFO_DESC (certtool_opt_strs+2919) -#define CRQ_INFO_NAME (certtool_opt_strs+2970) -#define CRQ_INFO_name (certtool_opt_strs+2979) -#define CRQ_INFO_FLAGS (OPTST_DISABLED) - -/* - * no-crq-extensions option description: - */ -#define NO_CRQ_EXTENSIONS_DESC (certtool_opt_strs+2988) -#define NO_CRQ_EXTENSIONS_NAME (certtool_opt_strs+3034) -#define NO_CRQ_EXTENSIONS_name (certtool_opt_strs+3052) -#define NO_CRQ_EXTENSIONS_FLAGS (OPTST_DISABLED) - -/* - * p12-info option description: - */ -#define P12_INFO_DESC (certtool_opt_strs+3070) -#define P12_INFO_NAME (certtool_opt_strs+3112) -#define P12_INFO_name (certtool_opt_strs+3121) -#define P12_INFO_FLAGS (OPTST_DISABLED) - -/* - * p7-info option description: - */ -#define P7_INFO_DESC (certtool_opt_strs+3130) -#define P7_INFO_NAME (certtool_opt_strs+3171) -#define P7_INFO_name (certtool_opt_strs+3179) -#define P7_INFO_FLAGS (OPTST_DISABLED) - -/* - * smime-to-p7 option description: - */ -#define SMIME_TO_P7_DESC (certtool_opt_strs+3187) -#define SMIME_TO_P7_NAME (certtool_opt_strs+3223) -#define SMIME_TO_P7_name (certtool_opt_strs+3235) -#define SMIME_TO_P7_FLAGS (OPTST_DISABLED) - -/* - * key-info option description: - */ -#define KEY_INFO_DESC (certtool_opt_strs+3247) -#define KEY_INFO_NAME (certtool_opt_strs+3282) -#define KEY_INFO_name (certtool_opt_strs+3291) -#define KEY_INFO_FLAGS (OPTST_DISABLED) - -/* - * pgp-key-info option description: - */ -#define PGP_KEY_INFO_DESC (certtool_opt_strs+3300) -#define PGP_KEY_INFO_NAME (certtool_opt_strs+3344) -#define PGP_KEY_INFO_name (certtool_opt_strs+3357) -#define PGP_KEY_INFO_FLAGS (OPTST_DISABLED) - -/* - * pubkey-info option description: - */ -#define PUBKEY_INFO_DESC (certtool_opt_strs+3370) -#define PUBKEY_INFO_NAME (certtool_opt_strs+3404) -#define PUBKEY_INFO_name (certtool_opt_strs+3416) -#define PUBKEY_INFO_FLAGS (OPTST_DISABLED) - -/* - * v1 option description: - */ -#define V1_DESC (certtool_opt_strs+3428) -#define V1_NAME (certtool_opt_strs+3489) -#define V1_name (certtool_opt_strs+3492) -#define V1_FLAGS (OPTST_DISABLED) - -/* - * to-p12 option description with - * "Must also have options" and "Incompatible options": - */ -#define TO_P12_DESC (certtool_opt_strs+3495) -#define TO_P12_NAME (certtool_opt_strs+3525) -#define TO_P12_name (certtool_opt_strs+3532) -static int const aTo_P12MustList[] = { - INDEX_OPT_LOAD_CERTIFICATE, NO_EQUIVALENT }; -#define TO_P12_FLAGS (OPTST_DISABLED) - -/* - * to-p8 option description: - */ -#define TO_P8_DESC (certtool_opt_strs+3539) -#define TO_P8_NAME (certtool_opt_strs+3568) -#define TO_P8_name (certtool_opt_strs+3574) -#define TO_P8_FLAGS (OPTST_DISABLED) - -/* - * pkcs8 option description: - */ -#define PKCS8_DESC (certtool_opt_strs+3580) -#define PKCS8_NAME (certtool_opt_strs+3616) -#define PKCS8_name (certtool_opt_strs+3622) -#define PKCS8_FLAGS (OPTST_DISABLED) - -/* - * rsa option description: - */ -#define RSA_DESC (certtool_opt_strs+3628) -#define RSA_NAME (certtool_opt_strs+3645) -#define RSA_name (certtool_opt_strs+3649) -#define RSA_FLAGS (OPTST_DISABLED) - -/* - * dsa option description: - */ -#define DSA_DESC (certtool_opt_strs+3653) -#define DSA_NAME (certtool_opt_strs+3670) -#define DSA_name (certtool_opt_strs+3674) -#define DSA_FLAGS (OPTST_DISABLED) - -/* - * ecc option description: - */ -#define ECC_DESC (certtool_opt_strs+3678) -#define ECC_NAME (certtool_opt_strs+3703) -#define ECC_name (certtool_opt_strs+3707) -#define ECC_FLAGS (OPTST_DISABLED) - -/* - * ecdsa option description: - */ -#define ECDSA_DESC (certtool_opt_strs+3711) -#define ECDSA_NAME NULL -#define ECDSA_name (certtool_opt_strs+3738) -#define ECDSA_FLAGS (ECC_FLAGS | OPTST_ALIAS) - -/* - * hash option description: - */ -#define HASH_DESC (certtool_opt_strs+3744) -#define HASH_NAME (certtool_opt_strs+3779) -#define HASH_name (certtool_opt_strs+3784) -#define HASH_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * inder option description: - */ -#define INDER_DESC (certtool_opt_strs+3789) -#define INDER_NAME (certtool_opt_strs+3845) -#define NOT_INDER_name (certtool_opt_strs+3851) -#define NOT_INDER_PFX (certtool_opt_strs+3860) -#define INDER_name (NOT_INDER_name + 3) -#define INDER_FLAGS (OPTST_DISABLED) - -/* - * inraw option description: - */ -#define INRAW_DESC (certtool_opt_strs+3863) -#define INRAW_NAME NULL -#define INRAW_name (certtool_opt_strs+3892) -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/* - * outder option description: - */ -#define OUTDER_DESC (certtool_opt_strs+3898) -#define OUTDER_NAME (certtool_opt_strs+3954) -#define NOT_OUTDER_name (certtool_opt_strs+3961) -#define NOT_OUTDER_PFX (certtool_opt_strs+3860) -#define OUTDER_name (NOT_OUTDER_name + 3) -#define OUTDER_FLAGS (OPTST_DISABLED) - -/* - * outraw option description: - */ -#define OUTRAW_DESC (certtool_opt_strs+3971) -#define OUTRAW_NAME NULL -#define OUTRAW_name (certtool_opt_strs+4001) -#define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS) - -/* - * bits option description: - */ -#define BITS_DESC (certtool_opt_strs+4008) -#define BITS_NAME (certtool_opt_strs+4052) -#define BITS_name (certtool_opt_strs+4057) -#define BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * sec-param option description: - */ -#define SEC_PARAM_DESC (certtool_opt_strs+4062) -#define SEC_PARAM_NAME (certtool_opt_strs+4125) -#define SEC_PARAM_name (certtool_opt_strs+4135) -#define SEC_PARAM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * disable-quick-random option description: - */ -#define DISABLE_QUICK_RANDOM_DESC (certtool_opt_strs+4145) -#define DISABLE_QUICK_RANDOM_NAME (certtool_opt_strs+4155) -#define DISABLE_QUICK_RANDOM_name (certtool_opt_strs+4176) -#define DISABLE_QUICK_RANDOM_FLAGS (OPTST_DISABLED) - -/* - * template option description: - */ -#define TEMPLATE_DESC (certtool_opt_strs+4197) -#define TEMPLATE_NAME (certtool_opt_strs+4248) -#define TEMPLATE_name (certtool_opt_strs+4257) -#define TEMPLATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * pkcs-cipher option description: - */ -#define PKCS_CIPHER_DESC (certtool_opt_strs+4266) -#define PKCS_CIPHER_NAME (certtool_opt_strs+4311) -#define PKCS_CIPHER_name (certtool_opt_strs+4323) -#define PKCS_CIPHER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (certtool_opt_strs+4335) -#define HELP_name (certtool_opt_strs+4379) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (certtool_opt_strs+4384) -#define MORE_HELP_name (certtool_opt_strs+4429) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (certtool_opt_strs+4439) -#define VER_name (certtool_opt_strs+4475) -/* - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptEcdsa, doOptInfile, - doOptInraw, doOptLoad_Request, doOptOutraw, - doOptTemplate, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the certtool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the certtool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, - /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verbose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_INFILE, - /* equiv idx, value */ 2, VALUE_OPT_INFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --infile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInfile, - /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 3, VALUE_OPT_OUTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_GENERATE_SELF_SIGNED, - /* equiv idx, value */ 4, VALUE_OPT_GENERATE_SELF_SIGNED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_SELF_SIGNED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-self-signed */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_SELF_SIGNED_DESC, GENERATE_SELF_SIGNED_NAME, GENERATE_SELF_SIGNED_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_GENERATE_CERTIFICATE, - /* equiv idx, value */ 5, VALUE_OPT_GENERATE_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_CERTIFICATE_DESC, GENERATE_CERTIFICATE_NAME, GENERATE_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_GENERATE_PROXY, - /* equiv idx, value */ 6, VALUE_OPT_GENERATE_PROXY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_PROXY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-proxy */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_PROXY_DESC, GENERATE_PROXY_NAME, GENERATE_PROXY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_GENERATE_CRL, - /* equiv idx, value */ 7, VALUE_OPT_GENERATE_CRL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_CRL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-crl */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_CRL_DESC, GENERATE_CRL_NAME, GENERATE_CRL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_UPDATE_CERTIFICATE, - /* equiv idx, value */ 8, VALUE_OPT_UPDATE_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ UPDATE_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --update-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ UPDATE_CERTIFICATE_DESC, UPDATE_CERTIFICATE_NAME, UPDATE_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_GENERATE_PRIVKEY, - /* equiv idx, value */ 9, VALUE_OPT_GENERATE_PRIVKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_PRIVKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-privkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_PRIVKEY_DESC, GENERATE_PRIVKEY_NAME, GENERATE_PRIVKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_GENERATE_REQUEST, - /* equiv idx, value */ 10, VALUE_OPT_GENERATE_REQUEST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_REQUEST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-request */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aGenerate_RequestCantList, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, GENERATE_REQUEST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_VERIFY_CHAIN, - /* equiv idx, value */ 11, VALUE_OPT_VERIFY_CHAIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_CHAIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-chain */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_CHAIN_DESC, VERIFY_CHAIN_NAME, VERIFY_CHAIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_VERIFY, - /* equiv idx, value */ 12, VALUE_OPT_VERIFY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aVerifyMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_VERIFY_CRL, - /* equiv idx, value */ 13, VALUE_OPT_VERIFY_CRL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_CRL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-crl */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aVerify_CrlMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_CRL_DESC, VERIFY_CRL_NAME, VERIFY_CRL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_GENERATE_DH_PARAMS, - /* equiv idx, value */ 14, VALUE_OPT_GENERATE_DH_PARAMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_DH_PARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-dh-params */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_DH_PARAMS_DESC, GENERATE_DH_PARAMS_NAME, GENERATE_DH_PARAMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 15, VALUE_OPT_GET_DH_PARAMS, - /* equiv idx, value */ 15, VALUE_OPT_GET_DH_PARAMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GET_DH_PARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --get-dh-params */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GET_DH_PARAMS_DESC, GET_DH_PARAMS_NAME, GET_DH_PARAMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_DH_INFO, - /* equiv idx, value */ 16, VALUE_OPT_DH_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DH_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dh-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DH_INFO_DESC, DH_INFO_NAME, DH_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_LOAD_PRIVKEY, - /* equiv idx, value */ 17, VALUE_OPT_LOAD_PRIVKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_PRIVKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-privkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, LOAD_PRIVKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_LOAD_PUBKEY, - /* equiv idx, value */ 18, VALUE_OPT_LOAD_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, LOAD_PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_LOAD_REQUEST, - /* equiv idx, value */ 19, VALUE_OPT_LOAD_REQUEST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_REQUEST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-request */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Request, - /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, LOAD_REQUEST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_LOAD_CERTIFICATE, - /* equiv idx, value */ 20, VALUE_OPT_LOAD_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, LOAD_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_LOAD_CA_PRIVKEY, - /* equiv idx, value */ 21, VALUE_OPT_LOAD_CA_PRIVKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CA_PRIVKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-ca-privkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_CA_PRIVKEY_DESC, LOAD_CA_PRIVKEY_NAME, LOAD_CA_PRIVKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 22, VALUE_OPT_LOAD_CA_CERTIFICATE, - /* equiv idx, value */ 22, VALUE_OPT_LOAD_CA_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CA_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-ca-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_CA_CERTIFICATE_DESC, LOAD_CA_CERTIFICATE_NAME, LOAD_CA_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_PASSWORD, - /* equiv idx, value */ 23, VALUE_OPT_PASSWORD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PASSWORD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --password */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 24, VALUE_OPT_HEX_NUMBERS, - /* equiv idx, value */ 24, VALUE_OPT_HEX_NUMBERS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HEX_NUMBERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --hex-numbers */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HEX_NUMBERS_DESC, HEX_NUMBERS_NAME, HEX_NUMBERS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_CPRINT, - /* equiv idx, value */ 25, VALUE_OPT_CPRINT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CPRINT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --cprint */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CPRINT_DESC, CPRINT_NAME, CPRINT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 26, VALUE_OPT_NULL_PASSWORD, - /* equiv idx, value */ 26, VALUE_OPT_NULL_PASSWORD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NULL_PASSWORD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --null-password */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NULL_PASSWORD_DESC, NULL_PASSWORD_NAME, NULL_PASSWORD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_CERTIFICATE_INFO, - /* equiv idx, value */ 27, VALUE_OPT_CERTIFICATE_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CERTIFICATE_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --certificate-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CERTIFICATE_INFO_DESC, CERTIFICATE_INFO_NAME, CERTIFICATE_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_CERTIFICATE_PUBKEY, - /* equiv idx, value */ 28, VALUE_OPT_CERTIFICATE_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CERTIFICATE_PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --certificate-pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CERTIFICATE_PUBKEY_DESC, CERTIFICATE_PUBKEY_NAME, CERTIFICATE_PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 29, VALUE_OPT_PGP_CERTIFICATE_INFO, - /* equiv idx, value */ 29, VALUE_OPT_PGP_CERTIFICATE_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGP_CERTIFICATE_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgp-certificate-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PGP_CERTIFICATE_INFO_DESC, PGP_CERTIFICATE_INFO_NAME, PGP_CERTIFICATE_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 30, VALUE_OPT_PGP_RING_INFO, - /* equiv idx, value */ 30, VALUE_OPT_PGP_RING_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGP_RING_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgp-ring-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PGP_RING_INFO_DESC, PGP_RING_INFO_NAME, PGP_RING_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 31, VALUE_OPT_CRL_INFO, - /* equiv idx, value */ 31, VALUE_OPT_CRL_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CRL_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --crl-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CRL_INFO_DESC, CRL_INFO_NAME, CRL_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 32, VALUE_OPT_CRQ_INFO, - /* equiv idx, value */ 32, VALUE_OPT_CRQ_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CRQ_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --crq-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CRQ_INFO_DESC, CRQ_INFO_NAME, CRQ_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 33, VALUE_OPT_NO_CRQ_EXTENSIONS, - /* equiv idx, value */ 33, VALUE_OPT_NO_CRQ_EXTENSIONS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NO_CRQ_EXTENSIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --no-crq-extensions */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NO_CRQ_EXTENSIONS_DESC, NO_CRQ_EXTENSIONS_NAME, NO_CRQ_EXTENSIONS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 34, VALUE_OPT_P12_INFO, - /* equiv idx, value */ 34, VALUE_OPT_P12_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P12_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p12-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P12_INFO_DESC, P12_INFO_NAME, P12_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 35, VALUE_OPT_P7_INFO, - /* equiv idx, value */ 35, VALUE_OPT_P7_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_INFO_DESC, P7_INFO_NAME, P7_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 36, VALUE_OPT_SMIME_TO_P7, - /* equiv idx, value */ 36, VALUE_OPT_SMIME_TO_P7, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SMIME_TO_P7_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --smime-to-p7 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SMIME_TO_P7_DESC, SMIME_TO_P7_NAME, SMIME_TO_P7_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 37, VALUE_OPT_KEY_INFO, - /* equiv idx, value */ 37, VALUE_OPT_KEY_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ KEY_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --key-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ KEY_INFO_DESC, KEY_INFO_NAME, KEY_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 38, VALUE_OPT_PGP_KEY_INFO, - /* equiv idx, value */ 38, VALUE_OPT_PGP_KEY_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGP_KEY_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgp-key-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PGP_KEY_INFO_DESC, PGP_KEY_INFO_NAME, PGP_KEY_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 39, VALUE_OPT_PUBKEY_INFO, - /* equiv idx, value */ 39, VALUE_OPT_PUBKEY_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PUBKEY_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pubkey-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PUBKEY_INFO_DESC, PUBKEY_INFO_NAME, PUBKEY_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 40, VALUE_OPT_V1, - /* equiv idx, value */ 40, VALUE_OPT_V1, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ V1_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --v1 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ V1_DESC, V1_NAME, V1_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 41, VALUE_OPT_TO_P12, - /* equiv idx, value */ 41, VALUE_OPT_TO_P12, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TO_P12_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --to-p12 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aTo_P12MustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TO_P12_DESC, TO_P12_NAME, TO_P12_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 42, VALUE_OPT_TO_P8, - /* equiv idx, value */ 42, VALUE_OPT_TO_P8, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TO_P8_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --to-p8 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TO_P8_DESC, TO_P8_NAME, TO_P8_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 43, VALUE_OPT_PKCS8, - /* equiv idx, value */ 43, VALUE_OPT_PKCS8, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PKCS8_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pkcs8 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 44, VALUE_OPT_RSA, - /* equiv idx, value */ 44, VALUE_OPT_RSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ RSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --rsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ RSA_DESC, RSA_NAME, RSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 45, VALUE_OPT_DSA, - /* equiv idx, value */ 45, VALUE_OPT_DSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DSA_DESC, DSA_NAME, DSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 46, VALUE_OPT_ECC, - /* equiv idx, value */ 46, VALUE_OPT_ECC, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ECC_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ecc */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ECC_DESC, ECC_NAME, ECC_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 47, VALUE_OPT_ECDSA, - /* equiv idx, value */ 47, VALUE_OPT_ECDSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ECDSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ecdsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptEcdsa, - /* desc, NAME, name */ ECDSA_DESC, ECDSA_NAME, ECDSA_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 48, VALUE_OPT_HASH, - /* equiv idx, value */ 48, VALUE_OPT_HASH, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HASH_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --hash */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HASH_DESC, HASH_NAME, HASH_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 49, VALUE_OPT_INDER, - /* equiv idx, value */ 49, VALUE_OPT_INDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name, - /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX }, - - { /* entry idx, value */ 50, VALUE_OPT_INRAW, - /* equiv idx, value */ 50, VALUE_OPT_INRAW, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INRAW_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inraw */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInraw, - /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 51, VALUE_OPT_OUTDER, - /* equiv idx, value */ 51, 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 */ 52, VALUE_OPT_OUTRAW, - /* equiv idx, value */ 52, 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 */ 53, VALUE_OPT_BITS, - /* equiv idx, value */ 53, VALUE_OPT_BITS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BITS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --bits */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 54, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 54, VALUE_OPT_SEC_PARAM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SEC_PARAM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sec-param */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 55, VALUE_OPT_DISABLE_QUICK_RANDOM, - /* equiv idx, value */ 55, VALUE_OPT_DISABLE_QUICK_RANDOM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DISABLE_QUICK_RANDOM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --disable-quick-random */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DISABLE_QUICK_RANDOM_DESC, DISABLE_QUICK_RANDOM_NAME, DISABLE_QUICK_RANDOM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 56, VALUE_OPT_TEMPLATE, - /* equiv idx, value */ 56, VALUE_OPT_TEMPLATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TEMPLATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --template */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptTemplate, - /* desc, NAME, name */ TEMPLATE_DESC, TEMPLATE_NAME, TEMPLATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 57, VALUE_OPT_PKCS_CIPHER, - /* equiv idx, value */ 57, VALUE_OPT_PKCS_CIPHER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PKCS_CIPHER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pkcs-cipher */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PKCS_CIPHER_DESC, PKCS_CIPHER_NAME, PKCS_CIPHER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the certtool Option Environment - */ -#define zPROGNAME (certtool_opt_strs+4483) -#define zUsageTitle (certtool_opt_strs+4492) -#define zRcName NULL -#define apzHomeList NULL -#define zBugsAddr (certtool_opt_strs+4602) -#define zExplain (certtool_opt_strs+4621) -#define zDetail (certtool_opt_strs+4624) -#define zFullVersion (certtool_opt_strs+4798) -/* extracted from optcode.tlib near line 353 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - - -#define certtool_full_usage (NULL) - -#define certtool_short_usage (certtool_opt_strs+4817) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param pOptions the AutoOpts option description structure - * @param pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&certtoolOptions, CERTTOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-request option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the ecdsa option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptEcdsa(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_ECC); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(CERTTOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the inraw option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(CERTTOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the outraw option. - * - * @param pOptions the certtool 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(CERTTOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the template option. - * - * @param pOptions the certtool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptTemplate(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} -/* extracted from optmain.tlib near line 1188 */ - -/** - * The directory containing the data associated with certtool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged certtool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define certtool_packager_info NULL -#else -static char const certtool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport certtool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for certtool. The one structure that - * binds them all. - */ -tOptions certtoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 61 /* full option count */, 58 /* user option count */, - certtool_full_usage, certtool_short_usage, - NULL, NULL, - PKGDATADIR, certtool_packager_info -}; - -#if ENABLE_NLS -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(CERTTOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the certtoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &certtoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - tOptDesc * od = opts->pOptDesc; - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - coerce_it((void*)&(opts->pzPackager)); - coerce_it((void*)&(opts->pzShortUsage)); - - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - - if ((opts->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc * od = opts->pOptDesc; - int ix; - - for (ix = opts->optCt; ix > 0; ix--, od++) { - coerce_it((void*)&(od->pz_Name)); - coerce_it((void*)&(od->pz_DisableName)); - coerce_it((void*)&(od->pz_DisablePfx)); - } - certtoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; - } -} - -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -/* certtool-args.c ends here */ diff --git a/src/certtool-args.h b/src/certtool-args.h deleted file mode 100644 index 419553cb71..0000000000 --- a/src/certtool-args.h +++ /dev/null @@ -1,306 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (certtool-args.h) - * - * It has been AutoGen-ed October 31, 2013 at 10:37:31 AM by AutoGen 5.17 - * From the definitions certtool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the certtool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The certtool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * certtool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * certtool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/* - * This file contains the programmatic interface to the Automated - * Options generated for the certtool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_CERTTOOL_ARGS_H_GUARD -#define AUTOOPTS_CERTTOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/* - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 151552 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/* - * Enumeration of each option: - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_INFILE = 2, - INDEX_OPT_OUTFILE = 3, - INDEX_OPT_GENERATE_SELF_SIGNED = 4, - INDEX_OPT_GENERATE_CERTIFICATE = 5, - INDEX_OPT_GENERATE_PROXY = 6, - INDEX_OPT_GENERATE_CRL = 7, - INDEX_OPT_UPDATE_CERTIFICATE = 8, - INDEX_OPT_GENERATE_PRIVKEY = 9, - INDEX_OPT_GENERATE_REQUEST = 10, - INDEX_OPT_VERIFY_CHAIN = 11, - INDEX_OPT_VERIFY = 12, - INDEX_OPT_VERIFY_CRL = 13, - INDEX_OPT_GENERATE_DH_PARAMS = 14, - INDEX_OPT_GET_DH_PARAMS = 15, - INDEX_OPT_DH_INFO = 16, - INDEX_OPT_LOAD_PRIVKEY = 17, - INDEX_OPT_LOAD_PUBKEY = 18, - INDEX_OPT_LOAD_REQUEST = 19, - INDEX_OPT_LOAD_CERTIFICATE = 20, - INDEX_OPT_LOAD_CA_PRIVKEY = 21, - INDEX_OPT_LOAD_CA_CERTIFICATE = 22, - INDEX_OPT_PASSWORD = 23, - INDEX_OPT_HEX_NUMBERS = 24, - INDEX_OPT_CPRINT = 25, - INDEX_OPT_NULL_PASSWORD = 26, - INDEX_OPT_CERTIFICATE_INFO = 27, - INDEX_OPT_CERTIFICATE_PUBKEY = 28, - INDEX_OPT_PGP_CERTIFICATE_INFO = 29, - INDEX_OPT_PGP_RING_INFO = 30, - INDEX_OPT_CRL_INFO = 31, - INDEX_OPT_CRQ_INFO = 32, - INDEX_OPT_NO_CRQ_EXTENSIONS = 33, - INDEX_OPT_P12_INFO = 34, - INDEX_OPT_P7_INFO = 35, - INDEX_OPT_SMIME_TO_P7 = 36, - INDEX_OPT_KEY_INFO = 37, - INDEX_OPT_PGP_KEY_INFO = 38, - INDEX_OPT_PUBKEY_INFO = 39, - INDEX_OPT_V1 = 40, - INDEX_OPT_TO_P12 = 41, - INDEX_OPT_TO_P8 = 42, - INDEX_OPT_PKCS8 = 43, - INDEX_OPT_RSA = 44, - INDEX_OPT_DSA = 45, - INDEX_OPT_ECC = 46, - INDEX_OPT_ECDSA = 47, - INDEX_OPT_HASH = 48, - INDEX_OPT_INDER = 49, - INDEX_OPT_INRAW = 50, - INDEX_OPT_OUTDER = 51, - INDEX_OPT_OUTRAW = 52, - INDEX_OPT_BITS = 53, - INDEX_OPT_SEC_PARAM = 54, - INDEX_OPT_DISABLE_QUICK_RANDOM = 55, - INDEX_OPT_TEMPLATE = 56, - INDEX_OPT_PKCS_CIPHER = 57, - INDEX_OPT_VERSION = 58, - INDEX_OPT_HELP = 59, - INDEX_OPT_MORE_HELP = 60 -} teOptIndex; - -#define OPTION_CT 61 -#define CERTTOOL_VERSION "@VERSION@" -#define CERTTOOL_FULL_VERSION "certtool @VERSION@" - -/* - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (certtoolOptions.pOptDesc[INDEX_OPT_## n]) -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -#define OPT_ARG(n) (DESC(n).optArg.argString) -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -#define COUNT_OPT(n) (DESC(n).optOccCt) -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * - * - * Enumeration of certtool exit codes - */ -typedef enum { - CERTTOOL_EXIT_SUCCESS = 0, - CERTTOOL_EXIT_FAILURE = 1, - CERTTOOL_EXIT_USAGE_ERROR = 64, - CERTTOOL_EXIT_LIBOPTS_FAILURE = 70 -} certtool_exit_code_t; -/* * * * * * - * - * Interface defines for specific options. - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_VERBOSE 'V' -#define VALUE_OPT_INFILE 2 -#define VALUE_OPT_OUTFILE 3 -#define VALUE_OPT_GENERATE_SELF_SIGNED 's' -#define VALUE_OPT_GENERATE_CERTIFICATE 'c' -#define VALUE_OPT_GENERATE_PROXY 6 -#define VALUE_OPT_GENERATE_CRL 7 -#define VALUE_OPT_UPDATE_CERTIFICATE 'u' -#define VALUE_OPT_GENERATE_PRIVKEY 'p' -#define VALUE_OPT_GENERATE_REQUEST 'q' -#define VALUE_OPT_VERIFY_CHAIN 'e' -#define VALUE_OPT_VERIFY 12 -#define VALUE_OPT_VERIFY_CRL 13 -#define VALUE_OPT_GENERATE_DH_PARAMS 14 -#define VALUE_OPT_GET_DH_PARAMS 15 -#define VALUE_OPT_DH_INFO 16 -#define VALUE_OPT_LOAD_PRIVKEY 17 -#define VALUE_OPT_LOAD_PUBKEY 18 -#define VALUE_OPT_LOAD_REQUEST 19 -#define VALUE_OPT_LOAD_CERTIFICATE 20 -#define VALUE_OPT_LOAD_CA_PRIVKEY 21 -#define VALUE_OPT_LOAD_CA_CERTIFICATE 22 -#define VALUE_OPT_PASSWORD 23 -#define VALUE_OPT_HEX_NUMBERS 24 -#define VALUE_OPT_CPRINT 25 -#define VALUE_OPT_NULL_PASSWORD 26 -#define VALUE_OPT_CERTIFICATE_INFO 'i' -#define VALUE_OPT_CERTIFICATE_PUBKEY 28 -#define VALUE_OPT_PGP_CERTIFICATE_INFO 29 -#define VALUE_OPT_PGP_RING_INFO 30 -#define VALUE_OPT_CRL_INFO 'l' -#define VALUE_OPT_CRQ_INFO 32 -#define VALUE_OPT_NO_CRQ_EXTENSIONS 129 -#define VALUE_OPT_P12_INFO 130 -#define VALUE_OPT_P7_INFO 131 -#define VALUE_OPT_SMIME_TO_P7 132 -#define VALUE_OPT_KEY_INFO 'k' -#define VALUE_OPT_PGP_KEY_INFO 134 -#define VALUE_OPT_PUBKEY_INFO 135 -#define VALUE_OPT_V1 136 -#define VALUE_OPT_TO_P12 137 -#define VALUE_OPT_TO_P8 138 -#define VALUE_OPT_PKCS8 '8' -#define VALUE_OPT_RSA 140 -#define VALUE_OPT_DSA 141 -#define VALUE_OPT_ECC 142 -#define VALUE_OPT_ECDSA 143 -#define VALUE_OPT_HASH 144 -#define VALUE_OPT_INDER 145 -#define VALUE_OPT_INRAW 146 -#define VALUE_OPT_OUTDER 147 -#define VALUE_OPT_OUTRAW 148 -#define VALUE_OPT_BITS 149 - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_SEC_PARAM 150 -#define VALUE_OPT_DISABLE_QUICK_RANDOM 151 -#define VALUE_OPT_TEMPLATE 152 -#define VALUE_OPT_PKCS_CIPHER 153 -#define VALUE_OPT_HELP 'h' -#define VALUE_OPT_MORE_HELP '!' -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(certtoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(certtoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - certtoolOptions.curOptIdx = (n); \ - certtoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*certtoolOptions.pUsageProc)(&certtoolOptions, c) -/* extracted from opthead.tlib near line 497 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the certtool option descriptor. - */ -extern tOptions certtoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(certtoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(certtoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(certtoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(certtoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_CERTTOOL_ARGS_H_GUARD */ -/* certtool-args.h ends here */ diff --git a/src/cli-args.c b/src/cli-args.c deleted file mode 100644 index 8b338d8f44..0000000000 --- a/src/cli-args.c +++ /dev/null @@ -1,1741 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-args.c) - * - * It has been AutoGen-ed October 23, 2013 at 12:39:20 PM by AutoGen 5.17 - * From the definitions cli-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-cli author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-cli program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * gnutls-cli is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-cli is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "cli-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; - -/* TRANSLATORS: choose the translation for option names wisely because you - cannot ever change your mind. */ -#define zCopyright (gnutls_cli_opt_strs+0) -#define zLicenseDescrip (gnutls_cli_opt_strs+281) - - -#ifndef NULL -# define NULL 0 -#endif - -/* - * gnutls-cli option static const strings - */ -static char const gnutls_cli_opt_strs[4195] = -/* 0 */ "gnutls-cli @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" - "redistribution under the terms of the\n" - "GNU General Public License, version 3 or later\n" - " \n\0" -/* 281 */ "gnutls-cli is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n" - "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" - "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" - "more details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 890 */ "Enable debugging.\0" -/* 908 */ "DEBUG\0" -/* 914 */ "debug\0" -/* 920 */ "More verbose output\0" -/* 940 */ "VERBOSE\0" -/* 948 */ "verbose\0" -/* 956 */ "Enable trust on first use authentication\0" -/* 997 */ "TOFU\0" -/* 1002 */ "no-tofu\0" -/* 1010 */ "no\0" -/* 1013 */ "Enable DANE certificate verification (DNSSEC)\0" -/* 1059 */ "DANE\0" -/* 1064 */ "no-dane\0" -/* 1072 */ "Use the local DNS server for DNSSEC resolving.\0" -/* 1119 */ "LOCAL_DNS\0" -/* 1129 */ "no-local-dns\0" -/* 1142 */ "Disable CA certificate verification\0" -/* 1178 */ "CA_VERIFICATION\0" -/* 1194 */ "no-ca-verification\0" -/* 1213 */ "Enable OCSP certificate verification\0" -/* 1250 */ "OCSP\0" -/* 1255 */ "no-ocsp\0" -/* 1263 */ "Establish a session and resume\0" -/* 1294 */ "RESUME\0" -/* 1301 */ "resume\0" -/* 1308 */ "Establish a session and rehandshake\0" -/* 1344 */ "REHANDSHAKE\0" -/* 1356 */ "rehandshake\0" -/* 1368 */ "Connect, establish a plain session and start TLS.\0" -/* 1418 */ "STARTTLS\0" -/* 1427 */ "starttls\0" -/* 1436 */ "Use DTLS (datagram TLS) over UDP\0" -/* 1469 */ "UDP\0" -/* 1473 */ "udp\0" -/* 1477 */ "Set MTU for datagram TLS\0" -/* 1502 */ "MTU\0" -/* 1506 */ "mtu\0" -/* 1510 */ "Send CR LF instead of LF\0" -/* 1535 */ "CRLF\0" -/* 1540 */ "crlf\0" -/* 1545 */ "Use DER format for certificates to read from\0" -/* 1590 */ "X509FMTDER\0" -/* 1601 */ "x509fmtder\0" -/* 1612 */ "Send the openpgp fingerprint, instead of the key\0" -/* 1661 */ "FINGERPRINT\0" -/* 1673 */ "fingerprint\0" -/* 1685 */ "Print peer's certificate in PEM format\0" -/* 1724 */ "PRINT_CERT\0" -/* 1735 */ "print-cert\0" -/* 1746 */ "The minimum number of bits allowed for DH\0" -/* 1788 */ "DH_BITS\0" -/* 1796 */ "dh-bits\0" -/* 1804 */ "Priorities string\0" -/* 1822 */ "PRIORITY\0" -/* 1831 */ "priority\0" -/* 1840 */ "Certificate file or PKCS #11 URL to use\0" -/* 1880 */ "X509CAFILE\0" -/* 1891 */ "x509cafile\0" -/* 1902 */ "CRL file to use\0" -/* 1918 */ "X509CRLFILE\0" -/* 1930 */ "x509crlfile\0" -/* 1942 */ "PGP Key file to use\0" -/* 1962 */ "PGPKEYFILE\0" -/* 1973 */ "pgpkeyfile\0" -/* 1984 */ "PGP Key ring file to use\0" -/* 2009 */ "PGPKEYRING\0" -/* 2020 */ "pgpkeyring\0" -/* 2031 */ "PGP Public Key (certificate) file to use\0" -/* 2072 */ "PGPCERTFILE\0" -/* 2084 */ "pgpcertfile\0" -/* 2096 */ "X.509 key file or PKCS #11 URL to use\0" -/* 2134 */ "X509KEYFILE\0" -/* 2146 */ "x509keyfile\0" -/* 2158 */ "X.509 Certificate file or PKCS #11 URL to use\0" -/* 2204 */ "X509CERTFILE\0" -/* 2217 */ "x509certfile\0" -/* 2230 */ "PGP subkey to use (hex or auto)\0" -/* 2262 */ "PGPSUBKEY\0" -/* 2272 */ "pgpsubkey\0" -/* 2282 */ "SRP username to use\0" -/* 2302 */ "SRPUSERNAME\0" -/* 2314 */ "srpusername\0" -/* 2326 */ "SRP password to use\0" -/* 2346 */ "SRPPASSWD\0" -/* 2356 */ "srppasswd\0" -/* 2366 */ "PSK username to use\0" -/* 2386 */ "PSKUSERNAME\0" -/* 2398 */ "pskusername\0" -/* 2410 */ "PSK key (in hex) to use\0" -/* 2434 */ "PSKKEY\0" -/* 2441 */ "pskkey\0" -/* 2448 */ "The port or service to connect to\0" -/* 2482 */ "PORT\0" -/* 2487 */ "port\0" -/* 2492 */ "Don't abort program if server certificate can't be validated\0" -/* 2553 */ "INSECURE\0" -/* 2562 */ "insecure\0" -/* 2571 */ "Use length-hiding padding to prevent traffic analysis\0" -/* 2625 */ "RANGES\0" -/* 2632 */ "ranges\0" -/* 2639 */ "Benchmark individual ciphers\0" -/* 2668 */ "BENCHMARK_CIPHERS\0" -/* 2686 */ "benchmark-ciphers\0" -/* 2704 */ "Benchmark individual software ciphers (no hw acceleration)\0" -/* 2763 */ "BENCHMARK_SOFT_CIPHERS\0" -/* 2786 */ "benchmark-soft-ciphers\0" -/* 2809 */ "Benchmark TLS key exchange methods\0" -/* 2844 */ "BENCHMARK_TLS_KX\0" -/* 2861 */ "benchmark-tls-kx\0" -/* 2878 */ "Benchmark TLS ciphers\0" -/* 2900 */ "BENCHMARK_TLS_CIPHERS\0" -/* 2922 */ "benchmark-tls-ciphers\0" -/* 2944 */ "Print a list of the supported algorithms and modes\0" -/* 2995 */ "LIST\0" -/* 3000 */ "list\0" -/* 3005 */ "Don't allow session tickets\0" -/* 3033 */ "NOTICKET\0" -/* 3042 */ "noticket\0" -/* 3051 */ "Offer SRTP profiles\0" -/* 3071 */ "SRTP_PROFILES\0" -/* 3085 */ "srtp-profiles\0" -/* 3099 */ "Application layer protocol\0" -/* 3126 */ "ALPN\0" -/* 3131 */ "alpn\0" -/* 3136 */ "Activate heartbeat support\0" -/* 3163 */ "HEARTBEAT\0" -/* 3173 */ "heartbeat\0" -/* 3183 */ "The maximum record size to advertize\0" -/* 3220 */ "RECORDSIZE\0" -/* 3231 */ "recordsize\0" -/* 3242 */ "Do not send a Server Name Indication (SNI)\0" -/* 3285 */ "DISABLE_SNI\0" -/* 3297 */ "disable-sni\0" -/* 3309 */ "Disable all the TLS extensions\0" -/* 3340 */ "DISABLE_EXTENSIONS\0" -/* 3359 */ "disable-extensions\0" -/* 3378 */ "Inline commands of the form ^^\0" -/* 3414 */ "INLINE_COMMANDS\0" -/* 3430 */ "inline-commands\0" -/* 3446 */ "Change the default (^) used as a delimiter for inline commands. The\n" - "value is a single US-ASCII character (octets 0 - 127).\0" -/* 3570 */ "INLINE_COMMANDS_PREFIX\0" -/* 3593 */ "inline-commands-prefix\0" -/* 3616 */ "Display extended usage information and exit\0" -/* 3660 */ "help\0" -/* 3665 */ "Extended usage information passed thru pager\0" -/* 3710 */ "more-help\0" -/* 3720 */ "Output version information and exit\0" -/* 3756 */ "version\0" -/* 3764 */ "GNUTLS_CLI\0" -/* 3775 */ "gnutls-cli - GnuTLS client - Ver. @VERSION@\n" - "USAGE: %s [ - [] | --[{=| }] ]... [hostname]\n\0" -/* 3888 */ "bug-gnutls@gnu.org\0" -/* 3907 */ "\n\n\0" -/* 3910 */ "\n" - "Simple client program to set up a TLS connection to some other computer. It\n" - "sets up a TLS connection and forwards data from the standard input to the\n" - "secured socket and vice versa.\n\0" -/* 4094 */ "gnutls-cli @VERSION@\0" -/* 4115 */ "Usage: gnutls-cli [options] hostname\n" - "gnutls-cli --help for usage instructions.\n"; - -/* - * debug option description: - */ -#define DEBUG_DESC (gnutls_cli_opt_strs+890) -#define DEBUG_NAME (gnutls_cli_opt_strs+908) -#define DEBUG_name (gnutls_cli_opt_strs+914) -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * verbose option description: - */ -#define VERBOSE_DESC (gnutls_cli_opt_strs+920) -#define VERBOSE_NAME (gnutls_cli_opt_strs+940) -#define VERBOSE_name (gnutls_cli_opt_strs+948) -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/* - * tofu option description: - */ -#define TOFU_DESC (gnutls_cli_opt_strs+956) -#define TOFU_NAME (gnutls_cli_opt_strs+997) -#define NOT_TOFU_name (gnutls_cli_opt_strs+1002) -#define NOT_TOFU_PFX (gnutls_cli_opt_strs+1010) -#define TOFU_name (NOT_TOFU_name + 3) -#define TOFU_FLAGS (OPTST_DISABLED) - -/* - * dane option description: - */ -#define DANE_DESC (gnutls_cli_opt_strs+1013) -#define DANE_NAME (gnutls_cli_opt_strs+1059) -#define NOT_DANE_name (gnutls_cli_opt_strs+1064) -#define NOT_DANE_PFX (gnutls_cli_opt_strs+1010) -#define DANE_name (NOT_DANE_name + 3) -#define DANE_FLAGS (OPTST_DISABLED) - -/* - * local-dns option description: - */ -#define LOCAL_DNS_DESC (gnutls_cli_opt_strs+1072) -#define LOCAL_DNS_NAME (gnutls_cli_opt_strs+1119) -#define NOT_LOCAL_DNS_name (gnutls_cli_opt_strs+1129) -#define NOT_LOCAL_DNS_PFX (gnutls_cli_opt_strs+1010) -#define LOCAL_DNS_name (NOT_LOCAL_DNS_name + 3) -#define LOCAL_DNS_FLAGS (OPTST_DISABLED) - -/* - * ca-verification option description: - */ -#define CA_VERIFICATION_DESC (gnutls_cli_opt_strs+1142) -#define CA_VERIFICATION_NAME (gnutls_cli_opt_strs+1178) -#define NOT_CA_VERIFICATION_name (gnutls_cli_opt_strs+1194) -#define NOT_CA_VERIFICATION_PFX (gnutls_cli_opt_strs+1010) -#define CA_VERIFICATION_name (NOT_CA_VERIFICATION_name + 3) -#define CA_VERIFICATION_FLAGS (OPTST_INITENABLED) - -/* - * ocsp option description: - */ -#define OCSP_DESC (gnutls_cli_opt_strs+1213) -#define OCSP_NAME (gnutls_cli_opt_strs+1250) -#define NOT_OCSP_name (gnutls_cli_opt_strs+1255) -#define NOT_OCSP_PFX (gnutls_cli_opt_strs+1010) -#define OCSP_name (NOT_OCSP_name + 3) -#define OCSP_FLAGS (OPTST_DISABLED) - -/* - * resume option description: - */ -#define RESUME_DESC (gnutls_cli_opt_strs+1263) -#define RESUME_NAME (gnutls_cli_opt_strs+1294) -#define RESUME_name (gnutls_cli_opt_strs+1301) -#define RESUME_FLAGS (OPTST_DISABLED) - -/* - * rehandshake option description: - */ -#define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1308) -#define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1344) -#define REHANDSHAKE_name (gnutls_cli_opt_strs+1356) -#define REHANDSHAKE_FLAGS (OPTST_DISABLED) - -/* - * starttls option description: - */ -#define STARTTLS_DESC (gnutls_cli_opt_strs+1368) -#define STARTTLS_NAME (gnutls_cli_opt_strs+1418) -#define STARTTLS_name (gnutls_cli_opt_strs+1427) -#define STARTTLS_FLAGS (OPTST_DISABLED) - -/* - * udp option description: - */ -#define UDP_DESC (gnutls_cli_opt_strs+1436) -#define UDP_NAME (gnutls_cli_opt_strs+1469) -#define UDP_name (gnutls_cli_opt_strs+1473) -#define UDP_FLAGS (OPTST_DISABLED) - -/* - * mtu option description: - */ -#define MTU_DESC (gnutls_cli_opt_strs+1477) -#define MTU_NAME (gnutls_cli_opt_strs+1502) -#define MTU_name (gnutls_cli_opt_strs+1506) -#define MTU_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * crlf option description: - */ -#define CRLF_DESC (gnutls_cli_opt_strs+1510) -#define CRLF_NAME (gnutls_cli_opt_strs+1535) -#define CRLF_name (gnutls_cli_opt_strs+1540) -#define CRLF_FLAGS (OPTST_DISABLED) - -/* - * x509fmtder option description: - */ -#define X509FMTDER_DESC (gnutls_cli_opt_strs+1545) -#define X509FMTDER_NAME (gnutls_cli_opt_strs+1590) -#define X509FMTDER_name (gnutls_cli_opt_strs+1601) -#define X509FMTDER_FLAGS (OPTST_DISABLED) - -/* - * fingerprint option description: - */ -#define FINGERPRINT_DESC (gnutls_cli_opt_strs+1612) -#define FINGERPRINT_NAME (gnutls_cli_opt_strs+1661) -#define FINGERPRINT_name (gnutls_cli_opt_strs+1673) -#define FINGERPRINT_FLAGS (OPTST_DISABLED) - -/* - * print-cert option description: - */ -#define PRINT_CERT_DESC (gnutls_cli_opt_strs+1685) -#define PRINT_CERT_NAME (gnutls_cli_opt_strs+1724) -#define PRINT_CERT_name (gnutls_cli_opt_strs+1735) -#define PRINT_CERT_FLAGS (OPTST_DISABLED) - -/* - * dh-bits option description: - */ -#define DH_BITS_DESC (gnutls_cli_opt_strs+1746) -#define DH_BITS_NAME (gnutls_cli_opt_strs+1788) -#define DH_BITS_name (gnutls_cli_opt_strs+1796) -#define DH_BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * priority option description: - */ -#define PRIORITY_DESC (gnutls_cli_opt_strs+1804) -#define PRIORITY_NAME (gnutls_cli_opt_strs+1822) -#define PRIORITY_name (gnutls_cli_opt_strs+1831) -#define PRIORITY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * x509cafile option description: - */ -#define X509CAFILE_DESC (gnutls_cli_opt_strs+1840) -#define X509CAFILE_NAME (gnutls_cli_opt_strs+1880) -#define X509CAFILE_name (gnutls_cli_opt_strs+1891) -#define X509CAFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * x509crlfile option description: - */ -#define X509CRLFILE_DESC (gnutls_cli_opt_strs+1902) -#define X509CRLFILE_NAME (gnutls_cli_opt_strs+1918) -#define X509CRLFILE_name (gnutls_cli_opt_strs+1930) -#define X509CRLFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * pgpkeyfile option description: - */ -#define PGPKEYFILE_DESC (gnutls_cli_opt_strs+1942) -#define PGPKEYFILE_NAME (gnutls_cli_opt_strs+1962) -#define PGPKEYFILE_name (gnutls_cli_opt_strs+1973) -#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * pgpkeyring option description: - */ -#define PGPKEYRING_DESC (gnutls_cli_opt_strs+1984) -#define PGPKEYRING_NAME (gnutls_cli_opt_strs+2009) -#define PGPKEYRING_name (gnutls_cli_opt_strs+2020) -#define PGPKEYRING_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * pgpcertfile option description: - */ -#define PGPCERTFILE_DESC (gnutls_cli_opt_strs+2031) -#define PGPCERTFILE_NAME (gnutls_cli_opt_strs+2072) -#define PGPCERTFILE_name (gnutls_cli_opt_strs+2084) -#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * x509keyfile option description: - */ -#define X509KEYFILE_DESC (gnutls_cli_opt_strs+2096) -#define X509KEYFILE_NAME (gnutls_cli_opt_strs+2134) -#define X509KEYFILE_name (gnutls_cli_opt_strs+2146) -#define X509KEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * x509certfile option description: - */ -#define X509CERTFILE_DESC (gnutls_cli_opt_strs+2158) -#define X509CERTFILE_NAME (gnutls_cli_opt_strs+2204) -#define X509CERTFILE_name (gnutls_cli_opt_strs+2217) -#define X509CERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * pgpsubkey option description: - */ -#define PGPSUBKEY_DESC (gnutls_cli_opt_strs+2230) -#define PGPSUBKEY_NAME (gnutls_cli_opt_strs+2262) -#define PGPSUBKEY_name (gnutls_cli_opt_strs+2272) -#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * srpusername option description: - */ -#define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2282) -#define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2302) -#define SRPUSERNAME_name (gnutls_cli_opt_strs+2314) -#define SRPUSERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * srppasswd option description: - */ -#define SRPPASSWD_DESC (gnutls_cli_opt_strs+2326) -#define SRPPASSWD_NAME (gnutls_cli_opt_strs+2346) -#define SRPPASSWD_name (gnutls_cli_opt_strs+2356) -#define SRPPASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * pskusername option description: - */ -#define PSKUSERNAME_DESC (gnutls_cli_opt_strs+2366) -#define PSKUSERNAME_NAME (gnutls_cli_opt_strs+2386) -#define PSKUSERNAME_name (gnutls_cli_opt_strs+2398) -#define PSKUSERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * pskkey option description: - */ -#define PSKKEY_DESC (gnutls_cli_opt_strs+2410) -#define PSKKEY_NAME (gnutls_cli_opt_strs+2434) -#define PSKKEY_name (gnutls_cli_opt_strs+2441) -#define PSKKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * port option description: - */ -#define PORT_DESC (gnutls_cli_opt_strs+2448) -#define PORT_NAME (gnutls_cli_opt_strs+2482) -#define PORT_name (gnutls_cli_opt_strs+2487) -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * insecure option description: - */ -#define INSECURE_DESC (gnutls_cli_opt_strs+2492) -#define INSECURE_NAME (gnutls_cli_opt_strs+2553) -#define INSECURE_name (gnutls_cli_opt_strs+2562) -#define INSECURE_FLAGS (OPTST_DISABLED) - -/* - * ranges option description: - */ -#define RANGES_DESC (gnutls_cli_opt_strs+2571) -#define RANGES_NAME (gnutls_cli_opt_strs+2625) -#define RANGES_name (gnutls_cli_opt_strs+2632) -#define RANGES_FLAGS (OPTST_DISABLED) - -/* - * benchmark-ciphers option description: - */ -#define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+2639) -#define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+2668) -#define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+2686) -#define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) - -/* - * benchmark-soft-ciphers option description: - */ -#define BENCHMARK_SOFT_CIPHERS_DESC (gnutls_cli_opt_strs+2704) -#define BENCHMARK_SOFT_CIPHERS_NAME (gnutls_cli_opt_strs+2763) -#define BENCHMARK_SOFT_CIPHERS_name (gnutls_cli_opt_strs+2786) -#define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED) - -/* - * benchmark-tls-kx option description: - */ -#define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+2809) -#define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+2844) -#define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+2861) -#define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) - -/* - * benchmark-tls-ciphers option description: - */ -#define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+2878) -#define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+2900) -#define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+2922) -#define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) - -/* - * list option description: - */ -#define LIST_DESC (gnutls_cli_opt_strs+2944) -#define LIST_NAME (gnutls_cli_opt_strs+2995) -#define LIST_name (gnutls_cli_opt_strs+3000) -#define LIST_FLAGS (OPTST_DISABLED) - -/* - * noticket option description: - */ -#define NOTICKET_DESC (gnutls_cli_opt_strs+3005) -#define NOTICKET_NAME (gnutls_cli_opt_strs+3033) -#define NOTICKET_name (gnutls_cli_opt_strs+3042) -#define NOTICKET_FLAGS (OPTST_DISABLED) - -/* - * srtp_profiles option description: - */ -#define SRTP_PROFILES_DESC (gnutls_cli_opt_strs+3051) -#define SRTP_PROFILES_NAME (gnutls_cli_opt_strs+3071) -#define SRTP_PROFILES_name (gnutls_cli_opt_strs+3085) -#define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * alpn option description: - */ -#define ALPN_DESC (gnutls_cli_opt_strs+3099) -#define ALPN_NAME (gnutls_cli_opt_strs+3126) -#define ALPN_name (gnutls_cli_opt_strs+3131) -#define ALPN_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * heartbeat option description: - */ -#define HEARTBEAT_DESC (gnutls_cli_opt_strs+3136) -#define HEARTBEAT_NAME (gnutls_cli_opt_strs+3163) -#define HEARTBEAT_name (gnutls_cli_opt_strs+3173) -#define HEARTBEAT_FLAGS (OPTST_DISABLED) - -/* - * recordsize option description: - */ -#define RECORDSIZE_DESC (gnutls_cli_opt_strs+3183) -#define RECORDSIZE_NAME (gnutls_cli_opt_strs+3220) -#define RECORDSIZE_name (gnutls_cli_opt_strs+3231) -#define RECORDSIZE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * disable-sni option description: - */ -#define DISABLE_SNI_DESC (gnutls_cli_opt_strs+3242) -#define DISABLE_SNI_NAME (gnutls_cli_opt_strs+3285) -#define DISABLE_SNI_name (gnutls_cli_opt_strs+3297) -#define DISABLE_SNI_FLAGS (OPTST_DISABLED) - -/* - * disable-extensions option description: - */ -#define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+3309) -#define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+3340) -#define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+3359) -#define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED) - -/* - * inline-commands option description: - */ -#define INLINE_COMMANDS_DESC (gnutls_cli_opt_strs+3378) -#define INLINE_COMMANDS_NAME (gnutls_cli_opt_strs+3414) -#define INLINE_COMMANDS_name (gnutls_cli_opt_strs+3430) -#define INLINE_COMMANDS_FLAGS (OPTST_DISABLED) - -/* - * inline-commands-prefix option description: - */ -#define INLINE_COMMANDS_PREFIX_DESC (gnutls_cli_opt_strs+3446) -#define INLINE_COMMANDS_PREFIX_NAME (gnutls_cli_opt_strs+3570) -#define INLINE_COMMANDS_PREFIX_name (gnutls_cli_opt_strs+3593) -#define INLINE_COMMANDS_PREFIX_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_cli_opt_strs+3616) -#define HELP_name (gnutls_cli_opt_strs+3660) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_cli_opt_strs+3665) -#define MORE_HELP_name (gnutls_cli_opt_strs+3710) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (gnutls_cli_opt_strs+3720) -#define VER_name (gnutls_cli_opt_strs+3756) -/* - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptMtu, doOptPgpcertfile, doOptPgpkeyfile, - doOptPgpkeyring, doOptRecordsize, doOptX509crlfile, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the gnutls-cli Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the gnutls-cli program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, - /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verbose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_TOFU, - /* equiv idx, value */ 2, VALUE_OPT_TOFU, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TOFU_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --tofu */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name, - /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX }, - - { /* entry idx, value */ 3, VALUE_OPT_DANE, - /* equiv idx, value */ 3, VALUE_OPT_DANE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DANE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dane */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DANE_DESC, DANE_NAME, DANE_name, - /* disablement strs */ NOT_DANE_name, NOT_DANE_PFX }, - - { /* entry idx, value */ 4, VALUE_OPT_LOCAL_DNS, - /* equiv idx, value */ 4, VALUE_OPT_LOCAL_DNS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOCAL_DNS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --local-dns */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOCAL_DNS_DESC, LOCAL_DNS_NAME, LOCAL_DNS_name, - /* disablement strs */ NOT_LOCAL_DNS_name, NOT_LOCAL_DNS_PFX }, - - { /* entry idx, value */ 5, VALUE_OPT_CA_VERIFICATION, - /* equiv idx, value */ 5, VALUE_OPT_CA_VERIFICATION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CA_VERIFICATION_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ca-verification */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CA_VERIFICATION_DESC, CA_VERIFICATION_NAME, CA_VERIFICATION_name, - /* disablement strs */ NOT_CA_VERIFICATION_name, NOT_CA_VERIFICATION_PFX }, - - { /* entry idx, value */ 6, VALUE_OPT_OCSP, - /* equiv idx, value */ 6, VALUE_OPT_OCSP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OCSP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ocsp */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name, - /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX }, - - { /* entry idx, value */ 7, VALUE_OPT_RESUME, - /* equiv idx, value */ 7, VALUE_OPT_RESUME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ RESUME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --resume */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_REHANDSHAKE, - /* equiv idx, value */ 8, VALUE_OPT_REHANDSHAKE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ REHANDSHAKE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --rehandshake */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ REHANDSHAKE_DESC, REHANDSHAKE_NAME, REHANDSHAKE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_STARTTLS, - /* equiv idx, value */ 9, VALUE_OPT_STARTTLS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STARTTLS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --starttls */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ STARTTLS_DESC, STARTTLS_NAME, STARTTLS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_UDP, - /* equiv idx, value */ 10, VALUE_OPT_UDP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ UDP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --udp */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_MTU, - /* equiv idx, value */ 11, VALUE_OPT_MTU, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MTU_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mtu */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptMtu, - /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_CRLF, - /* equiv idx, value */ 12, VALUE_OPT_CRLF, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CRLF_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --crlf */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_X509FMTDER, - /* equiv idx, value */ 13, VALUE_OPT_X509FMTDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509FMTDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509fmtder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_FINGERPRINT, - /* equiv idx, value */ 14, VALUE_OPT_FINGERPRINT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ FINGERPRINT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --fingerprint */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, FINGERPRINT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 15, VALUE_OPT_PRINT_CERT, - /* equiv idx, value */ 15, VALUE_OPT_PRINT_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRINT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --print-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_DH_BITS, - /* equiv idx, value */ 16, VALUE_OPT_DH_BITS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DH_BITS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dh-bits */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ DH_BITS_DESC, DH_BITS_NAME, DH_BITS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_PRIORITY, - /* equiv idx, value */ 17, VALUE_OPT_PRIORITY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRIORITY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --priority */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_X509CAFILE, - /* equiv idx, value */ 18, VALUE_OPT_X509CAFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CAFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509cafile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_X509CRLFILE, - /* equiv idx, value */ 19, VALUE_OPT_X509CRLFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CRLFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509crlfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptX509crlfile, - /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_PGPKEYFILE, - /* equiv idx, value */ 20, VALUE_OPT_PGPKEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpkeyfile, - /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_PGPKEYRING, - /* equiv idx, value */ 21, VALUE_OPT_PGPKEYRING, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPKEYRING_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpkeyring */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpkeyring, - /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 22, VALUE_OPT_PGPCERTFILE, - /* equiv idx, value */ 22, VALUE_OPT_PGPCERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpcertfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpcertfile, - /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_X509KEYFILE, - /* equiv idx, value */ 23, VALUE_OPT_X509KEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509KEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509keyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 24, VALUE_OPT_X509CERTFILE, - /* equiv idx, value */ 24, VALUE_OPT_X509CERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509certfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_PGPSUBKEY, - /* equiv idx, value */ 25, VALUE_OPT_PGPSUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPSUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpsubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 26, VALUE_OPT_SRPUSERNAME, - /* equiv idx, value */ 26, VALUE_OPT_SRPUSERNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRPUSERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srpusername */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, SRPUSERNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_SRPPASSWD, - /* equiv idx, value */ 27, VALUE_OPT_SRPPASSWD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRPPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srppasswd */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_PSKUSERNAME, - /* equiv idx, value */ 28, VALUE_OPT_PSKUSERNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PSKUSERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pskusername */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, PSKUSERNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 29, VALUE_OPT_PSKKEY, - /* equiv idx, value */ 29, VALUE_OPT_PSKKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PSKKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pskkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 30, VALUE_OPT_PORT, - /* equiv idx, value */ 30, VALUE_OPT_PORT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --port */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 31, VALUE_OPT_INSECURE, - /* equiv idx, value */ 31, VALUE_OPT_INSECURE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INSECURE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --insecure */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 32, VALUE_OPT_RANGES, - /* equiv idx, value */ 32, VALUE_OPT_RANGES, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ RANGES_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ranges */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ RANGES_DESC, RANGES_NAME, RANGES_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 33, VALUE_OPT_BENCHMARK_CIPHERS, - /* equiv idx, value */ 33, VALUE_OPT_BENCHMARK_CIPHERS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BENCHMARK_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --benchmark-ciphers */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, BENCHMARK_CIPHERS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 34, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, - /* equiv idx, value */ 34, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 35, VALUE_OPT_BENCHMARK_TLS_KX, - /* equiv idx, value */ 35, VALUE_OPT_BENCHMARK_TLS_KX, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BENCHMARK_TLS_KX_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --benchmark-tls-kx */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ BENCHMARK_TLS_KX_DESC, BENCHMARK_TLS_KX_NAME, BENCHMARK_TLS_KX_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 36, VALUE_OPT_BENCHMARK_TLS_CIPHERS, - /* equiv idx, value */ 36, VALUE_OPT_BENCHMARK_TLS_CIPHERS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BENCHMARK_TLS_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --benchmark-tls-ciphers */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ BENCHMARK_TLS_CIPHERS_DESC, BENCHMARK_TLS_CIPHERS_NAME, BENCHMARK_TLS_CIPHERS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 37, VALUE_OPT_LIST, - /* equiv idx, value */ 37, VALUE_OPT_LIST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 38, VALUE_OPT_NOTICKET, - /* equiv idx, value */ 38, VALUE_OPT_NOTICKET, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NOTICKET_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --noticket */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 39, VALUE_OPT_SRTP_PROFILES, - /* equiv idx, value */ 39, VALUE_OPT_SRTP_PROFILES, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRTP_PROFILES_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srtp_profiles */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, SRTP_PROFILES_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 40, VALUE_OPT_ALPN, - /* equiv idx, value */ 40, VALUE_OPT_ALPN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ ALPN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --alpn */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionStackArg, - /* desc, NAME, name */ ALPN_DESC, ALPN_NAME, ALPN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 41, VALUE_OPT_HEARTBEAT, - /* equiv idx, value */ 41, VALUE_OPT_HEARTBEAT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HEARTBEAT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --heartbeat */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 42, VALUE_OPT_RECORDSIZE, - /* equiv idx, value */ 42, VALUE_OPT_RECORDSIZE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ RECORDSIZE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --recordsize */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptRecordsize, - /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 43, VALUE_OPT_DISABLE_SNI, - /* equiv idx, value */ 43, VALUE_OPT_DISABLE_SNI, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DISABLE_SNI_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --disable-sni */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DISABLE_SNI_DESC, DISABLE_SNI_NAME, DISABLE_SNI_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 44, VALUE_OPT_DISABLE_EXTENSIONS, - /* equiv idx, value */ 44, VALUE_OPT_DISABLE_EXTENSIONS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DISABLE_EXTENSIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --disable-extensions */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, DISABLE_EXTENSIONS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 45, VALUE_OPT_INLINE_COMMANDS, - /* equiv idx, value */ 45, VALUE_OPT_INLINE_COMMANDS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INLINE_COMMANDS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inline-commands */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INLINE_COMMANDS_DESC, INLINE_COMMANDS_NAME, INLINE_COMMANDS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 46, VALUE_OPT_INLINE_COMMANDS_PREFIX, - /* equiv idx, value */ 46, VALUE_OPT_INLINE_COMMANDS_PREFIX, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INLINE_COMMANDS_PREFIX_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inline-commands-prefix */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INLINE_COMMANDS_PREFIX_DESC, INLINE_COMMANDS_PREFIX_NAME, INLINE_COMMANDS_PREFIX_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the gnutls-cli Option Environment - */ -#define zPROGNAME (gnutls_cli_opt_strs+3764) -#define zUsageTitle (gnutls_cli_opt_strs+3775) -#define zRcName NULL -#define apzHomeList NULL -#define zBugsAddr (gnutls_cli_opt_strs+3888) -#define zExplain (gnutls_cli_opt_strs+3907) -#define zDetail (gnutls_cli_opt_strs+3910) -#define zFullVersion (gnutls_cli_opt_strs+4094) -/* extracted from optcode.tlib near line 353 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - - -#define gnutls_cli_full_usage (NULL) - -#define gnutls_cli_short_usage (gnutls_cli_opt_strs+4115) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param pOptions the AutoOpts option description structure - * @param pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the mtu option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0, 17000 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509crlfile option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpkeyfile option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpkeyring option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpcertfile option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the recordsize option. - * - * @param pOptions the gnutls-cli options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0, 4096 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} -/* extracted from optmain.tlib near line 1188 */ - -/** - * The directory containing the data associated with gnutls-cli. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged gnutls-cli - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define gnutls_cli_packager_info NULL -#else -static char const gnutls_cli_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for gnutls-cli. The one structure that - * binds them all. - */ -tOptions gnutls_cliOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_REORDER - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 50 /* full option count */, 47 /* user option count */, - gnutls_cli_full_usage, gnutls_cli_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_cli_packager_info -}; - -#if ENABLE_NLS -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(GNUTLS_CLI_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the gnutls_cliOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &gnutls_cliOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - tOptDesc * od = opts->pOptDesc; - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - coerce_it((void*)&(opts->pzPackager)); - coerce_it((void*)&(opts->pzShortUsage)); - - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - - if ((opts->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc * od = opts->pOptDesc; - int ix; - - for (ix = opts->optCt; ix > 0; ix--, od++) { - coerce_it((void*)&(od->pz_Name)); - coerce_it((void*)&(od->pz_DisableName)); - coerce_it((void*)&(od->pz_DisablePfx)); - } - gnutls_cliOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; - } -} - -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -/* cli-args.c ends here */ diff --git a/src/cli-args.h b/src/cli-args.h deleted file mode 100644 index a163dcf1d8..0000000000 --- a/src/cli-args.h +++ /dev/null @@ -1,288 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-args.h) - * - * It has been AutoGen-ed October 23, 2013 at 12:39:20 PM by AutoGen 5.17 - * From the definitions cli-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-cli author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-cli program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * gnutls-cli is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-cli is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/* - * This file contains the programmatic interface to the Automated - * Options generated for the gnutls-cli program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_CLI_ARGS_H_GUARD -#define AUTOOPTS_CLI_ARGS_H_GUARD 1 -#include "config.h" -#include - -/* - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 151552 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/* - * Enumeration of each option: - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_TOFU = 2, - INDEX_OPT_DANE = 3, - INDEX_OPT_LOCAL_DNS = 4, - INDEX_OPT_CA_VERIFICATION = 5, - INDEX_OPT_OCSP = 6, - INDEX_OPT_RESUME = 7, - INDEX_OPT_REHANDSHAKE = 8, - INDEX_OPT_STARTTLS = 9, - INDEX_OPT_UDP = 10, - INDEX_OPT_MTU = 11, - INDEX_OPT_CRLF = 12, - INDEX_OPT_X509FMTDER = 13, - INDEX_OPT_FINGERPRINT = 14, - INDEX_OPT_PRINT_CERT = 15, - INDEX_OPT_DH_BITS = 16, - INDEX_OPT_PRIORITY = 17, - INDEX_OPT_X509CAFILE = 18, - INDEX_OPT_X509CRLFILE = 19, - INDEX_OPT_PGPKEYFILE = 20, - INDEX_OPT_PGPKEYRING = 21, - INDEX_OPT_PGPCERTFILE = 22, - INDEX_OPT_X509KEYFILE = 23, - INDEX_OPT_X509CERTFILE = 24, - INDEX_OPT_PGPSUBKEY = 25, - INDEX_OPT_SRPUSERNAME = 26, - INDEX_OPT_SRPPASSWD = 27, - INDEX_OPT_PSKUSERNAME = 28, - INDEX_OPT_PSKKEY = 29, - INDEX_OPT_PORT = 30, - INDEX_OPT_INSECURE = 31, - INDEX_OPT_RANGES = 32, - INDEX_OPT_BENCHMARK_CIPHERS = 33, - INDEX_OPT_BENCHMARK_SOFT_CIPHERS = 34, - INDEX_OPT_BENCHMARK_TLS_KX = 35, - INDEX_OPT_BENCHMARK_TLS_CIPHERS = 36, - INDEX_OPT_LIST = 37, - INDEX_OPT_NOTICKET = 38, - INDEX_OPT_SRTP_PROFILES = 39, - INDEX_OPT_ALPN = 40, - INDEX_OPT_HEARTBEAT = 41, - INDEX_OPT_RECORDSIZE = 42, - INDEX_OPT_DISABLE_SNI = 43, - INDEX_OPT_DISABLE_EXTENSIONS = 44, - INDEX_OPT_INLINE_COMMANDS = 45, - INDEX_OPT_INLINE_COMMANDS_PREFIX = 46, - INDEX_OPT_VERSION = 47, - INDEX_OPT_HELP = 48, - INDEX_OPT_MORE_HELP = 49 -} teOptIndex; - -#define OPTION_CT 50 -#define GNUTLS_CLI_VERSION "@VERSION@" -#define GNUTLS_CLI_FULL_VERSION "gnutls-cli @VERSION@" - -/* - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (gnutls_cliOptions.pOptDesc[INDEX_OPT_## n]) -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -#define OPT_ARG(n) (DESC(n).optArg.argString) -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -#define COUNT_OPT(n) (DESC(n).optOccCt) -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * - * - * Enumeration of gnutls-cli exit codes - */ -typedef enum { - GNUTLS_CLI_EXIT_SUCCESS = 0, - GNUTLS_CLI_EXIT_FAILURE = 1, - GNUTLS_CLI_EXIT_USAGE_ERROR = 64, - GNUTLS_CLI_EXIT_LIBOPTS_FAILURE = 70 -} gnutls_cli_exit_code_t; -/* * * * * * - * - * Interface defines for specific options. - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_VERBOSE 'V' -#define VALUE_OPT_TOFU 2 -#define VALUE_OPT_DANE 3 -#define VALUE_OPT_LOCAL_DNS 4 -#define VALUE_OPT_CA_VERIFICATION 5 -#define VALUE_OPT_OCSP 6 -#define VALUE_OPT_RESUME 'r' -#define VALUE_OPT_REHANDSHAKE 'e' -#define VALUE_OPT_STARTTLS 's' -#define VALUE_OPT_UDP 'u' -#define VALUE_OPT_MTU 11 - -#define OPT_VALUE_MTU (DESC(MTU).optArg.argInt) -#define VALUE_OPT_CRLF 12 -#define VALUE_OPT_X509FMTDER 13 -#define VALUE_OPT_FINGERPRINT 'f' -#define VALUE_OPT_PRINT_CERT 15 -#define VALUE_OPT_DH_BITS 16 - -#define OPT_VALUE_DH_BITS (DESC(DH_BITS).optArg.argInt) -#define VALUE_OPT_PRIORITY 17 -#define VALUE_OPT_X509CAFILE 18 -#define VALUE_OPT_X509CRLFILE 19 -#define VALUE_OPT_PGPKEYFILE 20 -#define VALUE_OPT_PGPKEYRING 21 -#define VALUE_OPT_PGPCERTFILE 22 -#define VALUE_OPT_X509KEYFILE 23 -#define VALUE_OPT_X509CERTFILE 24 -#define VALUE_OPT_PGPSUBKEY 25 -#define VALUE_OPT_SRPUSERNAME 26 -#define VALUE_OPT_SRPPASSWD 27 -#define VALUE_OPT_PSKUSERNAME 28 -#define VALUE_OPT_PSKKEY 29 -#define VALUE_OPT_PORT 'p' -#define VALUE_OPT_INSECURE 31 -#define VALUE_OPT_RANGES 32 -#define VALUE_OPT_BENCHMARK_CIPHERS 129 -#define VALUE_OPT_BENCHMARK_SOFT_CIPHERS 130 -#define VALUE_OPT_BENCHMARK_TLS_KX 131 -#define VALUE_OPT_BENCHMARK_TLS_CIPHERS 132 -#define VALUE_OPT_LIST 'l' -#define VALUE_OPT_NOTICKET 134 -#define VALUE_OPT_SRTP_PROFILES 135 -#define VALUE_OPT_ALPN 136 -#define VALUE_OPT_HEARTBEAT 'b' -#define VALUE_OPT_RECORDSIZE 138 - -#define OPT_VALUE_RECORDSIZE (DESC(RECORDSIZE).optArg.argInt) -#define VALUE_OPT_DISABLE_SNI 139 -#define VALUE_OPT_DISABLE_EXTENSIONS 140 -#define VALUE_OPT_INLINE_COMMANDS 141 -#define VALUE_OPT_INLINE_COMMANDS_PREFIX 142 -#define VALUE_OPT_HELP 'h' -#define VALUE_OPT_MORE_HELP '!' -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(gnutls_cliOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(gnutls_cliOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - gnutls_cliOptions.curOptIdx = (n); \ - gnutls_cliOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*gnutls_cliOptions.pUsageProc)(&gnutls_cliOptions, c) -/* extracted from opthead.tlib near line 497 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the gnutls-cli option descriptor. - */ -extern tOptions gnutls_cliOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(gnutls_cliOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(gnutls_cliOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(gnutls_cliOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(gnutls_cliOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_CLI_ARGS_H_GUARD */ -/* cli-args.h ends here */ diff --git a/src/cli-debug-args.c b/src/cli-debug-args.c deleted file mode 100644 index 816ced85dc..0000000000 --- a/src/cli-debug-args.c +++ /dev/null @@ -1,943 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-debug-args.c) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:27 PM by AutoGen 5.17.3 - * From the definitions cli-debug-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-cli-debug author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-cli-debug program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * gnutls-cli-debug is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-cli-debug is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "cli-debug-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (gnutls_cli_debug_opt_strs+0) -#define zLicenseDescrip (gnutls_cli_debug_opt_strs+283) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for gnutls-cli-debug options - */ -static char const gnutls_cli_debug_opt_strs[1818] = -/* 0 */ "gnutls-cli-debug @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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 283 */ "gnutls-cli-debug is free software: you can redistribute it and/or modify it\n" - "under the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "gnutls-cli-debug is distributed in the hope that it will be useful, but\n" - "WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n" - "or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n" - "for more details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 904 */ "Enable debugging.\0" -/* 922 */ "DEBUG\0" -/* 928 */ "debug\0" -/* 934 */ "More verbose output\0" -/* 954 */ "VERBOSE\0" -/* 962 */ "verbose\0" -/* 970 */ "The port to connect to\0" -/* 993 */ "PORT\0" -/* 998 */ "port\0" -/* 1003 */ "display extended usage information and exit\0" -/* 1047 */ "help\0" -/* 1052 */ "extended usage information passed thru pager\0" -/* 1097 */ "more-help\0" -/* 1107 */ "output version information and exit\0" -/* 1143 */ "version\0" -/* 1151 */ "GNUTLS_CLI_DEBUG\0" -/* 1168 */ "gnutls-cli-debug - GnuTLS debug client\n" - "Usage: %s [ - [] | --[{=| }] ]... \n\0" -/* 1266 */ "bug-gnutls@gnu.org\0" -/* 1285 */ "\n\0" -/* 1287 */ "TLS debug client. It sets up multiple TLS connections to a server and\n" - "queries its capabilities. It was created to assist in debugging GnuTLS,\n" - "but it might be useful to extract a TLS server's capabilities. It connects\n" - "to a TLS server, performs tests and print the server's capabilities. If\n" - "called with the `-v' parameter more checks will be performed. Can be used\n" - "to check for servers with special needs or bugs.\n\0" -/* 1705 */ "gnutls-cli-debug @VERSION@\0" -/* 1732 */ "Usage: gnutls-cli-debug [options] hostname\n" - "gnutls-cli --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (gnutls_cli_debug_opt_strs+904) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (gnutls_cli_debug_opt_strs+922) -/** Name string for the debug option */ -#define DEBUG_name (gnutls_cli_debug_opt_strs+928) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * verbose option description: - */ -/** Descriptive text for the verbose option */ -#define VERBOSE_DESC (gnutls_cli_debug_opt_strs+934) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (gnutls_cli_debug_opt_strs+954) -/** Name string for the verbose option */ -#define VERBOSE_name (gnutls_cli_debug_opt_strs+962) -/** Compiled in flag settings for the verbose option */ -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/** - * port option description: - */ -/** Descriptive text for the port option */ -#define PORT_DESC (gnutls_cli_debug_opt_strs+970) -/** Upper-cased name for the port option */ -#define PORT_NAME (gnutls_cli_debug_opt_strs+993) -/** Name string for the port option */ -#define PORT_name (gnutls_cli_debug_opt_strs+998) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_cli_debug_opt_strs+1003) -#define HELP_name (gnutls_cli_debug_opt_strs+1047) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_cli_debug_opt_strs+1052) -#define MORE_HELP_name (gnutls_cli_debug_opt_strs+1097) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (gnutls_cli_debug_opt_strs+1107) -#define VER_name (gnutls_cli_debug_opt_strs+1143) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptPort, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the gnutls-cli-debug Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the gnutls-cli-debug program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, - /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verbose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_PORT, - /* equiv idx, value */ 2, VALUE_OPT_PORT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --port */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPort, - /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of gnutls-cli-debug. */ -#define zPROGNAME (gnutls_cli_debug_opt_strs+1151) -/** Reference to the title line for gnutls-cli-debug usage. */ -#define zUsageTitle (gnutls_cli_debug_opt_strs+1168) -/** There is no gnutls-cli-debug configuration file. */ -#define zRcName NULL -/** There are no directories to search for gnutls-cli-debug config files. */ -#define apzHomeList NULL -/** The gnutls-cli-debug program bug email address. */ -#define zBugsAddr (gnutls_cli_debug_opt_strs+1266) -/** Clarification/explanation of what gnutls-cli-debug does. */ -#define zExplain (gnutls_cli_debug_opt_strs+1285) -/** Extra detail explaining what gnutls-cli-debug does. */ -#define zDetail (gnutls_cli_debug_opt_strs+1287) -/** The full version string for gnutls-cli-debug. */ -#define zFullVersion (gnutls_cli_debug_opt_strs+1705) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define gnutls_cli_debug_full_usage (NULL) -#define gnutls_cli_debug_short_usage (gnutls_cli_debug_opt_strs+1732) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&gnutls_cli_debugOptions, GNUTLS_CLI_DEBUG_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the gnutls-cli-debug options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the port option. - * - * @param[in] pOptions the gnutls-cli-debug options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPort(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 65536 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with gnutls-cli-debug. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged gnutls-cli-debug - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define gnutls_cli_debug_packager_info NULL -#else -/** Packager information for gnutls-cli-debug. */ -static char const gnutls_cli_debug_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport gnutls_cli_debug bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for gnutls-cli-debug. The one structure that - * binds them all. - */ -tOptions gnutls_cli_debugOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_ARGS_REQ - + OPTPROC_REORDER - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 6 /* full option count */, 3 /* user option count */, - gnutls_cli_debug_full_usage, gnutls_cli_debug_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_cli_debug_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * gnutls-cli-debug program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(GNUTLS_CLI_DEBUG_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the gnutls_cli_debugOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &gnutls_cli_debugOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the gnutls_cli_debugOptions structure noted in the comments below. The - literal text is defined in gnutls_cli_debug_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - gnutls_cli_debug_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via gnutls_cli_debugOptions.pzCopyright */ - puts(_("gnutls-cli-debug @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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via gnutls_cli_debugOptions.pzCopyNotice */ - puts(_("gnutls-cli-debug is free software: you can redistribute it and/or modify it\n\ -under the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("gnutls-cli-debug is distributed in the hope that it will be useful, but\n\ -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n\ -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\ -for more details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("More verbose output")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("The port to connect to")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via gnutls_cli_debugOptions.pzUsageTitle */ - puts(_("gnutls-cli-debug - GnuTLS debug client\n\ -Usage: %s [ - [] | --[{=| }] ]... \n")); - - /* referenced via gnutls_cli_debugOptions.pzExplain */ - puts(_("\n")); - - /* referenced via gnutls_cli_debugOptions.pzDetail */ - puts(_("TLS debug client. It sets up multiple TLS connections to a server and\n\ -queries its capabilities. It was created to assist in debugging GnuTLS,\n\ -but it might be useful to extract a TLS server's capabilities. It connects\n\ -to a TLS server, performs tests and print the server's capabilities. If\n\ -called with the `-v' parameter more checks will be performed. Can be used\n\ -to check for servers with special needs or bugs.\n")); - - /* referenced via gnutls_cli_debugOptions.pzFullVersion */ - puts(_("gnutls-cli-debug @VERSION@")); - - /* referenced via gnutls_cli_debugOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via gnutls_cli_debugOptions.pzShortUsage */ - puts(_("Usage: gnutls-cli-debug [options] hostname\n\ -gnutls-cli --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* cli-debug-args.c ends here */ diff --git a/src/cli-debug-args.h b/src/cli-debug-args.h deleted file mode 100644 index 33dcc9a1f3..0000000000 --- a/src/cli-debug-args.h +++ /dev/null @@ -1,216 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-debug-args.h) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:27 PM by AutoGen 5.17.3 - * From the definitions cli-debug-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-cli-debug author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-cli-debug program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * gnutls-cli-debug is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-cli-debug is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the gnutls-cli-debug program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD -#define AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for gnutls-cli-debug - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_PORT = 2, - INDEX_OPT_VERSION = 3, - INDEX_OPT_HELP = 4, - INDEX_OPT_MORE_HELP = 5 -} teOptIndex; -/** count of all options for gnutls-cli-debug */ -#define OPTION_CT 6 -/** gnutls-cli-debug version */ -#define GNUTLS_CLI_DEBUG_VERSION "@VERSION@" -/** Full gnutls-cli-debug version text */ -#define GNUTLS_CLI_DEBUG_FULL_VERSION "gnutls-cli-debug @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (gnutls_cli_debugOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of gnutls-cli-debug exit codes - */ -typedef enum { - GNUTLS_CLI_DEBUG_EXIT_SUCCESS = 0, - GNUTLS_CLI_DEBUG_EXIT_FAILURE = 1, - GNUTLS_CLI_DEBUG_EXIT_USAGE_ERROR = 64, - GNUTLS_CLI_DEBUG_EXIT_LIBOPTS_FAILURE = 70 -} gnutls_cli_debug_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_VERBOSE 'V' -#define VALUE_OPT_PORT 'p' - -#define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(gnutls_cli_debugOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(gnutls_cli_debugOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - gnutls_cli_debugOptions.curOptIdx = (n); \ - gnutls_cli_debugOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*gnutls_cli_debugOptions.pUsageProc)(&gnutls_cli_debugOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the gnutls-cli-debug option descriptor. - */ -extern tOptions gnutls_cli_debugOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(gnutls_cli_debugOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(gnutls_cli_debugOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(gnutls_cli_debugOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(gnutls_cli_debugOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD */ -/* cli-debug-args.h ends here */ diff --git a/src/danetool-args.c b/src/danetool-args.c deleted file mode 100644 index 33df28c4ec..0000000000 --- a/src/danetool-args.c +++ /dev/null @@ -1,1578 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (danetool-args.c) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:28 PM by AutoGen 5.17.3 - * From the definitions danetool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the danetool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The danetool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * danetool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * danetool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "danetool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (danetool_opt_strs+0) -#define zLicenseDescrip (danetool_opt_strs+275) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for danetool options - */ -static char const danetool_opt_strs[2503] = -/* 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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 275 */ "danetool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "danetool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 880 */ "Enable debugging.\0" -/* 898 */ "DEBUG\0" -/* 904 */ "debug\0" -/* 910 */ "More verbose output\0" -/* 930 */ "VERBOSE\0" -/* 938 */ "verbose\0" -/* 946 */ "Input file\0" -/* 957 */ "INFILE\0" -/* 964 */ "infile\0" -/* 971 */ "Output file\0" -/* 983 */ "OUTFILE\0" -/* 991 */ "outfile\0" -/* 999 */ "Loads a public key file\0" -/* 1023 */ "LOAD_PUBKEY\0" -/* 1035 */ "load-pubkey\0" -/* 1047 */ "Loads a certificate file\0" -/* 1072 */ "LOAD_CERTIFICATE\0" -/* 1089 */ "load-certificate\0" -/* 1106 */ "Sets a DLV file\0" -/* 1122 */ "DLV\0" -/* 1126 */ "dlv\0" -/* 1130 */ "Hash algorithm to use for signing.\0" -/* 1165 */ "HASH\0" -/* 1170 */ "hash\0" -/* 1175 */ "Check a host's DANE TLSA entry.\0" -/* 1207 */ "CHECK\0" -/* 1213 */ "check\0" -/* 1219 */ "Check only the end-entity's certificate.\0" -/* 1260 */ "CHECK_EE\0" -/* 1269 */ "check-ee\0" -/* 1278 */ "Check only the CA's certificate.\0" -/* 1311 */ "CHECK_CA\0" -/* 1320 */ "check-ca\0" -/* 1329 */ "Do not verify any DNSSEC signature.\0" -/* 1365 */ "INSECURE\0" -/* 1374 */ "insecure\0" -/* 1383 */ "Use the local DNS server for DNSSEC resolving.\0" -/* 1430 */ "LOCAL_DNS\0" -/* 1440 */ "no-local-dns\0" -/* 1453 */ "no\0" -/* 1456 */ "Use DER format for input certificates and private keys.\0" -/* 1512 */ "INDER\0" -/* 1518 */ "no-inder\0" -/* 1527 */ "an alias for the 'inder' option\0" -/* 1559 */ "inraw\0" -/* 1565 */ "Print the DANE RR data on a certificate or public key\0" -/* 1619 */ "TLSA_RR\0" -/* 1627 */ "tlsa-rr\0" -/* 1635 */ "Specify the hostname to be used in the DANE RR\0" -/* 1682 */ "HOST\0" -/* 1687 */ "host\0" -/* 1692 */ "The protocol set for DANE data (tcp, udp etc.)\0" -/* 1739 */ "PROTO\0" -/* 1745 */ "proto\0" -/* 1751 */ "Specify the port number for the DANE data.\0" -/* 1794 */ "PORT\0" -/* 1799 */ "port\0" -/* 1804 */ "Whether the provided certificate or public key is a Certificate\n" - "Authority.\0" -/* 1879 */ "CA\0" -/* 1882 */ "ca\0" -/* 1885 */ "Use the hash of the X.509 certificate, rather than the public key.\0" -/* 1952 */ "X509\0" -/* 1957 */ "x509\0" -/* 1962 */ "an alias for the 'domain' option\0" -/* 1995 */ "local\0" -/* 2001 */ "The provided certificate or public key is issued by the local domain.\0" -/* 2071 */ "DOMAIN\0" -/* 2078 */ "no-domain\0" -/* 2088 */ "display extended usage information and exit\0" -/* 2132 */ "help\0" -/* 2137 */ "extended usage information passed thru pager\0" -/* 2182 */ "more-help\0" -/* 2192 */ "output version information and exit\0" -/* 2228 */ "version\0" -/* 2236 */ "DANETOOL\0" -/* 2245 */ "danetool - GnuTLS DANE tool\n" - "Usage: %s [ - [] | --[{=| }] ]...\n\0" -/* 2331 */ "bug-gnutls@gnu.org\0" -/* 2350 */ "\n\0" -/* 2352 */ "Tool to generate and check DNS resource records for the DANE protocol.\n\0" -/* 2424 */ "danetool @VERSION@\0" -/* 2443 */ "danetool [options]\n" - "danetool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (danetool_opt_strs+880) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (danetool_opt_strs+898) -/** Name string for the debug option */ -#define DEBUG_name (danetool_opt_strs+904) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * verbose option description: - */ -/** Descriptive text for the verbose option */ -#define VERBOSE_DESC (danetool_opt_strs+910) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (danetool_opt_strs+930) -/** Name string for the verbose option */ -#define VERBOSE_name (danetool_opt_strs+938) -/** Compiled in flag settings for the verbose option */ -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/** - * infile option description: - */ -/** Descriptive text for the infile option */ -#define INFILE_DESC (danetool_opt_strs+946) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (danetool_opt_strs+957) -/** Name string for the infile option */ -#define INFILE_name (danetool_opt_strs+964) -/** Compiled in flag settings for the infile option */ -#define INFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * outfile option description: - */ -/** Descriptive text for the outfile option */ -#define OUTFILE_DESC (danetool_opt_strs+971) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (danetool_opt_strs+983) -/** Name string for the outfile option */ -#define OUTFILE_name (danetool_opt_strs+991) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-pubkey option description: - */ -/** Descriptive text for the load-pubkey option */ -#define LOAD_PUBKEY_DESC (danetool_opt_strs+999) -/** Upper-cased name for the load-pubkey option */ -#define LOAD_PUBKEY_NAME (danetool_opt_strs+1023) -/** Name string for the load-pubkey option */ -#define LOAD_PUBKEY_name (danetool_opt_strs+1035) -/** Compiled in flag settings for the load-pubkey option */ -#define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-certificate option description: - */ -/** Descriptive text for the load-certificate option */ -#define LOAD_CERTIFICATE_DESC (danetool_opt_strs+1047) -/** Upper-cased name for the load-certificate option */ -#define LOAD_CERTIFICATE_NAME (danetool_opt_strs+1072) -/** Name string for the load-certificate option */ -#define LOAD_CERTIFICATE_name (danetool_opt_strs+1089) -/** Compiled in flag settings for the load-certificate option */ -#define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * dlv option description: - */ -/** Descriptive text for the dlv option */ -#define DLV_DESC (danetool_opt_strs+1106) -/** Upper-cased name for the dlv option */ -#define DLV_NAME (danetool_opt_strs+1122) -/** Name string for the dlv option */ -#define DLV_name (danetool_opt_strs+1126) -/** Compiled in flag settings for the dlv option */ -#define DLV_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * hash option description: - */ -/** Descriptive text for the hash option */ -#define HASH_DESC (danetool_opt_strs+1130) -/** Upper-cased name for the hash option */ -#define HASH_NAME (danetool_opt_strs+1165) -/** Name string for the hash option */ -#define HASH_name (danetool_opt_strs+1170) -/** Compiled in flag settings for the hash option */ -#define HASH_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * check option description: - */ -/** Descriptive text for the check option */ -#define CHECK_DESC (danetool_opt_strs+1175) -/** Upper-cased name for the check option */ -#define CHECK_NAME (danetool_opt_strs+1207) -/** Name string for the check option */ -#define CHECK_name (danetool_opt_strs+1213) -/** Compiled in flag settings for the check option */ -#define CHECK_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * check-ee option description: - */ -/** Descriptive text for the check-ee option */ -#define CHECK_EE_DESC (danetool_opt_strs+1219) -/** Upper-cased name for the check-ee option */ -#define CHECK_EE_NAME (danetool_opt_strs+1260) -/** Name string for the check-ee option */ -#define CHECK_EE_name (danetool_opt_strs+1269) -/** Compiled in flag settings for the check-ee option */ -#define CHECK_EE_FLAGS (OPTST_DISABLED) - -/** - * check-ca option description: - */ -/** Descriptive text for the check-ca option */ -#define CHECK_CA_DESC (danetool_opt_strs+1278) -/** Upper-cased name for the check-ca option */ -#define CHECK_CA_NAME (danetool_opt_strs+1311) -/** Name string for the check-ca option */ -#define CHECK_CA_name (danetool_opt_strs+1320) -/** Compiled in flag settings for the check-ca option */ -#define CHECK_CA_FLAGS (OPTST_DISABLED) - -/** - * insecure option description: - */ -/** Descriptive text for the insecure option */ -#define INSECURE_DESC (danetool_opt_strs+1329) -/** Upper-cased name for the insecure option */ -#define INSECURE_NAME (danetool_opt_strs+1365) -/** Name string for the insecure option */ -#define INSECURE_name (danetool_opt_strs+1374) -/** Compiled in flag settings for the insecure option */ -#define INSECURE_FLAGS (OPTST_DISABLED) - -/** - * local-dns option description: - */ -/** Descriptive text for the local-dns option */ -#define LOCAL_DNS_DESC (danetool_opt_strs+1383) -/** Upper-cased name for the local-dns option */ -#define LOCAL_DNS_NAME (danetool_opt_strs+1430) -/** disablement name for the local-dns option */ -#define NOT_LOCAL_DNS_name (danetool_opt_strs+1440) -/** disablement prefix for the local-dns option */ -#define NOT_LOCAL_DNS_PFX (danetool_opt_strs+1453) -/** Name string for the local-dns option */ -#define LOCAL_DNS_name (NOT_LOCAL_DNS_name + 3) -/** Compiled in flag settings for the local-dns option */ -#define LOCAL_DNS_FLAGS (OPTST_DISABLED) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (danetool_opt_strs+1456) -/** Upper-cased name for the inder option */ -#define INDER_NAME (danetool_opt_strs+1512) -/** disablement name for the inder option */ -#define NOT_INDER_name (danetool_opt_strs+1518) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (danetool_opt_strs+1453) -/** Name string for the inder option */ -#define INDER_name (NOT_INDER_name + 3) -/** Compiled in flag settings for the inder option */ -#define INDER_FLAGS (OPTST_DISABLED) - -/** - * inraw option description: - */ -/** Descriptive text for the inraw option */ -#define INRAW_DESC (danetool_opt_strs+1527) -#define INRAW_NAME NULL -/** Unmodified name string for the inraw option */ -#define INRAW_name (danetool_opt_strs+1559) -/** Compiled in flag settings for the inraw option */ -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/** - * tlsa-rr option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the tlsa-rr option */ -#define TLSA_RR_DESC (danetool_opt_strs+1565) -/** Upper-cased name for the tlsa-rr option */ -#define TLSA_RR_NAME (danetool_opt_strs+1619) -/** Name string for the tlsa-rr option */ -#define TLSA_RR_name (danetool_opt_strs+1627) -/** Other options that are required by the tlsa-rr option */ -static int const aTlsa_RrMustList[] = { - INDEX_OPT_HOST, NO_EQUIVALENT }; -/** Compiled in flag settings for the tlsa-rr option */ -#define TLSA_RR_FLAGS (OPTST_DISABLED) - -/** - * host option description: - */ -/** Descriptive text for the host option */ -#define HOST_DESC (danetool_opt_strs+1635) -/** Upper-cased name for the host option */ -#define HOST_NAME (danetool_opt_strs+1682) -/** Name string for the host option */ -#define HOST_name (danetool_opt_strs+1687) -/** Compiled in flag settings for the host option */ -#define HOST_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * proto option description: - */ -/** Descriptive text for the proto option */ -#define PROTO_DESC (danetool_opt_strs+1692) -/** Upper-cased name for the proto option */ -#define PROTO_NAME (danetool_opt_strs+1739) -/** Name string for the proto option */ -#define PROTO_name (danetool_opt_strs+1745) -/** Compiled in flag settings for the proto option */ -#define PROTO_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * port option description: - */ -/** Descriptive text for the port option */ -#define PORT_DESC (danetool_opt_strs+1751) -/** Upper-cased name for the port option */ -#define PORT_NAME (danetool_opt_strs+1794) -/** Name string for the port option */ -#define PORT_name (danetool_opt_strs+1799) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * ca option description: - */ -/** Descriptive text for the ca option */ -#define CA_DESC (danetool_opt_strs+1804) -/** Upper-cased name for the ca option */ -#define CA_NAME (danetool_opt_strs+1879) -/** Name string for the ca option */ -#define CA_name (danetool_opt_strs+1882) -/** Compiled in flag settings for the ca option */ -#define CA_FLAGS (OPTST_DISABLED) - -/** - * x509 option description: - */ -/** Descriptive text for the x509 option */ -#define X509_DESC (danetool_opt_strs+1885) -/** Upper-cased name for the x509 option */ -#define X509_NAME (danetool_opt_strs+1952) -/** Name string for the x509 option */ -#define X509_name (danetool_opt_strs+1957) -/** Compiled in flag settings for the x509 option */ -#define X509_FLAGS (OPTST_DISABLED) - -/** - * local option description: - */ -/** Descriptive text for the local option */ -#define LOCAL_DESC (danetool_opt_strs+1962) -#define LOCAL_NAME NULL -/** Unmodified name string for the local option */ -#define LOCAL_name (danetool_opt_strs+1995) -/** Compiled in flag settings for the local option */ -#define LOCAL_FLAGS (DOMAIN_FLAGS | OPTST_ALIAS) - -/** - * domain option description: - */ -/** Descriptive text for the domain option */ -#define DOMAIN_DESC (danetool_opt_strs+2001) -/** Upper-cased name for the domain option */ -#define DOMAIN_NAME (danetool_opt_strs+2071) -/** disablement name for the domain option */ -#define NOT_DOMAIN_name (danetool_opt_strs+2078) -/** disablement prefix for the domain option */ -#define NOT_DOMAIN_PFX (danetool_opt_strs+1453) -/** Name string for the domain option */ -#define DOMAIN_name (NOT_DOMAIN_name + 3) -/** Compiled in flag settings for the domain option */ -#define DOMAIN_FLAGS (OPTST_INITENABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (danetool_opt_strs+2088) -#define HELP_name (danetool_opt_strs+2132) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (danetool_opt_strs+2137) -#define MORE_HELP_name (danetool_opt_strs+2182) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (danetool_opt_strs+2192) -#define VER_name (danetool_opt_strs+2228) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptInfile, doOptInraw, doOptLocal, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the danetool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the danetool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, - /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verbose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_INFILE, - /* equiv idx, value */ 2, VALUE_OPT_INFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --infile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInfile, - /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 3, VALUE_OPT_OUTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_LOAD_PUBKEY, - /* equiv idx, value */ 4, VALUE_OPT_LOAD_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, LOAD_PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_LOAD_CERTIFICATE, - /* equiv idx, value */ 5, VALUE_OPT_LOAD_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, LOAD_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_DLV, - /* equiv idx, value */ 6, VALUE_OPT_DLV, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DLV_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dlv */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DLV_DESC, DLV_NAME, DLV_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_HASH, - /* equiv idx, value */ 7, VALUE_OPT_HASH, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HASH_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --hash */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HASH_DESC, HASH_NAME, HASH_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_CHECK, - /* equiv idx, value */ 8, VALUE_OPT_CHECK, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CHECK_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --check */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CHECK_DESC, CHECK_NAME, CHECK_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_CHECK_EE, - /* equiv idx, value */ 9, VALUE_OPT_CHECK_EE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CHECK_EE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --check-ee */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CHECK_EE_DESC, CHECK_EE_NAME, CHECK_EE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_CHECK_CA, - /* equiv idx, value */ 10, VALUE_OPT_CHECK_CA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CHECK_CA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --check-ca */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CHECK_CA_DESC, CHECK_CA_NAME, CHECK_CA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_INSECURE, - /* equiv idx, value */ 11, VALUE_OPT_INSECURE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INSECURE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --insecure */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_LOCAL_DNS, - /* equiv idx, value */ 12, VALUE_OPT_LOCAL_DNS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOCAL_DNS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --local-dns */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOCAL_DNS_DESC, LOCAL_DNS_NAME, LOCAL_DNS_name, - /* disablement strs */ NOT_LOCAL_DNS_name, NOT_LOCAL_DNS_PFX }, - - { /* entry idx, value */ 13, VALUE_OPT_INDER, - /* equiv idx, value */ 13, VALUE_OPT_INDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name, - /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX }, - - { /* entry idx, value */ 14, VALUE_OPT_INRAW, - /* equiv idx, value */ 14, VALUE_OPT_INRAW, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INRAW_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inraw */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInraw, - /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 15, VALUE_OPT_TLSA_RR, - /* equiv idx, value */ 15, VALUE_OPT_TLSA_RR, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TLSA_RR_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --tlsa-rr */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aTlsa_RrMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TLSA_RR_DESC, TLSA_RR_NAME, TLSA_RR_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_HOST, - /* equiv idx, value */ 16, VALUE_OPT_HOST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HOST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --host */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HOST_DESC, HOST_NAME, HOST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_PROTO, - /* equiv idx, value */ 17, VALUE_OPT_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PROTO_DESC, PROTO_NAME, PROTO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_PORT, - /* equiv idx, value */ 18, VALUE_OPT_PORT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --port */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_CA, - /* equiv idx, value */ 19, VALUE_OPT_CA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ca */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CA_DESC, CA_NAME, CA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_X509, - /* equiv idx, value */ 20, VALUE_OPT_X509, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509_DESC, X509_NAME, X509_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_LOCAL, - /* equiv idx, value */ 21, VALUE_OPT_LOCAL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOCAL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --local */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLocal, - /* desc, NAME, name */ LOCAL_DESC, LOCAL_NAME, LOCAL_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 22, VALUE_OPT_DOMAIN, - /* equiv idx, value */ 22, VALUE_OPT_DOMAIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DOMAIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --domain */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DOMAIN_DESC, DOMAIN_NAME, DOMAIN_name, - /* disablement strs */ NOT_DOMAIN_name, NOT_DOMAIN_PFX }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of danetool. */ -#define zPROGNAME (danetool_opt_strs+2236) -/** Reference to the title line for danetool usage. */ -#define zUsageTitle (danetool_opt_strs+2245) -/** There is no danetool configuration file. */ -#define zRcName NULL -/** There are no directories to search for danetool config files. */ -#define apzHomeList NULL -/** The danetool program bug email address. */ -#define zBugsAddr (danetool_opt_strs+2331) -/** Clarification/explanation of what danetool does. */ -#define zExplain (danetool_opt_strs+2350) -/** Extra detail explaining what danetool does. */ -#define zDetail (danetool_opt_strs+2352) -/** The full version string for danetool. */ -#define zFullVersion (danetool_opt_strs+2424) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define danetool_full_usage (NULL) -#define danetool_short_usage (danetool_opt_strs+2443) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&danetoolOptions, DANETOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the danetool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param[in] pOptions the danetool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the inraw option. - * - * @param[in] pOptions the danetool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(DANETOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the local option. - * - * @param[in] pOptions the danetool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLocal(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_DOMAIN); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(DANETOOL_EXIT_USAGE_ERROR); - -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with danetool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged danetool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define danetool_packager_info NULL -#else -/** Packager information for danetool. */ -static char const danetool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport danetool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for danetool. The one structure that - * binds them all. - */ -tOptions danetoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 26 /* full option count */, 23 /* user option count */, - danetool_full_usage, danetool_short_usage, - NULL, NULL, - PKGDATADIR, danetool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * danetool program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(DANETOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the danetoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &danetoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the danetoolOptions structure noted in the comments below. The - literal text is defined in danetool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - danetool_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via danetoolOptions.pzCopyright */ - puts(_("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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via danetoolOptions.pzCopyNotice */ - puts(_("danetool is free software: you can redistribute it and/or modify it under\n\ -the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("danetool is distributed in the hope that it will be useful, but WITHOUT ANY\n\ -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\ -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n\ -details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("More verbose output")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Input file")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Loads a public key file")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Loads a certificate file")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Sets a DLV file")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Hash algorithm to use for signing.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Check a host's DANE TLSA entry.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Check only the end-entity's certificate.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Check only the CA's certificate.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Do not verify any DNSSEC signature.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Use the local DNS server for DNSSEC resolving.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Use DER format for input certificates and private keys.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'inder' option")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Print the DANE RR data on a certificate or public key")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Specify the hostname to be used in the DANE RR")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("The protocol set for DANE data (tcp, udp etc.)")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Specify the port number for the DANE data.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Whether the provided certificate or public key is a Certificate\n\ -Authority.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Use the hash of the X.509 certificate, rather than the public key.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'domain' option")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("The provided certificate or public key is issued by the local domain.")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via danetoolOptions.pzUsageTitle */ - puts(_("danetool - GnuTLS DANE tool\n\ -Usage: %s [ - [] | --[{=| }] ]...\n")); - - /* referenced via danetoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via danetoolOptions.pzDetail */ - puts(_("Tool to generate and check DNS resource records for the DANE protocol.\n")); - - /* referenced via danetoolOptions.pzFullVersion */ - puts(_("danetool @VERSION@")); - - /* referenced via danetoolOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via danetoolOptions.pzShortUsage */ - puts(_("danetool [options]\n\ -danetool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* danetool-args.c ends here */ diff --git a/src/danetool-args.h b/src/danetool-args.h deleted file mode 100644 index f9236bccc0..0000000000 --- a/src/danetool-args.h +++ /dev/null @@ -1,256 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (danetool-args.h) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:28 PM by AutoGen 5.17.3 - * From the definitions danetool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the danetool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The danetool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * danetool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * danetool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the danetool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_DANETOOL_ARGS_H_GUARD -#define AUTOOPTS_DANETOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for danetool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_INFILE = 2, - INDEX_OPT_OUTFILE = 3, - INDEX_OPT_LOAD_PUBKEY = 4, - INDEX_OPT_LOAD_CERTIFICATE = 5, - INDEX_OPT_DLV = 6, - INDEX_OPT_HASH = 7, - INDEX_OPT_CHECK = 8, - INDEX_OPT_CHECK_EE = 9, - INDEX_OPT_CHECK_CA = 10, - INDEX_OPT_INSECURE = 11, - INDEX_OPT_LOCAL_DNS = 12, - INDEX_OPT_INDER = 13, - INDEX_OPT_INRAW = 14, - INDEX_OPT_TLSA_RR = 15, - INDEX_OPT_HOST = 16, - INDEX_OPT_PROTO = 17, - INDEX_OPT_PORT = 18, - INDEX_OPT_CA = 19, - INDEX_OPT_X509 = 20, - INDEX_OPT_LOCAL = 21, - INDEX_OPT_DOMAIN = 22, - INDEX_OPT_VERSION = 23, - INDEX_OPT_HELP = 24, - INDEX_OPT_MORE_HELP = 25 -} teOptIndex; -/** count of all options for danetool */ -#define OPTION_CT 26 -/** danetool version */ -#define DANETOOL_VERSION "@VERSION@" -/** Full danetool version text */ -#define DANETOOL_FULL_VERSION "danetool @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (danetoolOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of danetool exit codes - */ -typedef enum { - DANETOOL_EXIT_SUCCESS = 0, - DANETOOL_EXIT_FAILURE = 1, - DANETOOL_EXIT_USAGE_ERROR = 64, - DANETOOL_EXIT_LIBOPTS_FAILURE = 70 -} danetool_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_VERBOSE 'V' -#define VALUE_OPT_INFILE 2 -#define VALUE_OPT_OUTFILE 3 -#define VALUE_OPT_LOAD_PUBKEY 4 -#define VALUE_OPT_LOAD_CERTIFICATE 5 -#define VALUE_OPT_DLV 6 -#define VALUE_OPT_HASH 7 -#define VALUE_OPT_CHECK 8 -#define VALUE_OPT_CHECK_EE 9 -#define VALUE_OPT_CHECK_CA 10 -#define VALUE_OPT_INSECURE 11 -#define VALUE_OPT_LOCAL_DNS 12 -#define VALUE_OPT_INDER 13 -#define VALUE_OPT_INRAW 14 -#define VALUE_OPT_TLSA_RR 15 -#define VALUE_OPT_HOST 16 -#define VALUE_OPT_PROTO 17 -#define VALUE_OPT_PORT 18 - -#define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) -#define VALUE_OPT_CA 19 -#define VALUE_OPT_X509 20 -#define VALUE_OPT_LOCAL 21 -#define VALUE_OPT_DOMAIN 22 -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(danetoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(danetoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - danetoolOptions.curOptIdx = (n); \ - danetoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*danetoolOptions.pUsageProc)(&danetoolOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the danetool option descriptor. - */ -extern tOptions danetoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(danetoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(danetoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(danetoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(danetoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_DANETOOL_ARGS_H_GUARD */ -/* danetool-args.h ends here */ diff --git a/src/ocsptool-args.c b/src/ocsptool-args.c deleted file mode 100644 index da5f9e2b44..0000000000 --- a/src/ocsptool-args.c +++ /dev/null @@ -1,1520 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (ocsptool-args.c) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:26 PM by AutoGen 5.17.3 - * From the definitions ocsptool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the ocsptool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The ocsptool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * ocsptool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * ocsptool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "ocsptool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (ocsptool_opt_strs+0) -#define zLicenseDescrip (ocsptool_opt_strs+275) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for ocsptool options - */ -static char const ocsptool_opt_strs[2250] = -/* 0 */ "ocsptool @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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 275 */ "ocsptool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "ocsptool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 880 */ "Enable debugging.\0" -/* 898 */ "DEBUG\0" -/* 904 */ "debug\0" -/* 910 */ "More verbose output\0" -/* 930 */ "VERBOSE\0" -/* 938 */ "verbose\0" -/* 946 */ "Input file\0" -/* 957 */ "INFILE\0" -/* 964 */ "infile\0" -/* 971 */ "Output file\0" -/* 983 */ "OUTFILE\0" -/* 991 */ "outfile\0" -/* 999 */ "Ask an OCSP/HTTP server on a certificate validity\0" -/* 1049 */ "ASK\0" -/* 1053 */ "ask\0" -/* 1057 */ "Verify response\0" -/* 1073 */ "VERIFY_RESPONSE\0" -/* 1089 */ "verify-response\0" -/* 1105 */ "Print information on a OCSP request\0" -/* 1141 */ "REQUEST_INFO\0" -/* 1154 */ "request-info\0" -/* 1167 */ "Print information on a OCSP response\0" -/* 1204 */ "RESPONSE_INFO\0" -/* 1218 */ "response-info\0" -/* 1232 */ "Generate an OCSP request\0" -/* 1257 */ "GENERATE_REQUEST\0" -/* 1274 */ "generate-request\0" -/* 1291 */ "Don't add nonce to OCSP request\0" -/* 1323 */ "NONCE\0" -/* 1329 */ "no-nonce\0" -/* 1338 */ "no\0" -/* 1341 */ "Read issuer certificate from file\0" -/* 1375 */ "LOAD_ISSUER\0" -/* 1387 */ "load-issuer\0" -/* 1399 */ "Read certificate to check from file\0" -/* 1435 */ "LOAD_CERT\0" -/* 1445 */ "load-cert\0" -/* 1455 */ "Read OCSP trust anchors from file\0" -/* 1489 */ "LOAD_TRUST\0" -/* 1500 */ "load-trust\0" -/* 1511 */ "Read OCSP response signer from file\0" -/* 1547 */ "LOAD_SIGNER\0" -/* 1559 */ "load-signer\0" -/* 1571 */ "Use DER format for input certificates and private keys\0" -/* 1626 */ "INDER\0" -/* 1632 */ "no-inder\0" -/* 1641 */ "Read DER encoded OCSP request from file\0" -/* 1681 */ "LOAD_REQUEST\0" -/* 1694 */ "load-request\0" -/* 1707 */ "Read DER encoded OCSP response from file\0" -/* 1748 */ "LOAD_RESPONSE\0" -/* 1762 */ "load-response\0" -/* 1776 */ "display extended usage information and exit\0" -/* 1820 */ "help\0" -/* 1825 */ "extended usage information passed thru pager\0" -/* 1870 */ "more-help\0" -/* 1880 */ "output version information and exit\0" -/* 1916 */ "version\0" -/* 1924 */ "OCSPTOOL\0" -/* 1933 */ "ocsptool - GnuTLS OCSP tool\n" - "Usage: %s [ - [] | --[{=| }] ]...\n\0" -/* 2019 */ "bug-gnutls@gnu.org\0" -/* 2038 */ "\n\0" -/* 2040 */ "Ocsptool is a program that can parse and print information about OCSP\n" - "requests/responses, generate requests and verify responses.\n\0" -/* 2171 */ "ocsptool @VERSION@\0" -/* 2190 */ "ocsptool [options]\n" - "ocsptool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (ocsptool_opt_strs+880) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (ocsptool_opt_strs+898) -/** Name string for the debug option */ -#define DEBUG_name (ocsptool_opt_strs+904) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * verbose option description: - */ -/** Descriptive text for the verbose option */ -#define VERBOSE_DESC (ocsptool_opt_strs+910) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (ocsptool_opt_strs+930) -/** Name string for the verbose option */ -#define VERBOSE_name (ocsptool_opt_strs+938) -/** Compiled in flag settings for the verbose option */ -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/** - * infile option description: - */ -/** Descriptive text for the infile option */ -#define INFILE_DESC (ocsptool_opt_strs+946) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (ocsptool_opt_strs+957) -/** Name string for the infile option */ -#define INFILE_name (ocsptool_opt_strs+964) -/** Compiled in flag settings for the infile option */ -#define INFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * outfile option description: - */ -/** Descriptive text for the outfile option */ -#define OUTFILE_DESC (ocsptool_opt_strs+971) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (ocsptool_opt_strs+983) -/** Name string for the outfile option */ -#define OUTFILE_name (ocsptool_opt_strs+991) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * ask option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the ask option */ -#define ASK_DESC (ocsptool_opt_strs+999) -/** Upper-cased name for the ask option */ -#define ASK_NAME (ocsptool_opt_strs+1049) -/** Name string for the ask option */ -#define ASK_name (ocsptool_opt_strs+1053) -/** Other options that are required by the ask option */ -static int const aAskMustList[] = { - INDEX_OPT_LOAD_CERT, - INDEX_OPT_LOAD_ISSUER, NO_EQUIVALENT }; -/** Compiled in flag settings for the ask option */ -#define ASK_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | OPTST_ARG_OPTIONAL) - -/** - * verify-response option description: - */ -/** Descriptive text for the verify-response option */ -#define VERIFY_RESPONSE_DESC (ocsptool_opt_strs+1057) -/** Upper-cased name for the verify-response option */ -#define VERIFY_RESPONSE_NAME (ocsptool_opt_strs+1073) -/** Name string for the verify-response option */ -#define VERIFY_RESPONSE_name (ocsptool_opt_strs+1089) -/** Compiled in flag settings for the verify-response option */ -#define VERIFY_RESPONSE_FLAGS (OPTST_DISABLED) - -/** - * request-info option description: - */ -/** Descriptive text for the request-info option */ -#define REQUEST_INFO_DESC (ocsptool_opt_strs+1105) -/** Upper-cased name for the request-info option */ -#define REQUEST_INFO_NAME (ocsptool_opt_strs+1141) -/** Name string for the request-info option */ -#define REQUEST_INFO_name (ocsptool_opt_strs+1154) -/** Compiled in flag settings for the request-info option */ -#define REQUEST_INFO_FLAGS (OPTST_DISABLED) - -/** - * response-info option description: - */ -/** Descriptive text for the response-info option */ -#define RESPONSE_INFO_DESC (ocsptool_opt_strs+1167) -/** Upper-cased name for the response-info option */ -#define RESPONSE_INFO_NAME (ocsptool_opt_strs+1204) -/** Name string for the response-info option */ -#define RESPONSE_INFO_name (ocsptool_opt_strs+1218) -/** Compiled in flag settings for the response-info option */ -#define RESPONSE_INFO_FLAGS (OPTST_DISABLED) - -/** - * generate-request option description: - */ -/** Descriptive text for the generate-request option */ -#define GENERATE_REQUEST_DESC (ocsptool_opt_strs+1232) -/** Upper-cased name for the generate-request option */ -#define GENERATE_REQUEST_NAME (ocsptool_opt_strs+1257) -/** Name string for the generate-request option */ -#define GENERATE_REQUEST_name (ocsptool_opt_strs+1274) -/** Compiled in flag settings for the generate-request option */ -#define GENERATE_REQUEST_FLAGS (OPTST_DISABLED) - -/** - * nonce option description: - */ -/** Descriptive text for the nonce option */ -#define NONCE_DESC (ocsptool_opt_strs+1291) -/** Upper-cased name for the nonce option */ -#define NONCE_NAME (ocsptool_opt_strs+1323) -/** disablement name for the nonce option */ -#define NOT_NONCE_name (ocsptool_opt_strs+1329) -/** disablement prefix for the nonce option */ -#define NOT_NONCE_PFX (ocsptool_opt_strs+1338) -/** Name string for the nonce option */ -#define NONCE_name (NOT_NONCE_name + 3) -/** Compiled in flag settings for the nonce option */ -#define NONCE_FLAGS (OPTST_DISABLED) - -/** - * load-issuer option description: - */ -/** Descriptive text for the load-issuer option */ -#define LOAD_ISSUER_DESC (ocsptool_opt_strs+1341) -/** Upper-cased name for the load-issuer option */ -#define LOAD_ISSUER_NAME (ocsptool_opt_strs+1375) -/** Name string for the load-issuer option */ -#define LOAD_ISSUER_name (ocsptool_opt_strs+1387) -/** Compiled in flag settings for the load-issuer option */ -#define LOAD_ISSUER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-cert option description: - */ -/** Descriptive text for the load-cert option */ -#define LOAD_CERT_DESC (ocsptool_opt_strs+1399) -/** Upper-cased name for the load-cert option */ -#define LOAD_CERT_NAME (ocsptool_opt_strs+1435) -/** Name string for the load-cert option */ -#define LOAD_CERT_name (ocsptool_opt_strs+1445) -/** Compiled in flag settings for the load-cert option */ -#define LOAD_CERT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-trust option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the load-trust option */ -#define LOAD_TRUST_DESC (ocsptool_opt_strs+1455) -/** Upper-cased name for the load-trust option */ -#define LOAD_TRUST_NAME (ocsptool_opt_strs+1489) -/** Name string for the load-trust option */ -#define LOAD_TRUST_name (ocsptool_opt_strs+1500) -/** Other options that appear in conjunction with the load-trust option */ -static int const aLoad_TrustCantList[] = { - INDEX_OPT_LOAD_SIGNER, NO_EQUIVALENT }; -/** Compiled in flag settings for the load-trust option */ -#define LOAD_TRUST_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-signer option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the load-signer option */ -#define LOAD_SIGNER_DESC (ocsptool_opt_strs+1511) -/** Upper-cased name for the load-signer option */ -#define LOAD_SIGNER_NAME (ocsptool_opt_strs+1547) -/** Name string for the load-signer option */ -#define LOAD_SIGNER_name (ocsptool_opt_strs+1559) -/** Other options that appear in conjunction with the load-signer option */ -static int const aLoad_SignerCantList[] = { - INDEX_OPT_LOAD_TRUST, NO_EQUIVALENT }; -/** Compiled in flag settings for the load-signer option */ -#define LOAD_SIGNER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (ocsptool_opt_strs+1571) -/** Upper-cased name for the inder option */ -#define INDER_NAME (ocsptool_opt_strs+1626) -/** disablement name for the inder option */ -#define NOT_INDER_name (ocsptool_opt_strs+1632) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (ocsptool_opt_strs+1338) -/** Name string for the inder option */ -#define INDER_name (NOT_INDER_name + 3) -/** Compiled in flag settings for the inder option */ -#define INDER_FLAGS (OPTST_DISABLED) - -/** - * load-request option description: - */ -/** Descriptive text for the load-request option */ -#define LOAD_REQUEST_DESC (ocsptool_opt_strs+1641) -/** Upper-cased name for the load-request option */ -#define LOAD_REQUEST_NAME (ocsptool_opt_strs+1681) -/** Name string for the load-request option */ -#define LOAD_REQUEST_name (ocsptool_opt_strs+1694) -/** Compiled in flag settings for the load-request option */ -#define LOAD_REQUEST_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-response option description: - */ -/** Descriptive text for the load-response option */ -#define LOAD_RESPONSE_DESC (ocsptool_opt_strs+1707) -/** Upper-cased name for the load-response option */ -#define LOAD_RESPONSE_NAME (ocsptool_opt_strs+1748) -/** Name string for the load-response option */ -#define LOAD_RESPONSE_name (ocsptool_opt_strs+1762) -/** Compiled in flag settings for the load-response option */ -#define LOAD_RESPONSE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (ocsptool_opt_strs+1776) -#define HELP_name (ocsptool_opt_strs+1820) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (ocsptool_opt_strs+1825) -#define MORE_HELP_name (ocsptool_opt_strs+1870) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (ocsptool_opt_strs+1880) -#define VER_name (ocsptool_opt_strs+1916) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptInfile, doOptLoad_Cert, - doOptLoad_Issuer, doOptLoad_Request, doOptLoad_Response, - doOptLoad_Signer, doOptLoad_Trust, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the ocsptool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the ocsptool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, - /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verbose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_INFILE, - /* equiv idx, value */ 2, VALUE_OPT_INFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --infile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInfile, - /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 3, VALUE_OPT_OUTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_ASK, - /* equiv idx, value */ 4, VALUE_OPT_ASK, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ASK_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ask */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aAskMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ASK_DESC, ASK_NAME, ASK_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_VERIFY_RESPONSE, - /* equiv idx, value */ 5, VALUE_OPT_VERIFY_RESPONSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_RESPONSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-response */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_RESPONSE_DESC, VERIFY_RESPONSE_NAME, VERIFY_RESPONSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_REQUEST_INFO, - /* equiv idx, value */ 6, VALUE_OPT_REQUEST_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ REQUEST_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --request-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ REQUEST_INFO_DESC, REQUEST_INFO_NAME, REQUEST_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_RESPONSE_INFO, - /* equiv idx, value */ 7, VALUE_OPT_RESPONSE_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ RESPONSE_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --response-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ RESPONSE_INFO_DESC, RESPONSE_INFO_NAME, RESPONSE_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_GENERATE_REQUEST, - /* equiv idx, value */ 8, VALUE_OPT_GENERATE_REQUEST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_REQUEST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-request */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, GENERATE_REQUEST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_NONCE, - /* equiv idx, value */ 9, VALUE_OPT_NONCE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NONCE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --nonce */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NONCE_DESC, NONCE_NAME, NONCE_name, - /* disablement strs */ NOT_NONCE_name, NOT_NONCE_PFX }, - - { /* entry idx, value */ 10, VALUE_OPT_LOAD_ISSUER, - /* equiv idx, value */ 10, VALUE_OPT_LOAD_ISSUER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_ISSUER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-issuer */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Issuer, - /* desc, NAME, name */ LOAD_ISSUER_DESC, LOAD_ISSUER_NAME, LOAD_ISSUER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_LOAD_CERT, - /* equiv idx, value */ 11, VALUE_OPT_LOAD_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Cert, - /* desc, NAME, name */ LOAD_CERT_DESC, LOAD_CERT_NAME, LOAD_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_LOAD_TRUST, - /* equiv idx, value */ 12, VALUE_OPT_LOAD_TRUST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_TRUST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-trust */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aLoad_TrustCantList, - /* option proc */ doOptLoad_Trust, - /* desc, NAME, name */ LOAD_TRUST_DESC, LOAD_TRUST_NAME, LOAD_TRUST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_LOAD_SIGNER, - /* equiv idx, value */ 13, VALUE_OPT_LOAD_SIGNER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_SIGNER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-signer */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aLoad_SignerCantList, - /* option proc */ doOptLoad_Signer, - /* desc, NAME, name */ LOAD_SIGNER_DESC, LOAD_SIGNER_NAME, LOAD_SIGNER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_INDER, - /* equiv idx, value */ 14, VALUE_OPT_INDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name, - /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX }, - - { /* entry idx, value */ 15, VALUE_OPT_LOAD_REQUEST, - /* equiv idx, value */ 15, VALUE_OPT_LOAD_REQUEST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_REQUEST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-request */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Request, - /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, LOAD_REQUEST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_LOAD_RESPONSE, - /* equiv idx, value */ 16, VALUE_OPT_LOAD_RESPONSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_RESPONSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-response */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Response, - /* desc, NAME, name */ LOAD_RESPONSE_DESC, LOAD_RESPONSE_NAME, LOAD_RESPONSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of ocsptool. */ -#define zPROGNAME (ocsptool_opt_strs+1924) -/** Reference to the title line for ocsptool usage. */ -#define zUsageTitle (ocsptool_opt_strs+1933) -/** There is no ocsptool configuration file. */ -#define zRcName NULL -/** There are no directories to search for ocsptool config files. */ -#define apzHomeList NULL -/** The ocsptool program bug email address. */ -#define zBugsAddr (ocsptool_opt_strs+2019) -/** Clarification/explanation of what ocsptool does. */ -#define zExplain (ocsptool_opt_strs+2038) -/** Extra detail explaining what ocsptool does. */ -#define zDetail (ocsptool_opt_strs+2040) -/** The full version string for ocsptool. */ -#define zFullVersion (ocsptool_opt_strs+2171) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define ocsptool_full_usage (NULL) -#define ocsptool_short_usage (ocsptool_opt_strs+2190) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&ocsptoolOptions, OCSPTOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-issuer option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Issuer(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-cert option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Cert(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-trust option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Trust(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-signer option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Signer(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-request option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-response option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Response(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with ocsptool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged ocsptool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define ocsptool_packager_info NULL -#else -/** Packager information for ocsptool. */ -static char const ocsptool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport ocsptool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for ocsptool. The one structure that - * binds them all. - */ -tOptions ocsptoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 20 /* full option count */, 17 /* user option count */, - ocsptool_full_usage, ocsptool_short_usage, - NULL, NULL, - PKGDATADIR, ocsptool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * ocsptool program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(OCSPTOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the ocsptoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &ocsptoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the ocsptoolOptions structure noted in the comments below. The - literal text is defined in ocsptool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - ocsptool_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via ocsptoolOptions.pzCopyright */ - puts(_("ocsptool @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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via ocsptoolOptions.pzCopyNotice */ - puts(_("ocsptool is free software: you can redistribute it and/or modify it under\n\ -the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("ocsptool is distributed in the hope that it will be useful, but WITHOUT ANY\n\ -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\ -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n\ -details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("More verbose output")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Input file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Ask an OCSP/HTTP server on a certificate validity")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Verify response")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Print information on a OCSP request")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Print information on a OCSP response")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Generate an OCSP request")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Don't add nonce to OCSP request")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read issuer certificate from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read certificate to check from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read OCSP trust anchors from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read OCSP response signer from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Use DER format for input certificates and private keys")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read DER encoded OCSP request from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read DER encoded OCSP response from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via ocsptoolOptions.pzUsageTitle */ - puts(_("ocsptool - GnuTLS OCSP tool\n\ -Usage: %s [ - [] | --[{=| }] ]...\n")); - - /* referenced via ocsptoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via ocsptoolOptions.pzDetail */ - puts(_("Ocsptool is a program that can parse and print information about OCSP\n\ -requests/responses, generate requests and verify responses.\n")); - - /* referenced via ocsptoolOptions.pzFullVersion */ - puts(_("ocsptool @VERSION@")); - - /* referenced via ocsptoolOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via ocsptoolOptions.pzShortUsage */ - puts(_("ocsptool [options]\n\ -ocsptool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* ocsptool-args.c ends here */ diff --git a/src/ocsptool-args.h b/src/ocsptool-args.h deleted file mode 100644 index 0005cf7150..0000000000 --- a/src/ocsptool-args.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (ocsptool-args.h) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:26 PM by AutoGen 5.17.3 - * From the definitions ocsptool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the ocsptool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The ocsptool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * ocsptool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * ocsptool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the ocsptool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_OCSPTOOL_ARGS_H_GUARD -#define AUTOOPTS_OCSPTOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for ocsptool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_INFILE = 2, - INDEX_OPT_OUTFILE = 3, - INDEX_OPT_ASK = 4, - INDEX_OPT_VERIFY_RESPONSE = 5, - INDEX_OPT_REQUEST_INFO = 6, - INDEX_OPT_RESPONSE_INFO = 7, - INDEX_OPT_GENERATE_REQUEST = 8, - INDEX_OPT_NONCE = 9, - INDEX_OPT_LOAD_ISSUER = 10, - INDEX_OPT_LOAD_CERT = 11, - INDEX_OPT_LOAD_TRUST = 12, - INDEX_OPT_LOAD_SIGNER = 13, - INDEX_OPT_INDER = 14, - INDEX_OPT_LOAD_REQUEST = 15, - INDEX_OPT_LOAD_RESPONSE = 16, - INDEX_OPT_VERSION = 17, - INDEX_OPT_HELP = 18, - INDEX_OPT_MORE_HELP = 19 -} teOptIndex; -/** count of all options for ocsptool */ -#define OPTION_CT 20 -/** ocsptool version */ -#define OCSPTOOL_VERSION "@VERSION@" -/** Full ocsptool version text */ -#define OCSPTOOL_FULL_VERSION "ocsptool @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (ocsptoolOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of ocsptool exit codes - */ -typedef enum { - OCSPTOOL_EXIT_SUCCESS = 0, - OCSPTOOL_EXIT_FAILURE = 1, - OCSPTOOL_EXIT_USAGE_ERROR = 64, - OCSPTOOL_EXIT_LIBOPTS_FAILURE = 70 -} ocsptool_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_VERBOSE 'V' -#define VALUE_OPT_INFILE 2 -#define VALUE_OPT_OUTFILE 3 -#define VALUE_OPT_ASK 4 -#define VALUE_OPT_VERIFY_RESPONSE 'e' -#define VALUE_OPT_REQUEST_INFO 'i' -#define VALUE_OPT_RESPONSE_INFO 'j' -#define VALUE_OPT_GENERATE_REQUEST 'q' -#define VALUE_OPT_NONCE 9 -#define VALUE_OPT_LOAD_ISSUER 10 -#define VALUE_OPT_LOAD_CERT 11 -#define VALUE_OPT_LOAD_TRUST 12 -#define VALUE_OPT_LOAD_SIGNER 13 -#define VALUE_OPT_INDER 14 -#define VALUE_OPT_LOAD_REQUEST 'Q' -#define VALUE_OPT_LOAD_RESPONSE 'S' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(ocsptoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(ocsptoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - ocsptoolOptions.curOptIdx = (n); \ - ocsptoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*ocsptoolOptions.pUsageProc)(&ocsptoolOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the ocsptool option descriptor. - */ -extern tOptions ocsptoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(ocsptoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(ocsptoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(ocsptoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(ocsptoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_OCSPTOOL_ARGS_H_GUARD */ -/* ocsptool-args.h ends here */ diff --git a/src/p11tool-args.c b/src/p11tool-args.c deleted file mode 100644 index c2c9640349..0000000000 --- a/src/p11tool-args.c +++ /dev/null @@ -1,1331 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (p11tool-args.c) - * - * It has been AutoGen-ed October 26, 2013 at 11:03:33 AM by AutoGen 5.17 - * From the definitions p11tool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the p11tool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The p11tool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * p11tool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * p11tool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "p11tool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; - -/* TRANSLATORS: choose the translation for option names wisely because you - cannot ever change your mind. */ -#define zCopyright (p11tool_opt_strs+0) -#define zLicenseDescrip (p11tool_opt_strs+278) - - -#ifndef NULL -# define NULL 0 -#endif - -/* - * p11tool option static const strings - */ -static char const p11tool_opt_strs[3208] = -/* 0 */ "p11tool @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" - "redistribution under the terms of the\n" - "GNU General Public License, version 3 or later\n" - " \n\0" -/* 278 */ "p11tool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "p11tool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 881 */ "Enable debugging.\0" -/* 899 */ "DEBUG\0" -/* 905 */ "debug\0" -/* 911 */ "Output file\0" -/* 923 */ "OUTFILE\0" -/* 931 */ "outfile\0" -/* 939 */ "List all available tokens\0" -/* 965 */ "LIST_TOKENS\0" -/* 977 */ "list-tokens\0" -/* 989 */ "Export the object specified by the URL\0" -/* 1028 */ "EXPORT\0" -/* 1035 */ "export\0" -/* 1042 */ "List all available mechanisms in a token\0" -/* 1083 */ "LIST_MECHANISMS\0" -/* 1099 */ "list-mechanisms\0" -/* 1115 */ "List all available objects in a token\0" -/* 1153 */ "LIST_ALL\0" -/* 1162 */ "list-all\0" -/* 1171 */ "List all available certificates in a token\0" -/* 1214 */ "LIST_ALL_CERTS\0" -/* 1229 */ "list-all-certs\0" -/* 1244 */ "List all certificates that have an associated private key\0" -/* 1302 */ "LIST_CERTS\0" -/* 1313 */ "list-certs\0" -/* 1324 */ "List all available private keys in a token\0" -/* 1367 */ "LIST_ALL_PRIVKEYS\0" -/* 1385 */ "list-all-privkeys\0" -/* 1403 */ "List all available certificates marked as trusted\0" -/* 1453 */ "LIST_ALL_TRUSTED\0" -/* 1470 */ "list-all-trusted\0" -/* 1487 */ "Initializes a PKCS #11 token\0" -/* 1516 */ "INITIALIZE\0" -/* 1527 */ "initialize\0" -/* 1538 */ "Writes the loaded objects to a PKCS #11 token\0" -/* 1584 */ "WRITE\0" -/* 1590 */ "write\0" -/* 1596 */ "Deletes the objects matching the PKCS #11 URL\0" -/* 1642 */ "DELETE\0" -/* 1649 */ "delete\0" -/* 1656 */ "Generate random data\0" -/* 1677 */ "GENERATE_RANDOM\0" -/* 1693 */ "generate-random\0" -/* 1709 */ "Generate an RSA private-public key pair\0" -/* 1749 */ "GENERATE_RSA\0" -/* 1762 */ "generate-rsa\0" -/* 1775 */ "GENERATE_DSA\0" -/* 1788 */ "generate-dsa\0" -/* 1801 */ "GENERATE_ECC\0" -/* 1814 */ "generate-ecc\0" -/* 1827 */ "Sets a label for the write operation\0" -/* 1864 */ "LABEL\0" -/* 1870 */ "label\0" -/* 1876 */ "Marks the object to be written as trusted\0" -/* 1918 */ "TRUSTED\0" -/* 1926 */ "no-trusted\0" -/* 1937 */ "no\0" -/* 1940 */ "Marks the object to be written as private\0" -/* 1982 */ "PRIVATE\0" -/* 1990 */ "no-private\0" -/* 2001 */ "Force login to token\0" -/* 2022 */ "LOGIN\0" -/* 2028 */ "no-login\0" -/* 2037 */ "Print detailed URLs\0" -/* 2057 */ "DETAILED_URL\0" -/* 2070 */ "no-detailed-url\0" -/* 2086 */ "Provide a hex encoded secret key\0" -/* 2119 */ "SECRET_KEY\0" -/* 2130 */ "secret-key\0" -/* 2141 */ "Private key file to use\0" -/* 2165 */ "LOAD_PRIVKEY\0" -/* 2178 */ "load-privkey\0" -/* 2191 */ "Public key file to use\0" -/* 2214 */ "LOAD_PUBKEY\0" -/* 2226 */ "load-pubkey\0" -/* 2238 */ "Certificate file to use\0" -/* 2262 */ "LOAD_CERTIFICATE\0" -/* 2279 */ "load-certificate\0" -/* 2296 */ "Use PKCS #8 format for private keys\0" -/* 2332 */ "PKCS8\0" -/* 2338 */ "pkcs8\0" -/* 2344 */ "Specify the number of bits for key generate\0" -/* 2388 */ "BITS\0" -/* 2393 */ "bits\0" -/* 2398 */ "Specify the security level\0" -/* 2425 */ "SEC_PARAM\0" -/* 2435 */ "sec-param\0" -/* 2445 */ "Use DER/RAW format for input\0" -/* 2474 */ "INDER\0" -/* 2480 */ "no-inder\0" -/* 2489 */ "This is an alias for 'inder'\0" -/* 2518 */ "inraw\0" -/* 2524 */ "Specify the PKCS #11 provider library\0" -/* 2562 */ "PROVIDER\0" -/* 2571 */ "provider\0" -/* 2580 */ "Display extended usage information and exit\0" -/* 2624 */ "help\0" -/* 2629 */ "Extended usage information passed thru pager\0" -/* 2674 */ "more-help\0" -/* 2684 */ "Output version information and exit\0" -/* 2720 */ "version\0" -/* 2728 */ "P11TOOL\0" -/* 2736 */ "p11tool - GnuTLS PKCS #11 tool - Ver. @VERSION@\n" - "USAGE: %s [ - [] | --[{=| }] ]... [url]\n\0" -/* 2848 */ "bug-gnutls@gnu.org\0" -/* 2867 */ "\n\n\0" -/* 2870 */ "\n" - "Program that allows handling data from PKCS #11 smart cards and security\n" - "modules.\n\n" - "To use PKCS #11 tokens with gnutls the configuration file\n" - "/etc/gnutls/pkcs11.conf has to exist and contain a number of lines of the\n" - "form 'load=/usr/lib/opensc-pkcs11.so'.\n\0" -/* 3126 */ "p11tool @VERSION@\0" -/* 3144 */ "p11tool [options] [url]\n" - "p11tool --help for usage instructions.\n"; - -/* - * debug option description: - */ -#define DEBUG_DESC (p11tool_opt_strs+881) -#define DEBUG_NAME (p11tool_opt_strs+899) -#define DEBUG_name (p11tool_opt_strs+905) -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * outfile option description: - */ -#define OUTFILE_DESC (p11tool_opt_strs+911) -#define OUTFILE_NAME (p11tool_opt_strs+923) -#define OUTFILE_name (p11tool_opt_strs+931) -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * list-tokens option description: - */ -#define LIST_TOKENS_DESC (p11tool_opt_strs+939) -#define LIST_TOKENS_NAME (p11tool_opt_strs+965) -#define LIST_TOKENS_name (p11tool_opt_strs+977) -#define LIST_TOKENS_FLAGS (OPTST_DISABLED) - -/* - * export option description: - */ -#define EXPORT_DESC (p11tool_opt_strs+989) -#define EXPORT_NAME (p11tool_opt_strs+1028) -#define EXPORT_name (p11tool_opt_strs+1035) -#define EXPORT_FLAGS (OPTST_DISABLED) - -/* - * list-mechanisms option description: - */ -#define LIST_MECHANISMS_DESC (p11tool_opt_strs+1042) -#define LIST_MECHANISMS_NAME (p11tool_opt_strs+1083) -#define LIST_MECHANISMS_name (p11tool_opt_strs+1099) -#define LIST_MECHANISMS_FLAGS (OPTST_DISABLED) - -/* - * list-all option description: - */ -#define LIST_ALL_DESC (p11tool_opt_strs+1115) -#define LIST_ALL_NAME (p11tool_opt_strs+1153) -#define LIST_ALL_name (p11tool_opt_strs+1162) -#define LIST_ALL_FLAGS (OPTST_DISABLED) - -/* - * list-all-certs option description: - */ -#define LIST_ALL_CERTS_DESC (p11tool_opt_strs+1171) -#define LIST_ALL_CERTS_NAME (p11tool_opt_strs+1214) -#define LIST_ALL_CERTS_name (p11tool_opt_strs+1229) -#define LIST_ALL_CERTS_FLAGS (OPTST_DISABLED) - -/* - * list-certs option description: - */ -#define LIST_CERTS_DESC (p11tool_opt_strs+1244) -#define LIST_CERTS_NAME (p11tool_opt_strs+1302) -#define LIST_CERTS_name (p11tool_opt_strs+1313) -#define LIST_CERTS_FLAGS (OPTST_DISABLED) - -/* - * list-all-privkeys option description: - */ -#define LIST_ALL_PRIVKEYS_DESC (p11tool_opt_strs+1324) -#define LIST_ALL_PRIVKEYS_NAME (p11tool_opt_strs+1367) -#define LIST_ALL_PRIVKEYS_name (p11tool_opt_strs+1385) -#define LIST_ALL_PRIVKEYS_FLAGS (OPTST_DISABLED) - -/* - * list-all-trusted option description: - */ -#define LIST_ALL_TRUSTED_DESC (p11tool_opt_strs+1403) -#define LIST_ALL_TRUSTED_NAME (p11tool_opt_strs+1453) -#define LIST_ALL_TRUSTED_name (p11tool_opt_strs+1470) -#define LIST_ALL_TRUSTED_FLAGS (OPTST_DISABLED) - -/* - * initialize option description: - */ -#define INITIALIZE_DESC (p11tool_opt_strs+1487) -#define INITIALIZE_NAME (p11tool_opt_strs+1516) -#define INITIALIZE_name (p11tool_opt_strs+1527) -#define INITIALIZE_FLAGS (OPTST_DISABLED) - -/* - * write option description: - */ -#define WRITE_DESC (p11tool_opt_strs+1538) -#define WRITE_NAME (p11tool_opt_strs+1584) -#define WRITE_name (p11tool_opt_strs+1590) -#define WRITE_FLAGS (OPTST_DISABLED) - -/* - * delete option description: - */ -#define DELETE_DESC (p11tool_opt_strs+1596) -#define DELETE_NAME (p11tool_opt_strs+1642) -#define DELETE_name (p11tool_opt_strs+1649) -#define DELETE_FLAGS (OPTST_DISABLED) - -/* - * generate-random option description: - */ -#define GENERATE_RANDOM_DESC (p11tool_opt_strs+1656) -#define GENERATE_RANDOM_NAME (p11tool_opt_strs+1677) -#define GENERATE_RANDOM_name (p11tool_opt_strs+1693) -#define GENERATE_RANDOM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * generate-rsa option description: - */ -#define GENERATE_RSA_DESC (p11tool_opt_strs+1709) -#define GENERATE_RSA_NAME (p11tool_opt_strs+1749) -#define GENERATE_RSA_name (p11tool_opt_strs+1762) -#define GENERATE_RSA_FLAGS (OPTST_DISABLED) - -/* - * generate-dsa option description: - */ -#define GENERATE_DSA_DESC (p11tool_opt_strs+1709) -#define GENERATE_DSA_NAME (p11tool_opt_strs+1775) -#define GENERATE_DSA_name (p11tool_opt_strs+1788) -#define GENERATE_DSA_FLAGS (OPTST_DISABLED) - -/* - * generate-ecc option description: - */ -#define GENERATE_ECC_DESC (p11tool_opt_strs+1709) -#define GENERATE_ECC_NAME (p11tool_opt_strs+1801) -#define GENERATE_ECC_name (p11tool_opt_strs+1814) -#define GENERATE_ECC_FLAGS (OPTST_DISABLED) - -/* - * label option description: - */ -#define LABEL_DESC (p11tool_opt_strs+1827) -#define LABEL_NAME (p11tool_opt_strs+1864) -#define LABEL_name (p11tool_opt_strs+1870) -#define LABEL_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * trusted option description: - */ -#define TRUSTED_DESC (p11tool_opt_strs+1876) -#define TRUSTED_NAME (p11tool_opt_strs+1918) -#define NOT_TRUSTED_name (p11tool_opt_strs+1926) -#define NOT_TRUSTED_PFX (p11tool_opt_strs+1937) -#define TRUSTED_name (NOT_TRUSTED_name + 3) -#define TRUSTED_FLAGS (OPTST_DISABLED) - -/* - * private option description: - */ -#define PRIVATE_DESC (p11tool_opt_strs+1940) -#define PRIVATE_NAME (p11tool_opt_strs+1982) -#define NOT_PRIVATE_name (p11tool_opt_strs+1990) -#define NOT_PRIVATE_PFX (p11tool_opt_strs+1937) -#define PRIVATE_name (NOT_PRIVATE_name + 3) -#define PRIVATE_FLAGS (OPTST_INITENABLED) - -/* - * login option description: - */ -#define LOGIN_DESC (p11tool_opt_strs+2001) -#define LOGIN_NAME (p11tool_opt_strs+2022) -#define NOT_LOGIN_name (p11tool_opt_strs+2028) -#define NOT_LOGIN_PFX (p11tool_opt_strs+1937) -#define LOGIN_name (NOT_LOGIN_name + 3) -#define LOGIN_FLAGS (OPTST_DISABLED) - -/* - * detailed-url option description: - */ -#define DETAILED_URL_DESC (p11tool_opt_strs+2037) -#define DETAILED_URL_NAME (p11tool_opt_strs+2057) -#define NOT_DETAILED_URL_name (p11tool_opt_strs+2070) -#define NOT_DETAILED_URL_PFX (p11tool_opt_strs+1937) -#define DETAILED_URL_name (NOT_DETAILED_URL_name + 3) -#define DETAILED_URL_FLAGS (OPTST_DISABLED) - -/* - * secret-key option description: - */ -#define SECRET_KEY_DESC (p11tool_opt_strs+2086) -#define SECRET_KEY_NAME (p11tool_opt_strs+2119) -#define SECRET_KEY_name (p11tool_opt_strs+2130) -#define SECRET_KEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * load-privkey option description: - */ -#define LOAD_PRIVKEY_DESC (p11tool_opt_strs+2141) -#define LOAD_PRIVKEY_NAME (p11tool_opt_strs+2165) -#define LOAD_PRIVKEY_name (p11tool_opt_strs+2178) -#define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * load-pubkey option description: - */ -#define LOAD_PUBKEY_DESC (p11tool_opt_strs+2191) -#define LOAD_PUBKEY_NAME (p11tool_opt_strs+2214) -#define LOAD_PUBKEY_name (p11tool_opt_strs+2226) -#define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * load-certificate option description: - */ -#define LOAD_CERTIFICATE_DESC (p11tool_opt_strs+2238) -#define LOAD_CERTIFICATE_NAME (p11tool_opt_strs+2262) -#define LOAD_CERTIFICATE_name (p11tool_opt_strs+2279) -#define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * pkcs8 option description: - */ -#define PKCS8_DESC (p11tool_opt_strs+2296) -#define PKCS8_NAME (p11tool_opt_strs+2332) -#define PKCS8_name (p11tool_opt_strs+2338) -#define PKCS8_FLAGS (OPTST_DISABLED) - -/* - * bits option description: - */ -#define BITS_DESC (p11tool_opt_strs+2344) -#define BITS_NAME (p11tool_opt_strs+2388) -#define BITS_name (p11tool_opt_strs+2393) -#define BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * sec-param option description: - */ -#define SEC_PARAM_DESC (p11tool_opt_strs+2398) -#define SEC_PARAM_NAME (p11tool_opt_strs+2425) -#define SEC_PARAM_name (p11tool_opt_strs+2435) -#define SEC_PARAM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * inder option description: - */ -#define INDER_DESC (p11tool_opt_strs+2445) -#define INDER_NAME (p11tool_opt_strs+2474) -#define NOT_INDER_name (p11tool_opt_strs+2480) -#define NOT_INDER_PFX (p11tool_opt_strs+1937) -#define INDER_name (NOT_INDER_name + 3) -#define INDER_FLAGS (OPTST_DISABLED) - -/* - * inraw option description: - */ -#define INRAW_DESC (p11tool_opt_strs+2489) -#define INRAW_NAME NULL -#define INRAW_name (p11tool_opt_strs+2518) -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/* - * provider option description: - */ -#define PROVIDER_DESC (p11tool_opt_strs+2524) -#define PROVIDER_NAME (p11tool_opt_strs+2562) -#define PROVIDER_name (p11tool_opt_strs+2571) -#define PROVIDER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (p11tool_opt_strs+2580) -#define HELP_name (p11tool_opt_strs+2624) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (p11tool_opt_strs+2629) -#define MORE_HELP_name (p11tool_opt_strs+2674) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (p11tool_opt_strs+2684) -#define VER_name (p11tool_opt_strs+2720) -/* - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptInraw, doOptLoad_Certificate, - doOptLoad_Privkey, doOptLoad_Pubkey, doOptProvider, - doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the p11tool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the p11tool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 1, VALUE_OPT_OUTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_LIST_TOKENS, - /* equiv idx, value */ 2, VALUE_OPT_LIST_TOKENS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_TOKENS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-tokens */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_TOKENS_DESC, LIST_TOKENS_NAME, LIST_TOKENS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_EXPORT, - /* equiv idx, value */ 3, VALUE_OPT_EXPORT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EXPORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --export */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ EXPORT_DESC, EXPORT_NAME, EXPORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_LIST_MECHANISMS, - /* equiv idx, value */ 4, VALUE_OPT_LIST_MECHANISMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_MECHANISMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-mechanisms */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_MECHANISMS_DESC, LIST_MECHANISMS_NAME, LIST_MECHANISMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_LIST_ALL, - /* equiv idx, value */ 5, VALUE_OPT_LIST_ALL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_ALL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-all */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_ALL_DESC, LIST_ALL_NAME, LIST_ALL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_LIST_ALL_CERTS, - /* equiv idx, value */ 6, VALUE_OPT_LIST_ALL_CERTS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_ALL_CERTS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-all-certs */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_ALL_CERTS_DESC, LIST_ALL_CERTS_NAME, LIST_ALL_CERTS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_LIST_CERTS, - /* equiv idx, value */ 7, VALUE_OPT_LIST_CERTS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_CERTS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-certs */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_CERTS_DESC, LIST_CERTS_NAME, LIST_CERTS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_LIST_ALL_PRIVKEYS, - /* equiv idx, value */ 8, VALUE_OPT_LIST_ALL_PRIVKEYS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_ALL_PRIVKEYS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-all-privkeys */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_ALL_PRIVKEYS_DESC, LIST_ALL_PRIVKEYS_NAME, LIST_ALL_PRIVKEYS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_LIST_ALL_TRUSTED, - /* equiv idx, value */ 9, VALUE_OPT_LIST_ALL_TRUSTED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_ALL_TRUSTED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-all-trusted */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_ALL_TRUSTED_DESC, LIST_ALL_TRUSTED_NAME, LIST_ALL_TRUSTED_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_INITIALIZE, - /* equiv idx, value */ 10, VALUE_OPT_INITIALIZE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INITIALIZE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --initialize */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INITIALIZE_DESC, INITIALIZE_NAME, INITIALIZE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_WRITE, - /* equiv idx, value */ 11, VALUE_OPT_WRITE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ WRITE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --write */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ WRITE_DESC, WRITE_NAME, WRITE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_DELETE, - /* equiv idx, value */ 12, VALUE_OPT_DELETE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DELETE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --delete */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DELETE_DESC, DELETE_NAME, DELETE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_GENERATE_RANDOM, - /* equiv idx, value */ 13, VALUE_OPT_GENERATE_RANDOM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_RANDOM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-random */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ GENERATE_RANDOM_DESC, GENERATE_RANDOM_NAME, GENERATE_RANDOM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_GENERATE_RSA, - /* equiv idx, value */ 14, VALUE_OPT_GENERATE_RSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_RSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-rsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_RSA_DESC, GENERATE_RSA_NAME, GENERATE_RSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 15, VALUE_OPT_GENERATE_DSA, - /* equiv idx, value */ 15, VALUE_OPT_GENERATE_DSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_DSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-dsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_DSA_DESC, GENERATE_DSA_NAME, GENERATE_DSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_GENERATE_ECC, - /* equiv idx, value */ 16, VALUE_OPT_GENERATE_ECC, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_ECC_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-ecc */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_ECC_DESC, GENERATE_ECC_NAME, GENERATE_ECC_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_LABEL, - /* equiv idx, value */ 17, VALUE_OPT_LABEL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LABEL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --label */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LABEL_DESC, LABEL_NAME, LABEL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_TRUSTED, - /* equiv idx, value */ 18, VALUE_OPT_TRUSTED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TRUSTED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --trusted */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TRUSTED_DESC, TRUSTED_NAME, TRUSTED_name, - /* disablement strs */ NOT_TRUSTED_name, NOT_TRUSTED_PFX }, - - { /* entry idx, value */ 19, VALUE_OPT_PRIVATE, - /* equiv idx, value */ 19, VALUE_OPT_PRIVATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRIVATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --private */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRIVATE_DESC, PRIVATE_NAME, PRIVATE_name, - /* disablement strs */ NOT_PRIVATE_name, NOT_PRIVATE_PFX }, - - { /* entry idx, value */ 20, VALUE_OPT_LOGIN, - /* equiv idx, value */ 20, VALUE_OPT_LOGIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOGIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --login */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOGIN_DESC, LOGIN_NAME, LOGIN_name, - /* disablement strs */ NOT_LOGIN_name, NOT_LOGIN_PFX }, - - { /* entry idx, value */ 21, VALUE_OPT_DETAILED_URL, - /* equiv idx, value */ 21, VALUE_OPT_DETAILED_URL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DETAILED_URL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --detailed-url */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DETAILED_URL_DESC, DETAILED_URL_NAME, DETAILED_URL_name, - /* disablement strs */ NOT_DETAILED_URL_name, NOT_DETAILED_URL_PFX }, - - { /* entry idx, value */ 22, VALUE_OPT_SECRET_KEY, - /* equiv idx, value */ 22, VALUE_OPT_SECRET_KEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SECRET_KEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --secret-key */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SECRET_KEY_DESC, SECRET_KEY_NAME, SECRET_KEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_LOAD_PRIVKEY, - /* equiv idx, value */ 23, VALUE_OPT_LOAD_PRIVKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_PRIVKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-privkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Privkey, - /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, LOAD_PRIVKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 24, VALUE_OPT_LOAD_PUBKEY, - /* equiv idx, value */ 24, VALUE_OPT_LOAD_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Pubkey, - /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, LOAD_PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_LOAD_CERTIFICATE, - /* equiv idx, value */ 25, VALUE_OPT_LOAD_CERTIFICATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CERTIFICATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-certificate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Certificate, - /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, LOAD_CERTIFICATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 26, VALUE_OPT_PKCS8, - /* equiv idx, value */ 26, VALUE_OPT_PKCS8, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PKCS8_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pkcs8 */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_BITS, - /* equiv idx, value */ 27, VALUE_OPT_BITS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BITS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --bits */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 28, VALUE_OPT_SEC_PARAM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SEC_PARAM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sec-param */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 29, VALUE_OPT_INDER, - /* equiv idx, value */ 29, VALUE_OPT_INDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name, - /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX }, - - { /* entry idx, value */ 30, VALUE_OPT_INRAW, - /* equiv idx, value */ 30, VALUE_OPT_INRAW, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INRAW_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inraw */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInraw, - /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 31, VALUE_OPT_PROVIDER, - /* equiv idx, value */ 31, VALUE_OPT_PROVIDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PROVIDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --provider */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptProvider, - /* desc, NAME, name */ PROVIDER_DESC, PROVIDER_NAME, PROVIDER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the p11tool Option Environment - */ -#define zPROGNAME (p11tool_opt_strs+2728) -#define zUsageTitle (p11tool_opt_strs+2736) -#define zRcName NULL -#define apzHomeList NULL -#define zBugsAddr (p11tool_opt_strs+2848) -#define zExplain (p11tool_opt_strs+2867) -#define zDetail (p11tool_opt_strs+2870) -#define zFullVersion (p11tool_opt_strs+3126) -/* extracted from optcode.tlib near line 353 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - - -#define p11tool_full_usage (NULL) - -#define p11tool_short_usage (p11tool_opt_strs+3144) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param pOptions the AutoOpts option description structure - * @param pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&p11toolOptions, P11TOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-privkey option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Privkey(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-pubkey option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Pubkey(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-certificate option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Certificate(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the inraw option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the provider option. - * - * @param pOptions the p11tool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptProvider(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} -/* extracted from optmain.tlib near line 1188 */ - -/** - * The directory containing the data associated with p11tool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged p11tool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define p11tool_packager_info NULL -#else -static char const p11tool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport p11tool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for p11tool. The one structure that - * binds them all. - */ -tOptions p11toolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_REORDER - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 35 /* full option count */, 32 /* user option count */, - p11tool_full_usage, p11tool_short_usage, - NULL, NULL, - PKGDATADIR, p11tool_packager_info -}; - -#if ENABLE_NLS -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(P11TOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the p11toolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &p11toolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - tOptDesc * od = opts->pOptDesc; - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - coerce_it((void*)&(opts->pzPackager)); - coerce_it((void*)&(opts->pzShortUsage)); - - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - - if ((opts->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc * od = opts->pOptDesc; - int ix; - - for (ix = opts->optCt; ix > 0; ix--, od++) { - coerce_it((void*)&(od->pz_Name)); - coerce_it((void*)&(od->pz_DisableName)); - coerce_it((void*)&(od->pz_DisablePfx)); - } - p11toolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; - } -} - -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -/* p11tool-args.c ends here */ diff --git a/src/p11tool-args.h b/src/p11tool-args.h deleted file mode 100644 index 2cec37a20f..0000000000 --- a/src/p11tool-args.h +++ /dev/null @@ -1,256 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (p11tool-args.h) - * - * It has been AutoGen-ed October 26, 2013 at 11:03:33 AM by AutoGen 5.17 - * From the definitions p11tool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the p11tool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The p11tool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * p11tool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * p11tool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/* - * This file contains the programmatic interface to the Automated - * Options generated for the p11tool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_P11TOOL_ARGS_H_GUARD -#define AUTOOPTS_P11TOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/* - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 151552 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/* - * Enumeration of each option: - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_OUTFILE = 1, - INDEX_OPT_LIST_TOKENS = 2, - INDEX_OPT_EXPORT = 3, - INDEX_OPT_LIST_MECHANISMS = 4, - INDEX_OPT_LIST_ALL = 5, - INDEX_OPT_LIST_ALL_CERTS = 6, - INDEX_OPT_LIST_CERTS = 7, - INDEX_OPT_LIST_ALL_PRIVKEYS = 8, - INDEX_OPT_LIST_ALL_TRUSTED = 9, - INDEX_OPT_INITIALIZE = 10, - INDEX_OPT_WRITE = 11, - INDEX_OPT_DELETE = 12, - INDEX_OPT_GENERATE_RANDOM = 13, - INDEX_OPT_GENERATE_RSA = 14, - INDEX_OPT_GENERATE_DSA = 15, - INDEX_OPT_GENERATE_ECC = 16, - INDEX_OPT_LABEL = 17, - INDEX_OPT_TRUSTED = 18, - INDEX_OPT_PRIVATE = 19, - INDEX_OPT_LOGIN = 20, - INDEX_OPT_DETAILED_URL = 21, - INDEX_OPT_SECRET_KEY = 22, - INDEX_OPT_LOAD_PRIVKEY = 23, - INDEX_OPT_LOAD_PUBKEY = 24, - INDEX_OPT_LOAD_CERTIFICATE = 25, - INDEX_OPT_PKCS8 = 26, - INDEX_OPT_BITS = 27, - INDEX_OPT_SEC_PARAM = 28, - INDEX_OPT_INDER = 29, - INDEX_OPT_INRAW = 30, - INDEX_OPT_PROVIDER = 31, - INDEX_OPT_VERSION = 32, - INDEX_OPT_HELP = 33, - INDEX_OPT_MORE_HELP = 34 -} teOptIndex; - -#define OPTION_CT 35 -#define P11TOOL_VERSION "@VERSION@" -#define P11TOOL_FULL_VERSION "p11tool @VERSION@" - -/* - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (p11toolOptions.pOptDesc[INDEX_OPT_## n]) -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -#define OPT_ARG(n) (DESC(n).optArg.argString) -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -#define COUNT_OPT(n) (DESC(n).optOccCt) -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * - * - * Enumeration of p11tool exit codes - */ -typedef enum { - P11TOOL_EXIT_SUCCESS = 0, - P11TOOL_EXIT_FAILURE = 1, - P11TOOL_EXIT_USAGE_ERROR = 64, - P11TOOL_EXIT_LIBOPTS_FAILURE = 70 -} p11tool_exit_code_t; -/* * * * * * - * - * Interface defines for specific options. - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_OUTFILE 1 -#define VALUE_OPT_LIST_TOKENS 2 -#define VALUE_OPT_EXPORT 3 -#define VALUE_OPT_LIST_MECHANISMS 4 -#define VALUE_OPT_LIST_ALL 5 -#define VALUE_OPT_LIST_ALL_CERTS 6 -#define VALUE_OPT_LIST_CERTS 7 -#define VALUE_OPT_LIST_ALL_PRIVKEYS 8 -#define VALUE_OPT_LIST_ALL_TRUSTED 9 -#define VALUE_OPT_INITIALIZE 10 -#define VALUE_OPT_WRITE 11 -#define VALUE_OPT_DELETE 12 -#define VALUE_OPT_GENERATE_RANDOM 13 - -#define OPT_VALUE_GENERATE_RANDOM (DESC(GENERATE_RANDOM).optArg.argInt) -#define VALUE_OPT_GENERATE_RSA 14 -#define VALUE_OPT_GENERATE_DSA 15 -#define VALUE_OPT_GENERATE_ECC 16 -#define VALUE_OPT_LABEL 17 -#define VALUE_OPT_TRUSTED 18 -#define VALUE_OPT_PRIVATE 19 -#define VALUE_OPT_LOGIN 20 -#define VALUE_OPT_DETAILED_URL 21 -#define VALUE_OPT_SECRET_KEY 22 -#define VALUE_OPT_LOAD_PRIVKEY 23 -#define VALUE_OPT_LOAD_PUBKEY 24 -#define VALUE_OPT_LOAD_CERTIFICATE 25 -#define VALUE_OPT_PKCS8 '8' -#define VALUE_OPT_BITS 27 - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_SEC_PARAM 28 -#define VALUE_OPT_INDER 29 -#define VALUE_OPT_INRAW 30 -#define VALUE_OPT_PROVIDER 31 -#define VALUE_OPT_HELP 'h' -#define VALUE_OPT_MORE_HELP '!' -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(p11toolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(p11toolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - p11toolOptions.curOptIdx = (n); \ - p11toolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*p11toolOptions.pUsageProc)(&p11toolOptions, c) -/* extracted from opthead.tlib near line 497 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the p11tool option descriptor. - */ -extern tOptions p11toolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(p11toolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(p11toolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(p11toolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(p11toolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_P11TOOL_ARGS_H_GUARD */ -/* p11tool-args.h ends here */ diff --git a/src/psk-args.c b/src/psk-args.c deleted file mode 100644 index 9400cc9605..0000000000 --- a/src/psk-args.c +++ /dev/null @@ -1,966 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (psk-args.c) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:26 PM by AutoGen 5.17.3 - * From the definitions psk-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the psktool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The psktool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * psktool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * psktool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "psk-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (psktool_opt_strs+0) -#define zLicenseDescrip (psktool_opt_strs+274) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for psktool options - */ -static char const psktool_opt_strs[1482] = -/* 0 */ "psktool @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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 274 */ "psktool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "psktool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 877 */ "Enable debugging.\0" -/* 895 */ "DEBUG\0" -/* 901 */ "debug\0" -/* 907 */ "specify the key size in bytes\0" -/* 937 */ "KEYSIZE\0" -/* 945 */ "keysize\0" -/* 953 */ "specify a username\0" -/* 972 */ "USERNAME\0" -/* 981 */ "username\0" -/* 990 */ "specify a password file.\0" -/* 1015 */ "PASSWD\0" -/* 1022 */ "passwd\0" -/* 1029 */ "display extended usage information and exit\0" -/* 1073 */ "help\0" -/* 1078 */ "extended usage information passed thru pager\0" -/* 1123 */ "more-help\0" -/* 1133 */ "output version information and exit\0" -/* 1169 */ "version\0" -/* 1177 */ "PSKTOOL\0" -/* 1185 */ "psktool - GnuTLS PSK tool\n" - "Usage: %s [ - [] | --[{=| }] ]...\n\0" -/* 1269 */ "bug-gnutls@gnu.org\0" -/* 1288 */ "\n\0" -/* 1290 */ "Program that generates random keys for use with TLS-PSK. The keys are\n" - "stored in hexadecimal format in a key file.\n\0" -/* 1406 */ "psktool @VERSION@\0" -/* 1424 */ "psktool [options]\n" - "psktool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (psktool_opt_strs+877) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (psktool_opt_strs+895) -/** Name string for the debug option */ -#define DEBUG_name (psktool_opt_strs+901) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * keysize option description: - */ -/** Descriptive text for the keysize option */ -#define KEYSIZE_DESC (psktool_opt_strs+907) -/** Upper-cased name for the keysize option */ -#define KEYSIZE_NAME (psktool_opt_strs+937) -/** Name string for the keysize option */ -#define KEYSIZE_name (psktool_opt_strs+945) -/** Compiled in flag settings for the keysize option */ -#define KEYSIZE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * username option description: - */ -/** Descriptive text for the username option */ -#define USERNAME_DESC (psktool_opt_strs+953) -/** Upper-cased name for the username option */ -#define USERNAME_NAME (psktool_opt_strs+972) -/** Name string for the username option */ -#define USERNAME_name (psktool_opt_strs+981) -/** Compiled in flag settings for the username option */ -#define USERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * passwd option description: - */ -/** Descriptive text for the passwd option */ -#define PASSWD_DESC (psktool_opt_strs+990) -/** Upper-cased name for the passwd option */ -#define PASSWD_NAME (psktool_opt_strs+1015) -/** Name string for the passwd option */ -#define PASSWD_name (psktool_opt_strs+1022) -/** Compiled in flag settings for the passwd option */ -#define PASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (psktool_opt_strs+1029) -#define HELP_name (psktool_opt_strs+1073) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (psktool_opt_strs+1078) -#define MORE_HELP_name (psktool_opt_strs+1123) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (psktool_opt_strs+1133) -#define VER_name (psktool_opt_strs+1169) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptKeysize, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the psktool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the psktool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_KEYSIZE, - /* equiv idx, value */ 1, VALUE_OPT_KEYSIZE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ KEYSIZE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --keysize */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptKeysize, - /* desc, NAME, name */ KEYSIZE_DESC, KEYSIZE_NAME, KEYSIZE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_USERNAME, - /* equiv idx, value */ 2, VALUE_OPT_USERNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ USERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --username */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ USERNAME_DESC, USERNAME_NAME, USERNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_PASSWD, - /* equiv idx, value */ 3, VALUE_OPT_PASSWD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --passwd */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PASSWD_DESC, PASSWD_NAME, PASSWD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of psktool. */ -#define zPROGNAME (psktool_opt_strs+1177) -/** Reference to the title line for psktool usage. */ -#define zUsageTitle (psktool_opt_strs+1185) -/** There is no psktool configuration file. */ -#define zRcName NULL -/** There are no directories to search for psktool config files. */ -#define apzHomeList NULL -/** The psktool program bug email address. */ -#define zBugsAddr (psktool_opt_strs+1269) -/** Clarification/explanation of what psktool does. */ -#define zExplain (psktool_opt_strs+1288) -/** Extra detail explaining what psktool does. */ -#define zDetail (psktool_opt_strs+1290) -/** The full version string for psktool. */ -#define zFullVersion (psktool_opt_strs+1406) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define psktool_full_usage (NULL) -#define psktool_short_usage (psktool_opt_strs+1424) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&psktoolOptions, PSKTOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the psktool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the keysize option. - * - * @param[in] pOptions the psktool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptKeysize(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 512 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with psktool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged psktool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define psktool_packager_info NULL -#else -/** Packager information for psktool. */ -static char const psktool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport psktool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for psktool. The one structure that - * binds them all. - */ -tOptions psktoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 7 /* full option count */, 4 /* user option count */, - psktool_full_usage, psktool_short_usage, - NULL, NULL, - PKGDATADIR, psktool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * psktool program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(PSKTOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the psktoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &psktoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the psktoolOptions structure noted in the comments below. The - literal text is defined in psktool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - psktool_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via psktoolOptions.pzCopyright */ - puts(_("psktool @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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via psktoolOptions.pzCopyNotice */ - puts(_("psktool is free software: you can redistribute it and/or modify it under\n\ -the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("psktool is distributed in the hope that it will be useful, but WITHOUT ANY\n\ -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\ -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n\ -details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("specify the key size in bytes")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("specify a username")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("specify a password file.")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via psktoolOptions.pzUsageTitle */ - puts(_("psktool - GnuTLS PSK tool\n\ -Usage: %s [ - [] | --[{=| }] ]...\n")); - - /* referenced via psktoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via psktoolOptions.pzDetail */ - puts(_("Program that generates random keys for use with TLS-PSK. The keys are\n\ -stored in hexadecimal format in a key file.\n")); - - /* referenced via psktoolOptions.pzFullVersion */ - puts(_("psktool @VERSION@")); - - /* referenced via psktoolOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via psktoolOptions.pzShortUsage */ - puts(_("psktool [options]\n\ -psktool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* psk-args.c ends here */ diff --git a/src/psk-args.h b/src/psk-args.h deleted file mode 100644 index f77ee34721..0000000000 --- a/src/psk-args.h +++ /dev/null @@ -1,218 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (psk-args.h) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:26 PM by AutoGen 5.17.3 - * From the definitions psk-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the psktool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The psktool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * psktool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * psktool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the psktool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_PSK_ARGS_H_GUARD -#define AUTOOPTS_PSK_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for psktool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_KEYSIZE = 1, - INDEX_OPT_USERNAME = 2, - INDEX_OPT_PASSWD = 3, - INDEX_OPT_VERSION = 4, - INDEX_OPT_HELP = 5, - INDEX_OPT_MORE_HELP = 6 -} teOptIndex; -/** count of all options for psktool */ -#define OPTION_CT 7 -/** psktool version */ -#define PSKTOOL_VERSION "@VERSION@" -/** Full psktool version text */ -#define PSKTOOL_FULL_VERSION "psktool @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (psktoolOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of psktool exit codes - */ -typedef enum { - PSKTOOL_EXIT_SUCCESS = 0, - PSKTOOL_EXIT_FAILURE = 1, - PSKTOOL_EXIT_USAGE_ERROR = 64, - PSKTOOL_EXIT_LIBOPTS_FAILURE = 70 -} psktool_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_KEYSIZE 's' - -#define OPT_VALUE_KEYSIZE (DESC(KEYSIZE).optArg.argInt) -#define VALUE_OPT_USERNAME 'u' -#define VALUE_OPT_PASSWD 'p' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(psktoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(psktoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - psktoolOptions.curOptIdx = (n); \ - psktoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*psktoolOptions.pUsageProc)(&psktoolOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the psktool option descriptor. - */ -extern tOptions psktoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(psktoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(psktoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(psktoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(psktoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_PSK_ARGS_H_GUARD */ -/* psk-args.h ends here */ diff --git a/src/serv-args.c b/src/serv-args.c deleted file mode 100644 index 288a9eabc7..0000000000 --- a/src/serv-args.c +++ /dev/null @@ -1,2130 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (serv-args.c) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:27 PM by AutoGen 5.17.3 - * From the definitions serv-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-serv author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-serv program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * gnutls-serv is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-serv is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "serv-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (gnutls_serv_opt_strs+0) -#define zLicenseDescrip (gnutls_serv_opt_strs+278) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for gnutls-serv options - */ -static char const gnutls_serv_opt_strs[3083] = -/* 0 */ "gnutls-serv @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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 278 */ "gnutls-serv is free software: you can redistribute it and/or modify it\n" - "under the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "gnutls-serv is distributed in the hope that it will be useful, but WITHOUT\n" - "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" - "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" - "more details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 889 */ "Enable debugging.\0" -/* 907 */ "DEBUG\0" -/* 913 */ "debug\0" -/* 919 */ "Don't accept session tickets\0" -/* 948 */ "NOTICKET\0" -/* 957 */ "noticket\0" -/* 966 */ "Generate Diffie-Hellman and RSA-export parameters\0" -/* 1016 */ "GENERATE\0" -/* 1025 */ "generate\0" -/* 1034 */ "Suppress some messages\0" -/* 1057 */ "QUIET\0" -/* 1063 */ "quiet\0" -/* 1069 */ "Do not use a resumption database\0" -/* 1102 */ "NODB\0" -/* 1107 */ "nodb\0" -/* 1112 */ "Act as an HTTP server\0" -/* 1134 */ "HTTP\0" -/* 1139 */ "http\0" -/* 1144 */ "Act as an Echo server\0" -/* 1166 */ "ECHO\0" -/* 1171 */ "echo\0" -/* 1176 */ "Use DTLS (datagram TLS) over UDP\0" -/* 1209 */ "UDP\0" -/* 1213 */ "udp\0" -/* 1217 */ "Set MTU for datagram TLS\0" -/* 1242 */ "MTU\0" -/* 1246 */ "mtu\0" -/* 1250 */ "Offer SRTP profiles\0" -/* 1270 */ "SRTP_PROFILES\0" -/* 1284 */ "srtp-profiles\0" -/* 1298 */ "Do not request a client certificate\0" -/* 1334 */ "DISABLE_CLIENT_CERT\0" -/* 1354 */ "disable-client-cert\0" -/* 1374 */ "Require a client certificate\0" -/* 1403 */ "REQUIRE_CLIENT_CERT\0" -/* 1423 */ "require-client-cert\0" -/* 1443 */ "Activate heartbeat support\0" -/* 1470 */ "HEARTBEAT\0" -/* 1480 */ "heartbeat\0" -/* 1490 */ "Use DER format for certificates to read from\0" -/* 1535 */ "X509FMTDER\0" -/* 1546 */ "x509fmtder\0" -/* 1557 */ "Priorities string\0" -/* 1575 */ "PRIORITY\0" -/* 1584 */ "priority\0" -/* 1593 */ "DH params file to use\0" -/* 1615 */ "DHPARAMS\0" -/* 1624 */ "dhparams\0" -/* 1633 */ "Certificate file or PKCS #11 URL to use\0" -/* 1673 */ "X509CAFILE\0" -/* 1684 */ "x509cafile\0" -/* 1695 */ "CRL file to use\0" -/* 1711 */ "X509CRLFILE\0" -/* 1723 */ "x509crlfile\0" -/* 1735 */ "PGP Key file to use\0" -/* 1755 */ "PGPKEYFILE\0" -/* 1766 */ "pgpkeyfile\0" -/* 1777 */ "PGP Key ring file to use\0" -/* 1802 */ "PGPKEYRING\0" -/* 1813 */ "pgpkeyring\0" -/* 1824 */ "PGP Public Key (certificate) file to use\0" -/* 1865 */ "PGPCERTFILE\0" -/* 1877 */ "pgpcertfile\0" -/* 1889 */ "X.509 key file or PKCS #11 URL to use\0" -/* 1927 */ "X509KEYFILE\0" -/* 1939 */ "x509keyfile\0" -/* 1951 */ "X.509 Certificate file or PKCS #11 URL to use\0" -/* 1997 */ "X509CERTFILE\0" -/* 2010 */ "x509certfile\0" -/* 2023 */ "Alternative X.509 key file or PKCS #11 URL to use\0" -/* 2073 */ "X509DSAKEYFILE\0" -/* 2088 */ "x509dsakeyfile\0" -/* 2103 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0" -/* 2161 */ "X509DSACERTFILE\0" -/* 2177 */ "x509dsacertfile\0" -/* 2193 */ "X509ECCKEYFILE\0" -/* 2208 */ "x509ecckeyfile\0" -/* 2223 */ "X509ECCCERTFILE\0" -/* 2239 */ "x509ecccertfile\0" -/* 2255 */ "PGP subkey to use (hex or auto)\0" -/* 2287 */ "PGPSUBKEY\0" -/* 2297 */ "pgpsubkey\0" -/* 2307 */ "SRP password file to use\0" -/* 2332 */ "SRPPASSWD\0" -/* 2342 */ "srppasswd\0" -/* 2352 */ "SRP password configuration file to use\0" -/* 2391 */ "SRPPASSWDCONF\0" -/* 2405 */ "srppasswdconf\0" -/* 2419 */ "PSK password file to use\0" -/* 2444 */ "PSKPASSWD\0" -/* 2454 */ "pskpasswd\0" -/* 2464 */ "PSK identity hint to use\0" -/* 2489 */ "PSKHINT\0" -/* 2497 */ "pskhint\0" -/* 2505 */ "The OCSP response to send to client\0" -/* 2541 */ "OCSP_RESPONSE\0" -/* 2555 */ "ocsp-response\0" -/* 2569 */ "The port to connect to\0" -/* 2592 */ "PORT\0" -/* 2597 */ "port\0" -/* 2602 */ "Print a list of the supported algorithms and modes\0" -/* 2653 */ "LIST\0" -/* 2658 */ "list\0" -/* 2663 */ "display extended usage information and exit\0" -/* 2707 */ "help\0" -/* 2712 */ "extended usage information passed thru pager\0" -/* 2757 */ "more-help\0" -/* 2767 */ "output version information and exit\0" -/* 2803 */ "version\0" -/* 2811 */ "GNUTLS_SERV\0" -/* 2823 */ "gnutls-serv - GnuTLS server\n" - "Usage: %s [ - [] | --[{=| }] ]...\n\0" -/* 2909 */ "bug-gnutls@gnu.org\0" -/* 2928 */ "\n\0" -/* 2930 */ "Server program that listens to incoming TLS connections.\n\0" -/* 2988 */ "gnutls-serv @VERSION@\0" -/* 3010 */ "Usage: gnutls-serv [options]\n" - "gnutls-serv --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (gnutls_serv_opt_strs+889) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (gnutls_serv_opt_strs+907) -/** Name string for the debug option */ -#define DEBUG_name (gnutls_serv_opt_strs+913) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * noticket option description: - */ -/** Descriptive text for the noticket option */ -#define NOTICKET_DESC (gnutls_serv_opt_strs+919) -/** Upper-cased name for the noticket option */ -#define NOTICKET_NAME (gnutls_serv_opt_strs+948) -/** Name string for the noticket option */ -#define NOTICKET_name (gnutls_serv_opt_strs+957) -/** Compiled in flag settings for the noticket option */ -#define NOTICKET_FLAGS (OPTST_DISABLED) - -/** - * generate option description: - */ -/** Descriptive text for the generate option */ -#define GENERATE_DESC (gnutls_serv_opt_strs+966) -/** Upper-cased name for the generate option */ -#define GENERATE_NAME (gnutls_serv_opt_strs+1016) -/** Name string for the generate option */ -#define GENERATE_name (gnutls_serv_opt_strs+1025) -/** Compiled in flag settings for the generate option */ -#define GENERATE_FLAGS (OPTST_DISABLED) - -/** - * quiet option description: - */ -/** Descriptive text for the quiet option */ -#define QUIET_DESC (gnutls_serv_opt_strs+1034) -/** Upper-cased name for the quiet option */ -#define QUIET_NAME (gnutls_serv_opt_strs+1057) -/** Name string for the quiet option */ -#define QUIET_name (gnutls_serv_opt_strs+1063) -/** Compiled in flag settings for the quiet option */ -#define QUIET_FLAGS (OPTST_DISABLED) - -/** - * nodb option description: - */ -/** Descriptive text for the nodb option */ -#define NODB_DESC (gnutls_serv_opt_strs+1069) -/** Upper-cased name for the nodb option */ -#define NODB_NAME (gnutls_serv_opt_strs+1102) -/** Name string for the nodb option */ -#define NODB_name (gnutls_serv_opt_strs+1107) -/** Compiled in flag settings for the nodb option */ -#define NODB_FLAGS (OPTST_DISABLED) - -/** - * http option description: - */ -/** Descriptive text for the http option */ -#define HTTP_DESC (gnutls_serv_opt_strs+1112) -/** Upper-cased name for the http option */ -#define HTTP_NAME (gnutls_serv_opt_strs+1134) -/** Name string for the http option */ -#define HTTP_name (gnutls_serv_opt_strs+1139) -/** Compiled in flag settings for the http option */ -#define HTTP_FLAGS (OPTST_DISABLED) - -/** - * echo option description: - */ -/** Descriptive text for the echo option */ -#define ECHO_DESC (gnutls_serv_opt_strs+1144) -/** Upper-cased name for the echo option */ -#define ECHO_NAME (gnutls_serv_opt_strs+1166) -/** Name string for the echo option */ -#define ECHO_name (gnutls_serv_opt_strs+1171) -/** Compiled in flag settings for the echo option */ -#define ECHO_FLAGS (OPTST_DISABLED) - -/** - * udp option description: - */ -/** Descriptive text for the udp option */ -#define UDP_DESC (gnutls_serv_opt_strs+1176) -/** Upper-cased name for the udp option */ -#define UDP_NAME (gnutls_serv_opt_strs+1209) -/** Name string for the udp option */ -#define UDP_name (gnutls_serv_opt_strs+1213) -/** Compiled in flag settings for the udp option */ -#define UDP_FLAGS (OPTST_DISABLED) - -/** - * mtu option description: - */ -/** Descriptive text for the mtu option */ -#define MTU_DESC (gnutls_serv_opt_strs+1217) -/** Upper-cased name for the mtu option */ -#define MTU_NAME (gnutls_serv_opt_strs+1242) -/** Name string for the mtu option */ -#define MTU_name (gnutls_serv_opt_strs+1246) -/** Compiled in flag settings for the mtu option */ -#define MTU_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * srtp_profiles option description: - */ -/** Descriptive text for the srtp_profiles option */ -#define SRTP_PROFILES_DESC (gnutls_serv_opt_strs+1250) -/** Upper-cased name for the srtp_profiles option */ -#define SRTP_PROFILES_NAME (gnutls_serv_opt_strs+1270) -/** Name string for the srtp_profiles option */ -#define SRTP_PROFILES_name (gnutls_serv_opt_strs+1284) -/** Compiled in flag settings for the srtp_profiles option */ -#define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * disable-client-cert option description: - */ -/** Descriptive text for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1298) -/** Upper-cased name for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1334) -/** Name string for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_name (gnutls_serv_opt_strs+1354) -/** Compiled in flag settings for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_FLAGS (OPTST_DISABLED) - -/** - * require-client-cert option description: - */ -/** Descriptive text for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1374) -/** Upper-cased name for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1403) -/** Name string for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_name (gnutls_serv_opt_strs+1423) -/** Compiled in flag settings for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) - -/** - * heartbeat option description: - */ -/** Descriptive text for the heartbeat option */ -#define HEARTBEAT_DESC (gnutls_serv_opt_strs+1443) -/** Upper-cased name for the heartbeat option */ -#define HEARTBEAT_NAME (gnutls_serv_opt_strs+1470) -/** Name string for the heartbeat option */ -#define HEARTBEAT_name (gnutls_serv_opt_strs+1480) -/** Compiled in flag settings for the heartbeat option */ -#define HEARTBEAT_FLAGS (OPTST_DISABLED) - -/** - * x509fmtder option description: - */ -/** Descriptive text for the x509fmtder option */ -#define X509FMTDER_DESC (gnutls_serv_opt_strs+1490) -/** Upper-cased name for the x509fmtder option */ -#define X509FMTDER_NAME (gnutls_serv_opt_strs+1535) -/** Name string for the x509fmtder option */ -#define X509FMTDER_name (gnutls_serv_opt_strs+1546) -/** Compiled in flag settings for the x509fmtder option */ -#define X509FMTDER_FLAGS (OPTST_DISABLED) - -/** - * priority option description: - */ -/** Descriptive text for the priority option */ -#define PRIORITY_DESC (gnutls_serv_opt_strs+1557) -/** Upper-cased name for the priority option */ -#define PRIORITY_NAME (gnutls_serv_opt_strs+1575) -/** Name string for the priority option */ -#define PRIORITY_name (gnutls_serv_opt_strs+1584) -/** Compiled in flag settings for the priority option */ -#define PRIORITY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * dhparams option description: - */ -/** Descriptive text for the dhparams option */ -#define DHPARAMS_DESC (gnutls_serv_opt_strs+1593) -/** Upper-cased name for the dhparams option */ -#define DHPARAMS_NAME (gnutls_serv_opt_strs+1615) -/** Name string for the dhparams option */ -#define DHPARAMS_name (gnutls_serv_opt_strs+1624) -/** Compiled in flag settings for the dhparams option */ -#define DHPARAMS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * x509cafile option description: - */ -/** Descriptive text for the x509cafile option */ -#define X509CAFILE_DESC (gnutls_serv_opt_strs+1633) -/** Upper-cased name for the x509cafile option */ -#define X509CAFILE_NAME (gnutls_serv_opt_strs+1673) -/** Name string for the x509cafile option */ -#define X509CAFILE_name (gnutls_serv_opt_strs+1684) -/** Compiled in flag settings for the x509cafile option */ -#define X509CAFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509crlfile option description: - */ -/** Descriptive text for the x509crlfile option */ -#define X509CRLFILE_DESC (gnutls_serv_opt_strs+1695) -/** Upper-cased name for the x509crlfile option */ -#define X509CRLFILE_NAME (gnutls_serv_opt_strs+1711) -/** Name string for the x509crlfile option */ -#define X509CRLFILE_name (gnutls_serv_opt_strs+1723) -/** Compiled in flag settings for the x509crlfile option */ -#define X509CRLFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * pgpkeyfile option description: - */ -/** Descriptive text for the pgpkeyfile option */ -#define PGPKEYFILE_DESC (gnutls_serv_opt_strs+1735) -/** Upper-cased name for the pgpkeyfile option */ -#define PGPKEYFILE_NAME (gnutls_serv_opt_strs+1755) -/** Name string for the pgpkeyfile option */ -#define PGPKEYFILE_name (gnutls_serv_opt_strs+1766) -/** Compiled in flag settings for the pgpkeyfile option */ -#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * pgpkeyring option description: - */ -/** Descriptive text for the pgpkeyring option */ -#define PGPKEYRING_DESC (gnutls_serv_opt_strs+1777) -/** Upper-cased name for the pgpkeyring option */ -#define PGPKEYRING_NAME (gnutls_serv_opt_strs+1802) -/** Name string for the pgpkeyring option */ -#define PGPKEYRING_name (gnutls_serv_opt_strs+1813) -/** Compiled in flag settings for the pgpkeyring option */ -#define PGPKEYRING_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * pgpcertfile option description: - */ -/** Descriptive text for the pgpcertfile option */ -#define PGPCERTFILE_DESC (gnutls_serv_opt_strs+1824) -/** Upper-cased name for the pgpcertfile option */ -#define PGPCERTFILE_NAME (gnutls_serv_opt_strs+1865) -/** Name string for the pgpcertfile option */ -#define PGPCERTFILE_name (gnutls_serv_opt_strs+1877) -/** Compiled in flag settings for the pgpcertfile option */ -#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * x509keyfile option description: - */ -/** Descriptive text for the x509keyfile option */ -#define X509KEYFILE_DESC (gnutls_serv_opt_strs+1889) -/** Upper-cased name for the x509keyfile option */ -#define X509KEYFILE_NAME (gnutls_serv_opt_strs+1927) -/** Name string for the x509keyfile option */ -#define X509KEYFILE_name (gnutls_serv_opt_strs+1939) -/** Compiled in flag settings for the x509keyfile option */ -#define X509KEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509certfile option description: - */ -/** Descriptive text for the x509certfile option */ -#define X509CERTFILE_DESC (gnutls_serv_opt_strs+1951) -/** Upper-cased name for the x509certfile option */ -#define X509CERTFILE_NAME (gnutls_serv_opt_strs+1997) -/** Name string for the x509certfile option */ -#define X509CERTFILE_name (gnutls_serv_opt_strs+2010) -/** Compiled in flag settings for the x509certfile option */ -#define X509CERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509dsakeyfile option description: - */ -/** Descriptive text for the x509dsakeyfile option */ -#define X509DSAKEYFILE_DESC (gnutls_serv_opt_strs+2023) -/** Upper-cased name for the x509dsakeyfile option */ -#define X509DSAKEYFILE_NAME (gnutls_serv_opt_strs+2073) -/** Name string for the x509dsakeyfile option */ -#define X509DSAKEYFILE_name (gnutls_serv_opt_strs+2088) -/** Compiled in flag settings for the x509dsakeyfile option */ -#define X509DSAKEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509dsacertfile option description: - */ -/** Descriptive text for the x509dsacertfile option */ -#define X509DSACERTFILE_DESC (gnutls_serv_opt_strs+2103) -/** Upper-cased name for the x509dsacertfile option */ -#define X509DSACERTFILE_NAME (gnutls_serv_opt_strs+2161) -/** Name string for the x509dsacertfile option */ -#define X509DSACERTFILE_name (gnutls_serv_opt_strs+2177) -/** Compiled in flag settings for the x509dsacertfile option */ -#define X509DSACERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509ecckeyfile option description: - */ -/** Descriptive text for the x509ecckeyfile option */ -#define X509ECCKEYFILE_DESC (gnutls_serv_opt_strs+2023) -/** Upper-cased name for the x509ecckeyfile option */ -#define X509ECCKEYFILE_NAME (gnutls_serv_opt_strs+2193) -/** Name string for the x509ecckeyfile option */ -#define X509ECCKEYFILE_name (gnutls_serv_opt_strs+2208) -/** Compiled in flag settings for the x509ecckeyfile option */ -#define X509ECCKEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509ecccertfile option description: - */ -/** Descriptive text for the x509ecccertfile option */ -#define X509ECCCERTFILE_DESC (gnutls_serv_opt_strs+2103) -/** Upper-cased name for the x509ecccertfile option */ -#define X509ECCCERTFILE_NAME (gnutls_serv_opt_strs+2223) -/** Name string for the x509ecccertfile option */ -#define X509ECCCERTFILE_name (gnutls_serv_opt_strs+2239) -/** Compiled in flag settings for the x509ecccertfile option */ -#define X509ECCCERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * pgpsubkey option description: - */ -/** Descriptive text for the pgpsubkey option */ -#define PGPSUBKEY_DESC (gnutls_serv_opt_strs+2255) -/** Upper-cased name for the pgpsubkey option */ -#define PGPSUBKEY_NAME (gnutls_serv_opt_strs+2287) -/** Name string for the pgpsubkey option */ -#define PGPSUBKEY_name (gnutls_serv_opt_strs+2297) -/** Compiled in flag settings for the pgpsubkey option */ -#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * srppasswd option description: - */ -/** Descriptive text for the srppasswd option */ -#define SRPPASSWD_DESC (gnutls_serv_opt_strs+2307) -/** Upper-cased name for the srppasswd option */ -#define SRPPASSWD_NAME (gnutls_serv_opt_strs+2332) -/** Name string for the srppasswd option */ -#define SRPPASSWD_name (gnutls_serv_opt_strs+2342) -/** Compiled in flag settings for the srppasswd option */ -#define SRPPASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * srppasswdconf option description: - */ -/** Descriptive text for the srppasswdconf option */ -#define SRPPASSWDCONF_DESC (gnutls_serv_opt_strs+2352) -/** Upper-cased name for the srppasswdconf option */ -#define SRPPASSWDCONF_NAME (gnutls_serv_opt_strs+2391) -/** Name string for the srppasswdconf option */ -#define SRPPASSWDCONF_name (gnutls_serv_opt_strs+2405) -/** Compiled in flag settings for the srppasswdconf option */ -#define SRPPASSWDCONF_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * pskpasswd option description: - */ -/** Descriptive text for the pskpasswd option */ -#define PSKPASSWD_DESC (gnutls_serv_opt_strs+2419) -/** Upper-cased name for the pskpasswd option */ -#define PSKPASSWD_NAME (gnutls_serv_opt_strs+2444) -/** Name string for the pskpasswd option */ -#define PSKPASSWD_name (gnutls_serv_opt_strs+2454) -/** Compiled in flag settings for the pskpasswd option */ -#define PSKPASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * pskhint option description: - */ -/** Descriptive text for the pskhint option */ -#define PSKHINT_DESC (gnutls_serv_opt_strs+2464) -/** Upper-cased name for the pskhint option */ -#define PSKHINT_NAME (gnutls_serv_opt_strs+2489) -/** Name string for the pskhint option */ -#define PSKHINT_name (gnutls_serv_opt_strs+2497) -/** Compiled in flag settings for the pskhint option */ -#define PSKHINT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * ocsp-response option description: - */ -/** Descriptive text for the ocsp-response option */ -#define OCSP_RESPONSE_DESC (gnutls_serv_opt_strs+2505) -/** Upper-cased name for the ocsp-response option */ -#define OCSP_RESPONSE_NAME (gnutls_serv_opt_strs+2541) -/** Name string for the ocsp-response option */ -#define OCSP_RESPONSE_name (gnutls_serv_opt_strs+2555) -/** Compiled in flag settings for the ocsp-response option */ -#define OCSP_RESPONSE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * port option description: - */ -/** Descriptive text for the port option */ -#define PORT_DESC (gnutls_serv_opt_strs+2569) -/** Upper-cased name for the port option */ -#define PORT_NAME (gnutls_serv_opt_strs+2592) -/** Name string for the port option */ -#define PORT_name (gnutls_serv_opt_strs+2597) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * list option description: - */ -/** Descriptive text for the list option */ -#define LIST_DESC (gnutls_serv_opt_strs+2602) -/** Upper-cased name for the list option */ -#define LIST_NAME (gnutls_serv_opt_strs+2653) -/** Name string for the list option */ -#define LIST_name (gnutls_serv_opt_strs+2658) -/** Compiled in flag settings for the list option */ -#define LIST_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_serv_opt_strs+2663) -#define HELP_name (gnutls_serv_opt_strs+2707) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_serv_opt_strs+2712) -#define MORE_HELP_name (gnutls_serv_opt_strs+2757) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (gnutls_serv_opt_strs+2767) -#define VER_name (gnutls_serv_opt_strs+2803) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptDhparams, doOptMtu, - doOptOcsp_Response, doOptPgpcertfile, doOptPgpkeyfile, - doOptPgpkeyring, doOptPskpasswd, doOptSrppasswd, - doOptSrppasswdconf, doOptX509crlfile, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the gnutls-serv Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the gnutls-serv program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_NOTICKET, - /* equiv idx, value */ 1, VALUE_OPT_NOTICKET, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NOTICKET_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --noticket */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_GENERATE, - /* equiv idx, value */ 2, VALUE_OPT_GENERATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_DESC, GENERATE_NAME, GENERATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_QUIET, - /* equiv idx, value */ 3, VALUE_OPT_QUIET, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ QUIET_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --quiet */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_NODB, - /* equiv idx, value */ 4, VALUE_OPT_NODB, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NODB_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --nodb */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NODB_DESC, NODB_NAME, NODB_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_HTTP, - /* equiv idx, value */ 5, VALUE_OPT_HTTP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HTTP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --http */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HTTP_DESC, HTTP_NAME, HTTP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_ECHO, - /* equiv idx, value */ 6, VALUE_OPT_ECHO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ECHO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --echo */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ECHO_DESC, ECHO_NAME, ECHO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_UDP, - /* equiv idx, value */ 7, VALUE_OPT_UDP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ UDP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --udp */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_MTU, - /* equiv idx, value */ 8, VALUE_OPT_MTU, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MTU_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mtu */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptMtu, - /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_SRTP_PROFILES, - /* equiv idx, value */ 9, VALUE_OPT_SRTP_PROFILES, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRTP_PROFILES_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srtp_profiles */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, SRTP_PROFILES_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT, - /* equiv idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DISABLE_CLIENT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --disable-client-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT, - /* equiv idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ REQUIRE_CLIENT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --require-client-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ REQUIRE_CLIENT_CERT_DESC, REQUIRE_CLIENT_CERT_NAME, REQUIRE_CLIENT_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_HEARTBEAT, - /* equiv idx, value */ 12, VALUE_OPT_HEARTBEAT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ HEARTBEAT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --heartbeat */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_X509FMTDER, - /* equiv idx, value */ 13, VALUE_OPT_X509FMTDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509FMTDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509fmtder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_PRIORITY, - /* equiv idx, value */ 14, VALUE_OPT_PRIORITY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRIORITY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --priority */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 15, VALUE_OPT_DHPARAMS, - /* equiv idx, value */ 15, VALUE_OPT_DHPARAMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DHPARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --dhparams */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDhparams, - /* desc, NAME, name */ DHPARAMS_DESC, DHPARAMS_NAME, DHPARAMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_X509CAFILE, - /* equiv idx, value */ 16, VALUE_OPT_X509CAFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CAFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509cafile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_X509CRLFILE, - /* equiv idx, value */ 17, VALUE_OPT_X509CRLFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CRLFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509crlfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptX509crlfile, - /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_PGPKEYFILE, - /* equiv idx, value */ 18, VALUE_OPT_PGPKEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpkeyfile, - /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_PGPKEYRING, - /* equiv idx, value */ 19, VALUE_OPT_PGPKEYRING, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPKEYRING_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpkeyring */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpkeyring, - /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_PGPCERTFILE, - /* equiv idx, value */ 20, VALUE_OPT_PGPCERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpcertfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPgpcertfile, - /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_X509KEYFILE, - /* equiv idx, value */ 21, VALUE_OPT_X509KEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509KEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509keyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 22, VALUE_OPT_X509CERTFILE, - /* equiv idx, value */ 22, VALUE_OPT_X509CERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509CERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509certfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_X509DSAKEYFILE, - /* equiv idx, value */ 23, VALUE_OPT_X509DSAKEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509DSAKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509dsakeyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, X509DSAKEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 24, VALUE_OPT_X509DSACERTFILE, - /* equiv idx, value */ 24, VALUE_OPT_X509DSACERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509DSACERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509dsacertfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, X509DSACERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_X509ECCKEYFILE, - /* equiv idx, value */ 25, VALUE_OPT_X509ECCKEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509ECCKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509ecckeyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, X509ECCKEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 26, VALUE_OPT_X509ECCCERTFILE, - /* equiv idx, value */ 26, VALUE_OPT_X509ECCCERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ X509ECCCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509ecccertfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, X509ECCCERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_PGPSUBKEY, - /* equiv idx, value */ 27, VALUE_OPT_PGPSUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PGPSUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pgpsubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_SRPPASSWD, - /* equiv idx, value */ 28, VALUE_OPT_SRPPASSWD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRPPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srppasswd */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptSrppasswd, - /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 29, VALUE_OPT_SRPPASSWDCONF, - /* equiv idx, value */ 29, VALUE_OPT_SRPPASSWDCONF, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SRPPASSWDCONF_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --srppasswdconf */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptSrppasswdconf, - /* desc, NAME, name */ SRPPASSWDCONF_DESC, SRPPASSWDCONF_NAME, SRPPASSWDCONF_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 30, VALUE_OPT_PSKPASSWD, - /* equiv idx, value */ 30, VALUE_OPT_PSKPASSWD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PSKPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pskpasswd */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptPskpasswd, - /* desc, NAME, name */ PSKPASSWD_DESC, PSKPASSWD_NAME, PSKPASSWD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 31, VALUE_OPT_PSKHINT, - /* equiv idx, value */ 31, VALUE_OPT_PSKHINT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PSKHINT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pskhint */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PSKHINT_DESC, PSKHINT_NAME, PSKHINT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 32, VALUE_OPT_OCSP_RESPONSE, - /* equiv idx, value */ 32, VALUE_OPT_OCSP_RESPONSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OCSP_RESPONSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ocsp-response */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptOcsp_Response, - /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, OCSP_RESPONSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 33, VALUE_OPT_PORT, - /* equiv idx, value */ 33, VALUE_OPT_PORT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --port */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 34, VALUE_OPT_LIST, - /* equiv idx, value */ 34, VALUE_OPT_LIST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of gnutls-serv. */ -#define zPROGNAME (gnutls_serv_opt_strs+2811) -/** Reference to the title line for gnutls-serv usage. */ -#define zUsageTitle (gnutls_serv_opt_strs+2823) -/** There is no gnutls-serv configuration file. */ -#define zRcName NULL -/** There are no directories to search for gnutls-serv config files. */ -#define apzHomeList NULL -/** The gnutls-serv program bug email address. */ -#define zBugsAddr (gnutls_serv_opt_strs+2909) -/** Clarification/explanation of what gnutls-serv does. */ -#define zExplain (gnutls_serv_opt_strs+2928) -/** Extra detail explaining what gnutls-serv does. */ -#define zDetail (gnutls_serv_opt_strs+2930) -/** The full version string for gnutls-serv. */ -#define zFullVersion (gnutls_serv_opt_strs+2988) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define gnutls_serv_full_usage (NULL) -#define gnutls_serv_short_usage (gnutls_serv_opt_strs+3010) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&gnutls_servOptions, GNUTLS_SERV_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the mtu option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0, 17000 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the dhparams option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDhparams(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509crlfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpkeyfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpkeyring option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pgpcertfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the srppasswd option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptSrppasswd(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the srppasswdconf option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptSrppasswdconf(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the pskpasswd option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPskpasswd(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the ocsp-response option. - * If the client requested an OCSP response, return data from this file to the client. - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptOcsp_Response(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with gnutls-serv. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged gnutls-serv - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define gnutls_serv_packager_info NULL -#else -/** Packager information for gnutls-serv. */ -static char const gnutls_serv_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport gnutls_serv bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for gnutls-serv. The one structure that - * binds them all. - */ -tOptions gnutls_servOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 38 /* full option count */, 35 /* user option count */, - gnutls_serv_full_usage, gnutls_serv_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_serv_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * gnutls-serv program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(GNUTLS_SERV_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the gnutls_servOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &gnutls_servOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the gnutls_servOptions structure noted in the comments below. The - literal text is defined in gnutls_serv_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - gnutls_serv_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via gnutls_servOptions.pzCopyright */ - puts(_("gnutls-serv @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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via gnutls_servOptions.pzCopyNotice */ - puts(_("gnutls-serv is free software: you can redistribute it and/or modify it\n\ -under the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("gnutls-serv is distributed in the hope that it will be useful, but WITHOUT\n\ -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n\ -more details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Don't accept session tickets")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Generate Diffie-Hellman and RSA-export parameters")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Suppress some messages")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Do not use a resumption database")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Act as an HTTP server")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Act as an Echo server")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Use DTLS (datagram TLS) over UDP")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Set MTU for datagram TLS")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Offer SRTP profiles")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Do not request a client certificate")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Require a client certificate")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Activate heartbeat support")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Use DER format for certificates to read from")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Priorities string")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("DH params file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("CRL file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PGP Key file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PGP Key ring file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PGP Public Key (certificate) file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("X.509 key file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("X.509 Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Alternative X.509 key file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Alternative X.509 Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Alternative X.509 key file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Alternative X.509 Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PGP subkey to use (hex or auto)")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("SRP password file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("SRP password configuration file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PSK password file to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("PSK identity hint to use")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("The OCSP response to send to client")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("The port to connect to")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Print a list of the supported algorithms and modes")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via gnutls_servOptions.pzUsageTitle */ - puts(_("gnutls-serv - GnuTLS server\n\ -Usage: %s [ - [] | --[{=| }] ]...\n")); - - /* referenced via gnutls_servOptions.pzExplain */ - puts(_("\n")); - - /* referenced via gnutls_servOptions.pzDetail */ - puts(_("Server program that listens to incoming TLS connections.\n")); - - /* referenced via gnutls_servOptions.pzFullVersion */ - puts(_("gnutls-serv @VERSION@")); - - /* referenced via gnutls_servOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via gnutls_servOptions.pzShortUsage */ - puts(_("Usage: gnutls-serv [options]\n\ -gnutls-serv --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* serv-args.c ends here */ diff --git a/src/serv-args.h b/src/serv-args.h deleted file mode 100644 index 62fb9de8c8..0000000000 --- a/src/serv-args.h +++ /dev/null @@ -1,282 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (serv-args.h) - * - * It has been AutoGen-ed May 5, 2013 at 12:48:27 PM by AutoGen 5.17.3 - * From the definitions serv-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the gnutls-serv author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The gnutls-serv program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * gnutls-serv is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gnutls-serv is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the gnutls-serv program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_SERV_ARGS_H_GUARD -#define AUTOOPTS_SERV_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for gnutls-serv - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_NOTICKET = 1, - INDEX_OPT_GENERATE = 2, - INDEX_OPT_QUIET = 3, - INDEX_OPT_NODB = 4, - INDEX_OPT_HTTP = 5, - INDEX_OPT_ECHO = 6, - INDEX_OPT_UDP = 7, - INDEX_OPT_MTU = 8, - INDEX_OPT_SRTP_PROFILES = 9, - INDEX_OPT_DISABLE_CLIENT_CERT = 10, - INDEX_OPT_REQUIRE_CLIENT_CERT = 11, - INDEX_OPT_HEARTBEAT = 12, - INDEX_OPT_X509FMTDER = 13, - INDEX_OPT_PRIORITY = 14, - INDEX_OPT_DHPARAMS = 15, - INDEX_OPT_X509CAFILE = 16, - INDEX_OPT_X509CRLFILE = 17, - INDEX_OPT_PGPKEYFILE = 18, - INDEX_OPT_PGPKEYRING = 19, - INDEX_OPT_PGPCERTFILE = 20, - INDEX_OPT_X509KEYFILE = 21, - INDEX_OPT_X509CERTFILE = 22, - INDEX_OPT_X509DSAKEYFILE = 23, - INDEX_OPT_X509DSACERTFILE = 24, - INDEX_OPT_X509ECCKEYFILE = 25, - INDEX_OPT_X509ECCCERTFILE = 26, - INDEX_OPT_PGPSUBKEY = 27, - INDEX_OPT_SRPPASSWD = 28, - INDEX_OPT_SRPPASSWDCONF = 29, - INDEX_OPT_PSKPASSWD = 30, - INDEX_OPT_PSKHINT = 31, - INDEX_OPT_OCSP_RESPONSE = 32, - INDEX_OPT_PORT = 33, - INDEX_OPT_LIST = 34, - INDEX_OPT_VERSION = 35, - INDEX_OPT_HELP = 36, - INDEX_OPT_MORE_HELP = 37 -} teOptIndex; -/** count of all options for gnutls-serv */ -#define OPTION_CT 38 -/** gnutls-serv version */ -#define GNUTLS_SERV_VERSION "@VERSION@" -/** Full gnutls-serv version text */ -#define GNUTLS_SERV_FULL_VERSION "gnutls-serv @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (gnutls_servOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of gnutls-serv exit codes - */ -typedef enum { - GNUTLS_SERV_EXIT_SUCCESS = 0, - GNUTLS_SERV_EXIT_FAILURE = 1, - GNUTLS_SERV_EXIT_USAGE_ERROR = 64, - GNUTLS_SERV_EXIT_LIBOPTS_FAILURE = 70 -} gnutls_serv_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_NOTICKET 1 -#define VALUE_OPT_GENERATE 'g' -#define VALUE_OPT_QUIET 'q' -#define VALUE_OPT_NODB 4 -#define VALUE_OPT_HTTP 5 -#define VALUE_OPT_ECHO 6 -#define VALUE_OPT_UDP 'u' -#define VALUE_OPT_MTU 8 - -#define OPT_VALUE_MTU (DESC(MTU).optArg.argInt) -#define VALUE_OPT_SRTP_PROFILES 9 -#define VALUE_OPT_DISABLE_CLIENT_CERT 'a' -#define VALUE_OPT_REQUIRE_CLIENT_CERT 'r' -#define VALUE_OPT_HEARTBEAT 'b' -#define VALUE_OPT_X509FMTDER 13 -#define VALUE_OPT_PRIORITY 14 -#define VALUE_OPT_DHPARAMS 15 -#define VALUE_OPT_X509CAFILE 16 -#define VALUE_OPT_X509CRLFILE 17 -#define VALUE_OPT_PGPKEYFILE 18 -#define VALUE_OPT_PGPKEYRING 19 -#define VALUE_OPT_PGPCERTFILE 20 -#define VALUE_OPT_X509KEYFILE 21 -#define VALUE_OPT_X509CERTFILE 22 -#define VALUE_OPT_X509DSAKEYFILE 23 -#define VALUE_OPT_X509DSACERTFILE 24 -#define VALUE_OPT_X509ECCKEYFILE 25 -#define VALUE_OPT_X509ECCCERTFILE 26 -#define VALUE_OPT_PGPSUBKEY 27 -#define VALUE_OPT_SRPPASSWD 28 -#define VALUE_OPT_SRPPASSWDCONF 29 -#define VALUE_OPT_PSKPASSWD 30 -#define VALUE_OPT_PSKHINT 31 -#define VALUE_OPT_OCSP_RESPONSE 32 -#define VALUE_OPT_PORT 'p' - -#define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) -#define VALUE_OPT_LIST 'l' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(gnutls_servOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(gnutls_servOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - gnutls_servOptions.curOptIdx = (n); \ - gnutls_servOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*gnutls_servOptions.pUsageProc)(&gnutls_servOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the gnutls-serv option descriptor. - */ -extern tOptions gnutls_servOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(gnutls_servOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(gnutls_servOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(gnutls_servOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(gnutls_servOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_SERV_ARGS_H_GUARD */ -/* serv-args.h ends here */ diff --git a/src/srptool-args.c b/src/srptool-args.c deleted file mode 100644 index 7b3454787b..0000000000 --- a/src/srptool-args.c +++ /dev/null @@ -1,654 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (srptool-args.c) - * - * It has been AutoGen-ed October 4, 2013 at 07:15:59 PM by AutoGen 5.17 - * From the definitions srptool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the srptool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The srptool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * srptool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * srptool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "srptool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; - -/* TRANSLATORS: choose the translation for option names wisely because you - cannot ever change your mind. */ -#define zCopyright (srptool_opt_strs+0) -#define zLicenseDescrip (srptool_opt_strs+278) - - -#ifndef NULL -# define NULL 0 -#endif - -/* - * srptool option static const strings - */ -static char const srptool_opt_strs[2049] = -/* 0 */ "srptool @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" - "redistribution under the terms of the\n" - "GNU General Public License, version 3 or later\n" - " \n\0" -/* 278 */ "srptool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "srptool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 881 */ "Enable debugging.\0" -/* 899 */ "DEBUG\0" -/* 905 */ "debug\0" -/* 911 */ "specify the index of the group parameters in tpasswd.conf to use.\0" -/* 977 */ "INDEX\0" -/* 983 */ "index\0" -/* 989 */ "specify a username\0" -/* 1008 */ "USERNAME\0" -/* 1017 */ "username\0" -/* 1026 */ "specify a password file.\0" -/* 1051 */ "PASSWD\0" -/* 1058 */ "passwd\0" -/* 1065 */ "specify salt size.\0" -/* 1084 */ "SALT\0" -/* 1089 */ "salt\0" -/* 1094 */ "just verify the password.\0" -/* 1120 */ "VERIFY\0" -/* 1127 */ "verify\0" -/* 1134 */ "specify a password conf file.\0" -/* 1164 */ "PASSWD_CONF\0" -/* 1176 */ "passwd-conf\0" -/* 1188 */ "Generate a password configuration file.\0" -/* 1228 */ "CREATE_CONF\0" -/* 1240 */ "create-conf\0" -/* 1252 */ "Display extended usage information and exit\0" -/* 1296 */ "help\0" -/* 1301 */ "Extended usage information passed thru pager\0" -/* 1346 */ "more-help\0" -/* 1356 */ "Output version information and exit\0" -/* 1392 */ "version\0" -/* 1400 */ "SRPTOOL\0" -/* 1408 */ "srptool - GnuTLS SRP tool - Ver. @VERSION@\n" - "USAGE: %s [ - [] | --[{=| }] ]...\n\0" -/* 1509 */ "bug-gnutls@gnu.org\0" -/* 1528 */ "\n\n\0" -/* 1531 */ "\n" - "Simple program that emulates the programs in the Stanford SRP (Secure\n" - "Remote Password) libraries using GnuTLS. It is intended for use in places\n" - "where you don't expect SRP authentication to be the used for system users.\n\n" - "In brief, to use SRP you need to create two files. These are the password\n" - "file that holds the users and the verifiers associated with them and the\n" - "configuration file to hold the group parameters (called tpasswd.conf).\n\0" -/* 1973 */ "srptool @VERSION@\0" -/* 1991 */ "srptool [options]\n" - "srptool --help for usage instructions.\n"; - -/* - * debug option description: - */ -#define DEBUG_DESC (srptool_opt_strs+881) -#define DEBUG_NAME (srptool_opt_strs+899) -#define DEBUG_name (srptool_opt_strs+905) -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * index option description: - */ -#define INDEX_DESC (srptool_opt_strs+911) -#define INDEX_NAME (srptool_opt_strs+977) -#define INDEX_name (srptool_opt_strs+983) -#define INDEX_DFT_ARG ((char const*)1) -#define INDEX_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * username option description: - */ -#define USERNAME_DESC (srptool_opt_strs+989) -#define USERNAME_NAME (srptool_opt_strs+1008) -#define USERNAME_name (srptool_opt_strs+1017) -#define USERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * passwd option description: - */ -#define PASSWD_DESC (srptool_opt_strs+1026) -#define PASSWD_NAME (srptool_opt_strs+1051) -#define PASSWD_name (srptool_opt_strs+1058) -#define PASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * salt option description: - */ -#define SALT_DESC (srptool_opt_strs+1065) -#define SALT_NAME (srptool_opt_strs+1084) -#define SALT_name (srptool_opt_strs+1089) -#define SALT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/* - * verify option description: - */ -#define VERIFY_DESC (srptool_opt_strs+1094) -#define VERIFY_NAME (srptool_opt_strs+1120) -#define VERIFY_name (srptool_opt_strs+1127) -#define VERIFY_FLAGS (OPTST_DISABLED) - -/* - * passwd-conf option description: - */ -#define PASSWD_CONF_DESC (srptool_opt_strs+1134) -#define PASSWD_CONF_NAME (srptool_opt_strs+1164) -#define PASSWD_CONF_name (srptool_opt_strs+1176) -#define PASSWD_CONF_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * create-conf option description: - */ -#define CREATE_CONF_DESC (srptool_opt_strs+1188) -#define CREATE_CONF_NAME (srptool_opt_strs+1228) -#define CREATE_CONF_name (srptool_opt_strs+1240) -#define CREATE_CONF_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (srptool_opt_strs+1252) -#define HELP_name (srptool_opt_strs+1296) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (srptool_opt_strs+1301) -#define MORE_HELP_name (srptool_opt_strs+1346) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (srptool_opt_strs+1356) -#define VER_name (srptool_opt_strs+1392) -/* - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the srptool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the srptool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_INDEX, - /* equiv idx, value */ 1, VALUE_OPT_INDEX, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDEX_FLAGS, 0, - /* last opt argumnt */ { INDEX_DFT_ARG }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ INDEX_DESC, INDEX_NAME, INDEX_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_USERNAME, - /* equiv idx, value */ 2, VALUE_OPT_USERNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ USERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --username */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ USERNAME_DESC, USERNAME_NAME, USERNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_PASSWD, - /* equiv idx, value */ 3, VALUE_OPT_PASSWD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --passwd */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PASSWD_DESC, PASSWD_NAME, PASSWD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_SALT, - /* equiv idx, value */ 4, VALUE_OPT_SALT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SALT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --salt */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ SALT_DESC, SALT_NAME, SALT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_VERIFY, - /* equiv idx, value */ 5, VALUE_OPT_VERIFY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_PASSWD_CONF, - /* equiv idx, value */ 6, VALUE_OPT_PASSWD_CONF, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PASSWD_CONF_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --passwd-conf */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PASSWD_CONF_DESC, PASSWD_CONF_NAME, PASSWD_CONF_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_CREATE_CONF, - /* equiv idx, value */ 7, VALUE_OPT_CREATE_CONF, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CREATE_CONF_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --create-conf */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CREATE_CONF_DESC, CREATE_CONF_NAME, CREATE_CONF_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the srptool Option Environment - */ -#define zPROGNAME (srptool_opt_strs+1400) -#define zUsageTitle (srptool_opt_strs+1408) -#define zRcName NULL -#define apzHomeList NULL -#define zBugsAddr (srptool_opt_strs+1509) -#define zExplain (srptool_opt_strs+1528) -#define zDetail (srptool_opt_strs+1531) -#define zFullVersion (srptool_opt_strs+1973) -/* extracted from optcode.tlib near line 353 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - - -#define srptool_full_usage (NULL) - -#define srptool_short_usage (srptool_opt_strs+1991) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param pOptions the AutoOpts option description structure - * @param pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&srptoolOptions, SRPTOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * - * @param pOptions the srptool options data structure - * @param pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} -/* extracted from optmain.tlib near line 1188 */ - -/** - * The directory containing the data associated with srptool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged srptool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define srptool_packager_info NULL -#else -static char const srptool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport srptool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for srptool. The one structure that - * binds them all. - */ -tOptions srptoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 11 /* full option count */, 8 /* user option count */, - srptool_full_usage, srptool_short_usage, - NULL, NULL, - PKGDATADIR, srptool_packager_info -}; - -#if ENABLE_NLS -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(SRPTOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the srptoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &srptoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - tOptDesc * od = opts->pOptDesc; - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - coerce_it((void*)&(opts->pzPackager)); - coerce_it((void*)&(opts->pzShortUsage)); - - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - - if ((opts->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc * od = opts->pOptDesc; - int ix; - - for (ix = opts->optCt; ix > 0; ix--, od++) { - coerce_it((void*)&(od->pz_Name)); - coerce_it((void*)&(od->pz_DisableName)); - coerce_it((void*)&(od->pz_DisablePfx)); - } - srptoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; - } -} - -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -/* srptool-args.c ends here */ diff --git a/src/srptool-args.h b/src/srptool-args.h deleted file mode 100644 index 96c844cf87..0000000000 --- a/src/srptool-args.h +++ /dev/null @@ -1,208 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (srptool-args.h) - * - * It has been AutoGen-ed October 4, 2013 at 07:15:59 PM by AutoGen 5.17 - * From the definitions srptool-args.def - * and the template file options - * - * Generated from AutoOpts 37:0:12 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the srptool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The srptool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the - * GNU General Public License, version 3 or later - * - * - * srptool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * srptool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/* - * This file contains the programmatic interface to the Automated - * Options generated for the srptool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_SRPTOOL_ARGS_H_GUARD -#define AUTOOPTS_SRPTOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/* - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 151552 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/* - * Enumeration of each option: - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_INDEX = 1, - INDEX_OPT_USERNAME = 2, - INDEX_OPT_PASSWD = 3, - INDEX_OPT_SALT = 4, - INDEX_OPT_VERIFY = 5, - INDEX_OPT_PASSWD_CONF = 6, - INDEX_OPT_CREATE_CONF = 7, - INDEX_OPT_VERSION = 8, - INDEX_OPT_HELP = 9, - INDEX_OPT_MORE_HELP = 10 -} teOptIndex; - -#define OPTION_CT 11 -#define SRPTOOL_VERSION "@VERSION@" -#define SRPTOOL_FULL_VERSION "srptool @VERSION@" - -/* - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (srptoolOptions.pOptDesc[INDEX_OPT_## n]) -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -#define OPT_ARG(n) (DESC(n).optArg.argString) -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -#define COUNT_OPT(n) (DESC(n).optOccCt) -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * - * - * Enumeration of srptool exit codes - */ -typedef enum { - SRPTOOL_EXIT_SUCCESS = 0, - SRPTOOL_EXIT_FAILURE = 1, - SRPTOOL_EXIT_USAGE_ERROR = 64, - SRPTOOL_EXIT_LIBOPTS_FAILURE = 70 -} srptool_exit_code_t; -/* * * * * * - * - * Interface defines for specific options. - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_INDEX 'i' - -#define OPT_VALUE_INDEX (DESC(INDEX).optArg.argInt) -#define VALUE_OPT_USERNAME 'u' -#define VALUE_OPT_PASSWD 'p' -#define VALUE_OPT_SALT 's' - -#define OPT_VALUE_SALT (DESC(SALT).optArg.argInt) -#define VALUE_OPT_VERIFY 5 -#define VALUE_OPT_PASSWD_CONF 'v' -#define VALUE_OPT_CREATE_CONF 7 -#define VALUE_OPT_HELP 'h' -#define VALUE_OPT_MORE_HELP '!' -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(srptoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(srptoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - srptoolOptions.curOptIdx = (n); \ - srptoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*srptoolOptions.pUsageProc)(&srptoolOptions, c) -/* extracted from opthead.tlib near line 497 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the srptool option descriptor. - */ -extern tOptions srptoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(srptoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(srptoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(srptoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(srptoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_SRPTOOL_ARGS_H_GUARD */ -/* srptool-args.h ends here */ diff --git a/src/tpmtool-args.c b/src/tpmtool-args.c deleted file mode 100644 index 14246105b8..0000000000 --- a/src/tpmtool-args.c +++ /dev/null @@ -1,1358 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (tpmtool-args.c) - * - * It has been AutoGen-ed June 10, 2013 at 07:23:01 PM by AutoGen 5.17.3 - * From the definitions tpmtool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This source file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the tpmtool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The tpmtool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * tpmtool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * tpmtool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "tpmtool-args.h" -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (tpmtool_opt_strs+0) -#define zLicenseDescrip (tpmtool_opt_strs+274) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for tpmtool options - */ -static char const tpmtool_opt_strs[2103] = -/* 0 */ "tpmtool @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" - "redistribution under the terms of the GNU General Public License,\n" - "version 3 or later \n\0" -/* 274 */ "tpmtool is free software: you can redistribute it and/or modify it under\n" - "the terms of the GNU General Public License as published by the Free\n" - "Software Foundation, either version 3 of the License, or (at your option)\n" - "any later version.\n\n" - "tpmtool is distributed in the hope that it will be useful, but WITHOUT ANY\n" - "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n" - "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n" - "details.\n\n" - "You should have received a copy of the GNU General Public License along\n" - "with this program. If not, see .\n\0" -/* 877 */ "Enable debugging.\0" -/* 895 */ "DEBUG\0" -/* 901 */ "debug\0" -/* 907 */ "Input file\0" -/* 918 */ "INFILE\0" -/* 925 */ "infile\0" -/* 932 */ "Output file\0" -/* 944 */ "OUTFILE\0" -/* 952 */ "outfile\0" -/* 960 */ "Generate an RSA private-public key pair\0" -/* 1000 */ "GENERATE_RSA\0" -/* 1013 */ "generate-rsa\0" -/* 1026 */ "Any generated key will be registered in the TPM\0" -/* 1074 */ "REGISTER\0" -/* 1083 */ "register\0" -/* 1092 */ "Any generated key will be a signing key\0" -/* 1132 */ "SIGNING\0" -/* 1140 */ "signing\0" -/* 1148 */ "Any generated key will be a legacy key\0" -/* 1187 */ "LEGACY\0" -/* 1194 */ "legacy\0" -/* 1201 */ "Any registered key will be a user key\0" -/* 1239 */ "USER\0" -/* 1244 */ "user\0" -/* 1249 */ "Any registred key will be a system key\0" -/* 1288 */ "SYSTEM\0" -/* 1295 */ "system\0" -/* 1302 */ "Prints the public key of the provided key\0" -/* 1344 */ "PUBKEY\0" -/* 1351 */ "pubkey\0" -/* 1358 */ "Lists all stored keys in the TPM\0" -/* 1391 */ "LIST\0" -/* 1396 */ "list\0" -/* 1401 */ "Delete the key identified by the given URL (UUID).\0" -/* 1452 */ "DELETE\0" -/* 1459 */ "delete\0" -/* 1466 */ "Specify the security level [low, legacy, normal, high, ultra].\0" -/* 1529 */ "SEC_PARAM\0" -/* 1539 */ "sec-param\0" -/* 1549 */ "Specify the number of bits for key generate\0" -/* 1593 */ "BITS\0" -/* 1598 */ "bits\0" -/* 1603 */ "Use the DER format for keys.\0" -/* 1632 */ "INDER\0" -/* 1638 */ "no-inder\0" -/* 1647 */ "no\0" -/* 1650 */ "Use DER format for output keys\0" -/* 1681 */ "OUTDER\0" -/* 1688 */ "no-outder\0" -/* 1698 */ "display extended usage information and exit\0" -/* 1742 */ "help\0" -/* 1747 */ "extended usage information passed thru pager\0" -/* 1792 */ "more-help\0" -/* 1802 */ "output version information and exit\0" -/* 1838 */ "version\0" -/* 1846 */ "TPMTOOL\0" -/* 1854 */ "tpmtool - GnuTLS TPM tool\n" - "Usage: %s [ - [] | --[{=| }] ]...\n\0" -/* 1938 */ "bug-gnutls@gnu.org\0" -/* 1957 */ "\n\0" -/* 1959 */ "Program that allows handling cryptographic data from the TPM chip.\n\0" -/* 2027 */ "tpmtool @VERSION@\0" -/* 2045 */ "tpmtool [options]\n" - "tpmtool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (tpmtool_opt_strs+877) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (tpmtool_opt_strs+895) -/** Name string for the debug option */ -#define DEBUG_name (tpmtool_opt_strs+901) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * infile option description: - */ -/** Descriptive text for the infile option */ -#define INFILE_DESC (tpmtool_opt_strs+907) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (tpmtool_opt_strs+918) -/** Name string for the infile option */ -#define INFILE_name (tpmtool_opt_strs+925) -/** Compiled in flag settings for the infile option */ -#define INFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * outfile option description: - */ -/** Descriptive text for the outfile option */ -#define OUTFILE_DESC (tpmtool_opt_strs+932) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (tpmtool_opt_strs+944) -/** Name string for the outfile option */ -#define OUTFILE_name (tpmtool_opt_strs+952) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * generate-rsa option description: - */ -/** Descriptive text for the generate-rsa option */ -#define GENERATE_RSA_DESC (tpmtool_opt_strs+960) -/** Upper-cased name for the generate-rsa option */ -#define GENERATE_RSA_NAME (tpmtool_opt_strs+1000) -/** Name string for the generate-rsa option */ -#define GENERATE_RSA_name (tpmtool_opt_strs+1013) -/** Compiled in flag settings for the generate-rsa option */ -#define GENERATE_RSA_FLAGS (OPTST_DISABLED) - -/** - * register option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the register option */ -#define REGISTER_DESC (tpmtool_opt_strs+1026) -/** Upper-cased name for the register option */ -#define REGISTER_NAME (tpmtool_opt_strs+1074) -/** Name string for the register option */ -#define REGISTER_name (tpmtool_opt_strs+1083) -/** Other options that are required by the register option */ -static int const aRegisterMustList[] = { - INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT }; -/** Compiled in flag settings for the register option */ -#define REGISTER_FLAGS (OPTST_DISABLED) - -/** - * signing option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the signing option */ -#define SIGNING_DESC (tpmtool_opt_strs+1092) -/** Upper-cased name for the signing option */ -#define SIGNING_NAME (tpmtool_opt_strs+1132) -/** Name string for the signing option */ -#define SIGNING_name (tpmtool_opt_strs+1140) -/** Other options that are required by the signing option */ -static int const aSigningMustList[] = { - INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT }; -/** Other options that appear in conjunction with the signing option */ -static int const aSigningCantList[] = { - INDEX_OPT_LEGACY, NO_EQUIVALENT }; -/** Compiled in flag settings for the signing option */ -#define SIGNING_FLAGS (OPTST_DISABLED) - -/** - * legacy option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the legacy option */ -#define LEGACY_DESC (tpmtool_opt_strs+1148) -/** Upper-cased name for the legacy option */ -#define LEGACY_NAME (tpmtool_opt_strs+1187) -/** Name string for the legacy option */ -#define LEGACY_name (tpmtool_opt_strs+1194) -/** Other options that are required by the legacy option */ -static int const aLegacyMustList[] = { - INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT }; -/** Other options that appear in conjunction with the legacy option */ -static int const aLegacyCantList[] = { - INDEX_OPT_SIGNING, NO_EQUIVALENT }; -/** Compiled in flag settings for the legacy option */ -#define LEGACY_FLAGS (OPTST_DISABLED) - -/** - * user option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the user option */ -#define USER_DESC (tpmtool_opt_strs+1201) -/** Upper-cased name for the user option */ -#define USER_NAME (tpmtool_opt_strs+1239) -/** Name string for the user option */ -#define USER_name (tpmtool_opt_strs+1244) -/** Other options that are required by the user option */ -static int const aUserMustList[] = { - INDEX_OPT_REGISTER, NO_EQUIVALENT }; -/** Other options that appear in conjunction with the user option */ -static int const aUserCantList[] = { - INDEX_OPT_SYSTEM, NO_EQUIVALENT }; -/** Compiled in flag settings for the user option */ -#define USER_FLAGS (OPTST_DISABLED) - -/** - * system option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the system option */ -#define SYSTEM_DESC (tpmtool_opt_strs+1249) -/** Upper-cased name for the system option */ -#define SYSTEM_NAME (tpmtool_opt_strs+1288) -/** Name string for the system option */ -#define SYSTEM_name (tpmtool_opt_strs+1295) -/** Other options that are required by the system option */ -static int const aSystemMustList[] = { - INDEX_OPT_REGISTER, NO_EQUIVALENT }; -/** Other options that appear in conjunction with the system option */ -static int const aSystemCantList[] = { - INDEX_OPT_USER, NO_EQUIVALENT }; -/** Compiled in flag settings for the system option */ -#define SYSTEM_FLAGS (OPTST_DISABLED) - -/** - * pubkey option description: - */ -/** Descriptive text for the pubkey option */ -#define PUBKEY_DESC (tpmtool_opt_strs+1302) -/** Upper-cased name for the pubkey option */ -#define PUBKEY_NAME (tpmtool_opt_strs+1344) -/** Name string for the pubkey option */ -#define PUBKEY_name (tpmtool_opt_strs+1351) -/** Compiled in flag settings for the pubkey option */ -#define PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * list option description: - */ -/** Descriptive text for the list option */ -#define LIST_DESC (tpmtool_opt_strs+1358) -/** Upper-cased name for the list option */ -#define LIST_NAME (tpmtool_opt_strs+1391) -/** Name string for the list option */ -#define LIST_name (tpmtool_opt_strs+1396) -/** Compiled in flag settings for the list option */ -#define LIST_FLAGS (OPTST_DISABLED) - -/** - * delete option description: - */ -/** Descriptive text for the delete option */ -#define DELETE_DESC (tpmtool_opt_strs+1401) -/** Upper-cased name for the delete option */ -#define DELETE_NAME (tpmtool_opt_strs+1452) -/** Name string for the delete option */ -#define DELETE_name (tpmtool_opt_strs+1459) -/** Compiled in flag settings for the delete option */ -#define DELETE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * sec-param option description: - */ -/** Descriptive text for the sec-param option */ -#define SEC_PARAM_DESC (tpmtool_opt_strs+1466) -/** Upper-cased name for the sec-param option */ -#define SEC_PARAM_NAME (tpmtool_opt_strs+1529) -/** Name string for the sec-param option */ -#define SEC_PARAM_name (tpmtool_opt_strs+1539) -/** Compiled in flag settings for the sec-param option */ -#define SEC_PARAM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * bits option description: - */ -/** Descriptive text for the bits option */ -#define BITS_DESC (tpmtool_opt_strs+1549) -/** Upper-cased name for the bits option */ -#define BITS_NAME (tpmtool_opt_strs+1593) -/** Name string for the bits option */ -#define BITS_name (tpmtool_opt_strs+1598) -/** Compiled in flag settings for the bits option */ -#define BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (tpmtool_opt_strs+1603) -/** Upper-cased name for the inder option */ -#define INDER_NAME (tpmtool_opt_strs+1632) -/** disablement name for the inder option */ -#define NOT_INDER_name (tpmtool_opt_strs+1638) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (tpmtool_opt_strs+1647) -/** Name string for the inder option */ -#define INDER_name (NOT_INDER_name + 3) -/** Compiled in flag settings for the inder option */ -#define INDER_FLAGS (OPTST_DISABLED) - -/** - * outder option description: - */ -/** Descriptive text for the outder option */ -#define OUTDER_DESC (tpmtool_opt_strs+1650) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (tpmtool_opt_strs+1681) -/** disablement name for the outder option */ -#define NOT_OUTDER_name (tpmtool_opt_strs+1688) -/** disablement prefix for the outder option */ -#define NOT_OUTDER_PFX (tpmtool_opt_strs+1647) -/** Name string for the outder option */ -#define OUTDER_name (NOT_OUTDER_name + 3) -/** Compiled in flag settings for the outder option */ -#define OUTDER_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (tpmtool_opt_strs+1698) -#define HELP_name (tpmtool_opt_strs+1742) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (tpmtool_opt_strs+1747) -#define MORE_HELP_name (tpmtool_opt_strs+1792) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC NULL -#define MORE_HELP_name NULL -#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#endif -#ifdef NO_OPTIONAL_OPT_ARGS -# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) -#endif -#define VER_DESC (tpmtool_opt_strs+1802) -#define VER_name (tpmtool_opt_strs+1838) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptInfile, doUsageOpt; -#define VER_PROC optionPrintVersion - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Define the tpmtool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the tpmtool program responds to. - */ -static tOptDesc optDesc[OPTION_CT] = { - { /* entry idx, value */ 0, VALUE_OPT_DEBUG, - /* equiv idx, value */ 0, VALUE_OPT_DEBUG, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --debug */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDebug, - /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_INFILE, - /* equiv idx, value */ 1, VALUE_OPT_INFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --infile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptInfile, - /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 2, VALUE_OPT_OUTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_GENERATE_RSA, - /* equiv idx, value */ 3, VALUE_OPT_GENERATE_RSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ GENERATE_RSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --generate-rsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ GENERATE_RSA_DESC, GENERATE_RSA_NAME, GENERATE_RSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_REGISTER, - /* equiv idx, value */ 4, VALUE_OPT_REGISTER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ REGISTER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --register */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aRegisterMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ REGISTER_DESC, REGISTER_NAME, REGISTER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_SIGNING, - /* equiv idx, value */ 5, VALUE_OPT_SIGNING, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SIGNING_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --signing */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aSigningMustList, aSigningCantList, - /* option proc */ NULL, - /* desc, NAME, name */ SIGNING_DESC, SIGNING_NAME, SIGNING_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_LEGACY, - /* equiv idx, value */ 6, VALUE_OPT_LEGACY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LEGACY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --legacy */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aLegacyMustList, aLegacyCantList, - /* option proc */ NULL, - /* desc, NAME, name */ LEGACY_DESC, LEGACY_NAME, LEGACY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_USER, - /* equiv idx, value */ 7, VALUE_OPT_USER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ USER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --user */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aUserMustList, aUserCantList, - /* option proc */ NULL, - /* desc, NAME, name */ USER_DESC, USER_NAME, USER_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_SYSTEM, - /* equiv idx, value */ 8, VALUE_OPT_SYSTEM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SYSTEM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --system */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ aSystemMustList, aSystemCantList, - /* option proc */ NULL, - /* desc, NAME, name */ SYSTEM_DESC, SYSTEM_NAME, SYSTEM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 9, VALUE_OPT_PUBKEY, - /* equiv idx, value */ 9, VALUE_OPT_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PUBKEY_DESC, PUBKEY_NAME, PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_LIST, - /* equiv idx, value */ 10, VALUE_OPT_LIST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_DELETE, - /* equiv idx, value */ 11, VALUE_OPT_DELETE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DELETE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --delete */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ DELETE_DESC, DELETE_NAME, DELETE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 12, VALUE_OPT_SEC_PARAM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SEC_PARAM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sec-param */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_BITS, - /* equiv idx, value */ 13, VALUE_OPT_BITS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BITS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --bits */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 14, VALUE_OPT_INDER, - /* equiv idx, value */ 14, VALUE_OPT_INDER, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --inder */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name, - /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX }, - - { /* entry idx, value */ 15, VALUE_OPT_OUTDER, - /* equiv idx, value */ 15, 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 */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VER_FLAGS, AOUSE_VERSION, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ VER_PROC, - /* desc, NAME, name */ VER_DESC, NULL, VER_name, - /* disablement strs */ NULL, NULL }, - - - - { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doUsageOpt, - /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, - /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPagedUsage, - /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, - /* disablement strs */ NULL, NULL } -}; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** Reference to the upper cased version of tpmtool. */ -#define zPROGNAME (tpmtool_opt_strs+1846) -/** Reference to the title line for tpmtool usage. */ -#define zUsageTitle (tpmtool_opt_strs+1854) -/** There is no tpmtool configuration file. */ -#define zRcName NULL -/** There are no directories to search for tpmtool config files. */ -#define apzHomeList NULL -/** The tpmtool program bug email address. */ -#define zBugsAddr (tpmtool_opt_strs+1938) -/** Clarification/explanation of what tpmtool does. */ -#define zExplain (tpmtool_opt_strs+1957) -/** Extra detail explaining what tpmtool does. */ -#define zDetail (tpmtool_opt_strs+1959) -/** The full version string for tpmtool. */ -#define zFullVersion (tpmtool_opt_strs+2027) -/* extracted from optcode.tlib near line 371 */ - -#if defined(ENABLE_NLS) -# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT - static tOptionXlateProc translate_option_strings; -#else -# define OPTPROC_BASE OPTPROC_NONE -# define translate_option_strings NULL -#endif /* ENABLE_NLS */ - -#define tpmtool_full_usage (NULL) -#define tpmtool_short_usage (tpmtool_opt_strs+2045) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] pOptions the AutoOpts option description structure - * @param[in] pOptDesc the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) -{ - optionUsage(&tpmtoolOptions, TPMTOOL_EXIT_SUCCESS); - /* NOTREACHED */ - (void)pOptDesc; - (void)pOptions; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the tpmtool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static struct {long rmin, rmax;} const rng[1] = { - { 0 , 9999 } }; - int ix; - - if (pOptions <= OPTPROC_EMIT_LIMIT) - goto emit_ranges; - optionNumericVal(pOptions, pOptDesc); - - for (ix = 0; ix < 1; ix++) { - if (pOptDesc->optArg.argInt < rng[ix].rmin) - continue; /* ranges need not be ordered. */ - if (pOptDesc->optArg.argInt == rng[ix].rmin) - return; - if (rng[ix].rmax == LONG_MIN) - continue; - if (pOptDesc->optArg.argInt <= rng[ix].rmax) - return; - } - - option_usage_fp = stderr; - - emit_ranges: - optionShowRange(pOptions, pOptDesc, (void *)rng, 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param[in] pOptions the tpmtool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; - static tuFileMode mode; -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - mode.file_flags = O_CLOEXEC; - - /* - * This function handles special invalid values for "pOptions" - */ - optionFileCheck(pOptions, pOptDesc, type, mode); -} -/* extracted from optmain.tlib near line 1254 */ - -/** - * The directory containing the data associated with tpmtool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged tpmtool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define tpmtool_packager_info NULL -#else -/** Packager information for tpmtool. */ -static char const tpmtool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport tpmtool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for tpmtool. The one structure that - * binds them all. - */ -tOptions tpmtoolOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_NO_ARGS - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 19 /* full option count */, 16 /* user option count */, - tpmtool_full_usage, tpmtool_short_usage, - NULL, NULL, - PKGDATADIR, tpmtool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * tpmtool program. These translations happen upon entry - * to optionProcess(). - */ -#include -#include -#include -#include -#ifdef HAVE_DCGETTEXT -# include -#endif -#include - -static char * AO_gettext(char const * pz); -static void coerce_it(void ** s); - -/** - * AutoGen specific wrapper function for gettext. It relies on the macro _() - * to convert from English to the target language, then strdup-duplicates the - * result string. It tries the "libopts" domain first, then whatever has been - * set via the \a textdomain(3) call. - * - * @param[in] pz the input text used as a lookup key. - * @returns the translated text (if there is one), - * or the original text (if not). - */ -static char * -AO_gettext(char const * pz) -{ - char * res; - if (pz == NULL) - return NULL; -#ifdef HAVE_DCGETTEXT - /* - * While processing the option_xlateable_txt data, try to use the - * "libopts" domain. Once we switch to the option descriptor data, - * do *not* use that domain. - */ - if (option_xlateable_txt.field_ct != 0) { - res = dgettext("libopts", pz); - if (res == pz) - res = (char *)(void *)_(pz); - } else - res = (char *)(void *)_(pz); -#else - res = (char *)(void *)_(pz); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(TPMTOOL_EXIT_FAILURE); - } - return res; -} - -/** - * All the pointers we use are marked "* const", but they are stored in - * writable memory. Coerce the mutability and set the pointer. - */ -static void coerce_it(void ** s) { *s = AO_gettext(*s); -} - -/** - * Translate all the translatable strings in the tpmtoolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &tpmtoolOptions; - - /* - * Guard against re-translation. It won't work. The strings will have - * been changed by the first pass through this code. One shot only. - */ - if (option_xlateable_txt.field_ct != 0) { - /* - * Do the translations. The first pointer follows the field count - * field. The field count field is the size of a pointer. - */ - char ** ppz = (char**)(void*)&(option_xlateable_txt); - int ix = option_xlateable_txt.field_ct; - - do { - ppz++; /* skip over field_ct */ - *ppz = AO_gettext(*ppz); - } while (--ix > 0); - /* prevent re-translation and disable "libopts" domain lookup */ - option_xlateable_txt.field_ct = 0; - - coerce_it((void*)&(opts->pzCopyright)); - coerce_it((void*)&(opts->pzCopyNotice)); - coerce_it((void*)&(opts->pzFullVersion)); - coerce_it((void*)&(opts->pzUsageTitle)); - coerce_it((void*)&(opts->pzExplain)); - coerce_it((void*)&(opts->pzDetail)); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it((void*)&(od->pzText)); - } - } -} -#endif /* ENABLE_NLS */ - -#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT -/** I18N function strictly for xgettext. Do not compile. */ -static void bogus_function(void) { - /* TRANSLATORS: - - The following dummy function was crated solely so that xgettext can extract - the correct strings. These strings are actually referenced by a field name - in the tpmtoolOptions structure noted in the comments below. The - literal text is defined in tpmtool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - tpmtool_opt_strs. The strings above are handed off for translation - at run time a paragraph at a time. Consequently, they are presented here - for translation a paragraph at a time. - - ALSO: often the description for an option will reference another option - by name. These are set off with apostrophe quotes (I hope). Do not - translate option names. - */ - /* referenced via tpmtoolOptions.pzCopyright */ - puts(_("tpmtool @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\ -redistribution under the terms of the GNU General Public License,\n\ -version 3 or later \n")); - - /* referenced via tpmtoolOptions.pzCopyNotice */ - puts(_("tpmtool is free software: you can redistribute it and/or modify it under\n\ -the terms of the GNU General Public License as published by the Free\n\ -Software Foundation, either version 3 of the License, or (at your option)\n\ -any later version.\n\n")); - puts(_("tpmtool is distributed in the hope that it will be useful, but WITHOUT ANY\n\ -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\ -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n\ -details.\n\n")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging.")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Input file")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Generate an RSA private-public key pair")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Any generated key will be registered in the TPM")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Any generated key will be a signing key")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Any generated key will be a legacy key")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Any registered key will be a user key")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Any registred key will be a system key")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Prints the public key of the provided key")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Lists all stored keys in the TPM")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Delete the key identified by the given URL (UUID).")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Specify the security level [low, legacy, normal, high, ultra].")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Specify the number of bits for key generate")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Use the DER format for keys.")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Use DER format for output keys")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via tpmtoolOptions.pzUsageTitle */ - puts(_("tpmtool - GnuTLS TPM tool\n\ -Usage: %s [ - [] | --[{=| }] ]...\n")); - - /* referenced via tpmtoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via tpmtoolOptions.pzDetail */ - puts(_("Program that allows handling cryptographic data from the TPM chip.\n")); - - /* referenced via tpmtoolOptions.pzFullVersion */ - puts(_("tpmtool @VERSION@")); - - /* referenced via tpmtoolOptions.pzFullUsage */ - puts(_("<<>>")); - - /* referenced via tpmtoolOptions.pzShortUsage */ - puts(_("tpmtool [options]\n\ -tpmtool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 60 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 86 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 89 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 87 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 73 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 91 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); -#line 310 "../usage.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 329 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 351 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 783 "../usage.c" - puts(_("invalid argument type specified")); -#line 589 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 229 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 290 "../find.c" - puts(_("%s: ambiguous option name: %s (matches %d options)\n")); -#line 161 "../check.c" - puts(_("%s: Command line arguments required\n")); -#line 43 "../alias.c" - puts(_("%d %s%s options allowed\n")); -#line 81 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 293 "../makeshell.c" - puts(_("interprocess pipe")); -#line 168 "../version.c" - puts(_("error: version option argument '%c' invalid. Use:\n" - "\t'v' - version only\n" - "\t'c' - version and copyright\n" - "\t'n' - version and full copyright notice\n")); -#line 58 "../check.c" - puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 214 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 421 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 460 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 268 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 746 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 332 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 154 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 164 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 782 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1110 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 379 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 518 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 171 "../autoopts.c" - puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" - "\t'%s' and '%s'.")); -#line 94 "../check.c" - puts(_("%s error: The %s option is required\n")); -#line 623 "../find.c" - puts(_("%s: The '%s' option cannot have an argument.\n")); -#line 151 "../check.c" - puts(_("%s: Command line arguments are not allowed.\n")); -#line 531 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 229 "../enum.c" - puts(_("%s error: '%s' does not match any %s keywords.\n")); -#line 93 "../reset.c" - puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 246 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 114 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); -#line 53 "../time.c" - puts(_("%s error: '%s' is not a recognizable time duration.\n")); -#line 92 "../check.c" - puts(_("%s error: The %s option must appear %d times.\n")); -#line 157 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 195 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 366 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 195 "../makeshell.c" - puts(_("standard output")); -#line 930 "../makeshell.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard output")); -#line 451 "../usage.c" - puts(_("standard output")); -#line 660 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 304 "../usage.c" - puts(_("standard error")); -#line 451 "../usage.c" - puts(_("standard error")); -#line 660 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 195 "../makeshell.c" - puts(_("write")); -#line 930 "../makeshell.c" - puts(_("write")); -#line 303 "../usage.c" - puts(_("write")); -#line 450 "../usage.c" - puts(_("write")); -#line 659 "../usage.c" - puts(_("write")); -#line 174 "../version.c" - puts(_("write")); -#line 60 "../numeric.c" - puts(_("%s error: %s option value %ld is out of range.\n")); -#line 44 "../check.c" - puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 530 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 908 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1177 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 959 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 872 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1146 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1144 "../usage.c" - puts(_("This option has been disabled")); -#line 899 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1221 "../usage.c" - puts(_(" - examining environment variables named %s_*\n")); -#line 168 "../file.c" - puts(_("\t\t\t\t- file must not pre-exist\n")); -#line 172 "../file.c" - puts(_("\t\t\t\t- file must pre-exist\n")); -#line 416 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 908 "../makeshell.c" - puts(_("\n" - "= = = = = = = =\n\n" - "This incarnation of genshell will produce\n" - "a shell script to parse the options for %s:\n\n")); -#line 161 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 932 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 953 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 418 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 939 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 926 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1336 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1272 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1330 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1331 "../usage.c" - puts(_(" %3s %s")); -#line 1337 "../usage.c" - puts(_(" %3s %s")); -#line 423 "../usage.c" - puts(_("The '-#' option may omit the hash char\n")); -#line 419 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 1006 "../usage.c" - puts(_(" - reading file %s")); -#line 445 "../usage.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 100 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 129 "../version.c" - puts(_("\n" - "Please send bug reports to: <%s>\n")); -#line 938 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 978 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1219 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 717 "../usage.c" - puts(_("prohibits these options:\n")); -#line 712 "../usage.c" - puts(_("prohibits the option '%s'\n")); -#line 81 "../numeric.c" - puts(_("%s%ld to %ld")); -#line 79 "../numeric.c" - puts(_("%sgreater than or equal to %ld")); -#line 75 "../numeric.c" - puts(_("%s%ld exactly")); -#line 68 "../numeric.c" - puts(_("%sit must lie in one of the ranges:\n")); -#line 68 "../numeric.c" - puts(_("%sit must be in the range:\n")); -#line 88 "../numeric.c" - puts(_(", or\n")); -#line 66 "../numeric.c" - puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); -#line 77 "../numeric.c" - puts(_("%sless than or equal to %ld")); -#line 426 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 687 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 690 "../usage.c" - puts(_("requires these options:\n")); -#line 1348 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1342 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 162 "../enum.c" - puts(_("or you may use a numeric representation. Preceding these with a '!'\n" - "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" - "will set them all. Multiple entries may be passed as an option\n" - "argument list.\n")); -#line 945 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 72 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1181 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 808 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* tpmtool-args.c ends here */ diff --git a/src/tpmtool-args.h b/src/tpmtool-args.h deleted file mode 100644 index 126c1ab4d5..0000000000 --- a/src/tpmtool-args.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (tpmtool-args.h) - * - * It has been AutoGen-ed June 10, 2013 at 07:23:01 PM by AutoGen 5.17.3 - * From the definitions tpmtool-args.def - * and the template file options - * - * Generated from AutoOpts 38:0:13 templates. - * - * AutoOpts is a copyrighted work. This header file is not encumbered - * by AutoOpts licensing, but is provided under the licensing terms chosen - * by the tpmtool author or copyright holder. AutoOpts is - * licensed under the terms of the LGPL. The redistributable library - * (``libopts'') is licensed under the terms of either the LGPL or, at the - * users discretion, the BSD license. See the AutoOpts and/or libopts sources - * for details. - * - * The tpmtool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. - * This is free software. It is licensed for use, modification and - * redistribution under the terms of the GNU General Public License, - * version 3 or later - * - * tpmtool is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * tpmtool is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the tpmtool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_TPMTOOL_ARGS_H_GUARD -#define AUTOOPTS_TPMTOOL_ARGS_H_GUARD 1 -#include "config.h" -#include - -/** - * Ensure that the library used for compiling this generated header is at - * least as new as the version current when the header template was released - * (not counting patch version increments). Also ensure that the oldest - * tolerable version is at least as old as what was current when the header - * template was released. - */ -#define AO_TEMPLATE_VERSION 155648 -#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ - || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) -# error option template version mismatches autoopts/options.h header - Choke Me. -#endif - -/** - * Enumeration of each option type for tpmtool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_INFILE = 1, - INDEX_OPT_OUTFILE = 2, - INDEX_OPT_GENERATE_RSA = 3, - INDEX_OPT_REGISTER = 4, - INDEX_OPT_SIGNING = 5, - INDEX_OPT_LEGACY = 6, - INDEX_OPT_USER = 7, - INDEX_OPT_SYSTEM = 8, - INDEX_OPT_PUBKEY = 9, - INDEX_OPT_LIST = 10, - INDEX_OPT_DELETE = 11, - INDEX_OPT_SEC_PARAM = 12, - INDEX_OPT_BITS = 13, - INDEX_OPT_INDER = 14, - INDEX_OPT_OUTDER = 15, - INDEX_OPT_VERSION = 16, - INDEX_OPT_HELP = 17, - INDEX_OPT_MORE_HELP = 18 -} teOptIndex; -/** count of all options for tpmtool */ -#define OPTION_CT 19 -/** tpmtool version */ -#define TPMTOOL_VERSION "@VERSION@" -/** Full tpmtool version text */ -#define TPMTOOL_FULL_VERSION "tpmtool @VERSION@" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(DEBUG) - */ -#define DESC(n) (tpmtoolOptions.pOptDesc[INDEX_OPT_## n]) -/** 'true' if an option has been specified in any way */ -#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) -/** The string argument to an option. The argument type must be "string". */ -#define OPT_ARG(n) (DESC(n).optArg.argString) -/** Mask the option state revealing how an option was specified. - * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET, - * \a OPTST_DEFINED, \a OPTST_RESET or zero. - */ -#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) -/** Count of option's occurrances *on the command line*. */ -#define COUNT_OPT(n) (DESC(n).optOccCt) -/** mask of \a OPTST_SET and \a OPTST_DEFINED. */ -#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) -/** 'true' if \a HAVE_OPT would yield 'false'. */ -#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) -/** 'true' if OPTST_DISABLED bit not set. */ -#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) -/** number of stacked option arguments. - * Valid only for stacked option arguments. */ -#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) -/** stacked argument vector. - * Valid only for stacked option arguments. */ -#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) -/** Reset an option. */ -#define CLEAR_OPT(n) STMTS( \ - DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ - if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \ - DESC(n).fOptState |= OPTST_DISABLED; \ - DESC(n).optCookie = NULL ) - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Enumeration of tpmtool exit codes - */ -typedef enum { - TPMTOOL_EXIT_SUCCESS = 0, - TPMTOOL_EXIT_FAILURE = 1, - TPMTOOL_EXIT_USAGE_ERROR = 64, - TPMTOOL_EXIT_LIBOPTS_FAILURE = 70 -} tpmtool_exit_code_t; -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Interface defines for specific options. - * @{ - */ -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_INFILE 1 -#define VALUE_OPT_OUTFILE 2 -#define VALUE_OPT_GENERATE_RSA 3 -#define VALUE_OPT_REGISTER 4 -#define VALUE_OPT_SIGNING 5 -#define VALUE_OPT_LEGACY 6 -#define VALUE_OPT_USER 7 -#define VALUE_OPT_SYSTEM 8 -#define VALUE_OPT_PUBKEY 9 -#define VALUE_OPT_LIST 10 -#define VALUE_OPT_DELETE 11 -#define VALUE_OPT_SEC_PARAM 12 -#define VALUE_OPT_BITS 13 - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_INDER 14 -#define VALUE_OPT_OUTDER 15 -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for " (get "val-name") " option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(tpmtoolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(tpmtoolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - tpmtoolOptions.curOptIdx = (n); \ - tpmtoolOptions.pzCurOpt = NULL) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*tpmtoolOptions.pUsageProc)(&tpmtoolOptions, c) -/* extracted from opthead.tlib near line 538 */ - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include - - -/* * * * * * - * - * Declare the tpmtool option descriptor. - */ -extern tOptions tpmtoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include -# endif - -static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); -} -# define _(s) aoGetsText(s) -# endif /* _() */ - -# define OPT_NO_XLAT_CFG_NAMES STMTS(tpmtoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(tpmtoolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(tpmtoolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(tpmtoolOptions.fOptSet &= \ - ~OPTPROC_NXLAT_OPT;) - -#else /* ENABLE_NLS */ -# define OPT_NO_XLAT_CFG_NAMES -# define OPT_NO_XLAT_OPT_NAMES - -# define OPT_XLAT_CFG_NAMES -# define OPT_XLAT_OPT_NAMES - -# ifndef _ -# define _(_s) _s -# endif -#endif /* ENABLE_NLS */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTOOPTS_TPMTOOL_ARGS_H_GUARD */ -/* tpmtool-args.h ends here */