diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-11-12 13:41:19 +0100 |
---|---|---|
committer | Daiki Ueno <dueno@redhat.com> | 2018-11-13 14:57:34 +0100 |
commit | 78895715dba681d25a47e5da369d3eb20fcf08ed (patch) | |
tree | 12231a7bb5cd5946762044c52de66ac3fa65964f | |
parent | eac0905a095a13a4652a9ebbf2df0c3e1f867cc5 (diff) | |
download | gnutls-78895715dba681d25a47e5da369d3eb20fcf08ed.tar.gz |
build: remove autogen .bak files from the repository
While the .bak files are necessary for not requiring autogen on
deployment environment, they are not needed for development and may
cause conflict when other developers use different version of
autogen. This removes those files from the repository and require
autogen at make dist time.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/certtool-args.c.bak | 3650 | ||||
-rw-r--r-- | src/certtool-args.h.bak | 383 | ||||
-rw-r--r-- | src/cli-args.c.bak | 2753 | ||||
-rw-r--r-- | src/cli-args.h.bak | 333 | ||||
-rw-r--r-- | src/cli-debug-args.c.bak | 1023 | ||||
-rw-r--r-- | src/cli-debug-args.h.bak | 223 | ||||
-rw-r--r-- | src/danetool-args.c.bak | 1723 | ||||
-rw-r--r-- | src/danetool-args.h.bak | 265 | ||||
-rw-r--r-- | src/ocsptool-args.c.bak | 1700 | ||||
-rw-r--r-- | src/ocsptool-args.h.bak | 255 | ||||
-rw-r--r-- | src/p11tool-args.c.bak | 3284 | ||||
-rw-r--r-- | src/p11tool-args.h.bak | 349 | ||||
-rw-r--r-- | src/psktool-args.c.bak | 1013 | ||||
-rw-r--r-- | src/psktool-args.h.bak | 223 | ||||
-rw-r--r-- | src/serv-args.c.bak | 2322 | ||||
-rw-r--r-- | src/serv-args.h.bak | 297 | ||||
-rw-r--r-- | src/srptool-args.c.bak | 1067 | ||||
-rw-r--r-- | src/srptool-args.h.bak | 231 | ||||
-rw-r--r-- | src/systemkey-args.c.bak | 1058 | ||||
-rw-r--r-- | src/systemkey-args.h.bak | 225 | ||||
-rw-r--r-- | src/tpmtool-args.c.bak | 1392 | ||||
-rw-r--r-- | src/tpmtool-args.h.bak | 247 |
24 files changed, 2 insertions, 24027 deletions
diff --git a/configure.ac b/configure.ac index 5e915eac53..7deb6b389b 100644 --- a/configure.ac +++ b/configure.ac @@ -714,7 +714,6 @@ AC_SUBST(TROUSERS_LIB) AM_MISSING_PROG([AUTOGEN], [autogen]) included_libopts=no -create_libopts_links=no if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then AC_CHECK_PROGS([autogen], [autogen]) @@ -729,7 +728,6 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then LIBOPTS_CHECK([src/libopts]) if test "$NEED_LIBOPTS_DIR" = "true";then dnl replace libopts-generated files with distributed backups, if present - create_libopts_links=yes included_libopts=yes fi else @@ -950,15 +948,6 @@ dnl Some variables needed in makefiles YEAR=`date +%Y` AC_SUBST([YEAR], $YEAR) -for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do - nam=$(basename $i|sed 's/.bak//g') - if test "$create_libopts_links" = "yes";then - rm -f "src/$nam.stamp" - rm -f "src/$nam" - AC_CONFIG_LINKS([src/$nam:$i]) - fi -done - AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile]) AC_CONFIG_FILES([ Makefile diff --git a/src/Makefile.am b/src/Makefile.am index c9bc80bd32..9bf6bf8ae9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,6 +57,8 @@ DISTCLEANFILES = $(BUILT_SOURCES) $(ARGS_STAMPS) EXTRA_DIST = gen-mech-list.sh $(ARGS_BAK) +MAINTAINERCLEANFILES = $(ARGS_BAK) + AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) AM_CPPFLAGS = \ -I$(srcdir)/gl \ diff --git a/src/certtool-args.c.bak b/src/certtool-args.c.bak deleted file mode 100644 index 08065d003d..0000000000 --- a/src/certtool-args.c.bak +++ /dev/null @@ -1,3650 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (certtool-args.c) - * - * It has been AutoGen-ed - * From the definitions certtool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "certtool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (certtool_opt_strs+0) -#define zLicenseDescrip (certtool_opt_strs+283) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for certtool options - */ -static char const certtool_opt_strs[7221] = -/* 0 */ "certtool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 283 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 888 */ "Enable debugging\0" -/* 905 */ "DEBUG\0" -/* 911 */ "debug\0" -/* 917 */ "More verbose output\0" -/* 937 */ "VERBOSE\0" -/* 945 */ "verbose\0" -/* 953 */ "Input file\0" -/* 964 */ "INFILE\0" -/* 971 */ "infile\0" -/* 978 */ "Output file\0" -/* 990 */ "OUTFILE\0" -/* 998 */ "outfile\0" -/* 1006 */ "Certificate related options:\0" -/* 1035 */ "Print information on the given certificate\0" -/* 1078 */ "CERTIFICATE_INFO\0" -/* 1095 */ "certificate-info\0" -/* 1112 */ "Print information on a public key\0" -/* 1146 */ "PUBKEY_INFO\0" -/* 1158 */ "pubkey-info\0" -/* 1170 */ "Generate a self-signed certificate\0" -/* 1205 */ "GENERATE_SELF_SIGNED\0" -/* 1226 */ "generate-self-signed\0" -/* 1247 */ "Generate a signed certificate\0" -/* 1277 */ "GENERATE_CERTIFICATE\0" -/* 1298 */ "generate-certificate\0" -/* 1319 */ "Generates a proxy certificate\0" -/* 1349 */ "GENERATE_PROXY\0" -/* 1364 */ "generate-proxy\0" -/* 1379 */ "Update a signed certificate\0" -/* 1407 */ "UPDATE_CERTIFICATE\0" -/* 1426 */ "update-certificate\0" -/* 1445 */ "Print the fingerprint of the given certificate\0" -/* 1492 */ "FINGERPRINT\0" -/* 1504 */ "fingerprint\0" -/* 1516 */ "Print the key ID of the given certificate\0" -/* 1558 */ "KEY_ID\0" -/* 1565 */ "key-id\0" -/* 1572 */ "Print certificate's public key (deprecated)\0" -/* 1616 */ "CERTIFICATE_PUBKEY\0" -/* 1635 */ "certificate-pubkey\0" -/* 1654 */ "Generate an X.509 version 1 certificate (with no extensions)\0" -/* 1715 */ "V1\0" -/* 1718 */ "v1\0" -/* 1721 */ "Sign a certificate with a specific signature algorithm\0" -/* 1776 */ "SIGN_PARAMS\0" -/* 1788 */ "sign-params\0" -/* 1800 */ "Certificate request related options:\0" -/* 1837 */ "Print information on the given certificate request\0" -/* 1888 */ "CRQ_INFO\0" -/* 1897 */ "crq-info\0" -/* 1906 */ "Generate a PKCS #10 certificate request\0" -/* 1946 */ "GENERATE_REQUEST\0" -/* 1963 */ "generate-request\0" -/* 1980 */ "Do not use extensions in certificate requests\0" -/* 2026 */ "NO_CRQ_EXTENSIONS\0" -/* 2044 */ "no-crq-extensions\0" -/* 2062 */ "PKCS#12 file related options:\0" -/* 2092 */ "Print information on a PKCS #12 structure\0" -/* 2134 */ "P12_INFO\0" -/* 2143 */ "p12-info\0" -/* 2152 */ "The PKCS #12 friendly name to use\0" -/* 2186 */ "P12_NAME\0" -/* 2195 */ "p12-name\0" -/* 2204 */ "Generate a PKCS #12 structure\0" -/* 2234 */ "TO_P12\0" -/* 2241 */ "to-p12\0" -/* 2248 */ "Private key related options:\0" -/* 2277 */ "Print information on a private key\0" -/* 2312 */ "KEY_INFO\0" -/* 2321 */ "key-info\0" -/* 2330 */ "Print information on a PKCS #8 structure\0" -/* 2371 */ "P8_INFO\0" -/* 2379 */ "p8-info\0" -/* 2387 */ "Convert an RSA-PSS key to raw RSA format\0" -/* 2428 */ "TO_RSA\0" -/* 2435 */ "to-rsa\0" -/* 2442 */ "Generate a private key\0" -/* 2465 */ "GENERATE_PRIVKEY\0" -/* 2482 */ "generate-privkey\0" -/* 2499 */ "Specify the key type to use on key generation\0" -/* 2545 */ "KEY_TYPE\0" -/* 2554 */ "key-type\0" -/* 2563 */ "Specify the number of bits for key generation\0" -/* 2609 */ "BITS\0" -/* 2614 */ "bits\0" -/* 2619 */ "Specify the curve used for EC key generation\0" -/* 2664 */ "CURVE\0" -/* 2670 */ "curve\0" -/* 2676 */ "Specify the security level [low, legacy, medium, high, ultra]\0" -/* 2738 */ "SEC_PARAM\0" -/* 2748 */ "sec-param\0" -/* 2758 */ "Convert a given key to a PKCS #8 structure\0" -/* 2801 */ "TO_P8\0" -/* 2807 */ "to-p8\0" -/* 2813 */ "Use PKCS #8 format for private keys\0" -/* 2849 */ "PKCS8\0" -/* 2855 */ "pkcs8\0" -/* 2861 */ "Generate a private key or parameters from a seed using a provable method\0" -/* 2934 */ "PROVABLE\0" -/* 2943 */ "provable\0" -/* 2952 */ "Verify a private key generated from a seed using a provable method\0" -/* 3019 */ "VERIFY_PROVABLE_PRIVKEY\0" -/* 3043 */ "verify-provable-privkey\0" -/* 3067 */ "When generating a private key use the given hex-encoded seed\0" -/* 3128 */ "SEED\0" -/* 3133 */ "seed\0" -/* 3138 */ "CRL related options:\0" -/* 3159 */ "Print information on the given CRL structure\0" -/* 3204 */ "CRL_INFO\0" -/* 3213 */ "crl-info\0" -/* 3222 */ "Generate a CRL\0" -/* 3237 */ "GENERATE_CRL\0" -/* 3250 */ "generate-crl\0" -/* 3263 */ "Verify a Certificate Revocation List using a trusted list\0" -/* 3321 */ "VERIFY_CRL\0" -/* 3332 */ "verify-crl\0" -/* 3343 */ "Certificate verification related options:\0" -/* 3385 */ "Verify a PEM encoded certificate chain\0" -/* 3424 */ "VERIFY_CHAIN\0" -/* 3437 */ "verify-chain\0" -/* 3450 */ "Verify a PEM encoded certificate (chain) against a trusted set\0" -/* 3513 */ "VERIFY\0" -/* 3520 */ "verify\0" -/* 3527 */ "Specify a hostname to be used for certificate chain verification\0" -/* 3592 */ "VERIFY_HOSTNAME\0" -/* 3608 */ "verify-hostname\0" -/* 3624 */ "Specify a email to be used for certificate chain verification\0" -/* 3686 */ "VERIFY_EMAIL\0" -/* 3699 */ "verify-email\0" -/* 3712 */ "Specify a purpose OID to be used for certificate chain verification\0" -/* 3780 */ "VERIFY_PURPOSE\0" -/* 3795 */ "verify-purpose\0" -/* 3810 */ "Allow broken algorithms, such as MD5 for verification\0" -/* 3864 */ "VERIFY_ALLOW_BROKEN\0" -/* 3884 */ "verify-allow-broken\0" -/* 3904 */ "PKCS#7 structure options:\0" -/* 3930 */ "Generate a PKCS #7 structure\0" -/* 3959 */ "P7_GENERATE\0" -/* 3971 */ "p7-generate\0" -/* 3983 */ "Signs using a PKCS #7 structure\0" -/* 4015 */ "P7_SIGN\0" -/* 4023 */ "p7-sign\0" -/* 4031 */ "Signs using a detached PKCS #7 structure\0" -/* 4072 */ "P7_DETACHED_SIGN\0" -/* 4089 */ "p7-detached-sign\0" -/* 4106 */ "The signer's certificate will be included in the cert list.\0" -/* 4166 */ "P7_INCLUDE_CERT\0" -/* 4182 */ "no-p7-include-cert\0" -/* 4201 */ "no\0" -/* 4204 */ "Will include a timestamp in the PKCS #7 structure\0" -/* 4254 */ "P7_TIME\0" -/* 4262 */ "no-p7-time\0" -/* 4273 */ "Will show the embedded data in the PKCS #7 structure\0" -/* 4326 */ "P7_SHOW_DATA\0" -/* 4339 */ "no-p7-show-data\0" -/* 4355 */ "Print information on a PKCS #7 structure\0" -/* 4396 */ "P7_INFO\0" -/* 4404 */ "p7-info\0" -/* 4412 */ "Verify the provided PKCS #7 structure\0" -/* 4450 */ "P7_VERIFY\0" -/* 4460 */ "p7-verify\0" -/* 4470 */ "Convert S/MIME to PKCS #7 structure\0" -/* 4506 */ "SMIME_TO_P7\0" -/* 4518 */ "smime-to-p7\0" -/* 4530 */ "Other options:\0" -/* 4545 */ "Generate PKCS #3 encoded Diffie-Hellman parameters (deprecated)\0" -/* 4609 */ "GENERATE_DH_PARAMS\0" -/* 4628 */ "generate-dh-params\0" -/* 4647 */ "List the included PKCS #3 encoded Diffie-Hellman parameters\0" -/* 4707 */ "GET_DH_PARAMS\0" -/* 4721 */ "get-dh-params\0" -/* 4735 */ "Print information PKCS #3 encoded Diffie-Hellman parameters\0" -/* 4795 */ "DH_INFO\0" -/* 4803 */ "dh-info\0" -/* 4811 */ "Loads a private key file\0" -/* 4836 */ "LOAD_PRIVKEY\0" -/* 4849 */ "load-privkey\0" -/* 4862 */ "Loads a public key file\0" -/* 4886 */ "LOAD_PUBKEY\0" -/* 4898 */ "load-pubkey\0" -/* 4910 */ "Loads a certificate request file\0" -/* 4943 */ "LOAD_REQUEST\0" -/* 4956 */ "load-request\0" -/* 4969 */ "Loads a certificate file\0" -/* 4994 */ "LOAD_CERTIFICATE\0" -/* 5011 */ "load-certificate\0" -/* 5028 */ "Loads the certificate authority's private key file\0" -/* 5079 */ "LOAD_CA_PRIVKEY\0" -/* 5095 */ "load-ca-privkey\0" -/* 5111 */ "Loads the certificate authority's certificate file\0" -/* 5162 */ "LOAD_CA_CERTIFICATE\0" -/* 5182 */ "load-ca-certificate\0" -/* 5202 */ "Loads the provided CRL\0" -/* 5225 */ "LOAD_CRL\0" -/* 5234 */ "load-crl\0" -/* 5243 */ "Loads auxiliary data\0" -/* 5264 */ "LOAD_DATA\0" -/* 5274 */ "load-data\0" -/* 5284 */ "Password to use\0" -/* 5300 */ "PASSWORD\0" -/* 5309 */ "password\0" -/* 5318 */ "Enforce a NULL password\0" -/* 5342 */ "NULL_PASSWORD\0" -/* 5356 */ "null-password\0" -/* 5370 */ "Enforce an empty password\0" -/* 5396 */ "EMPTY_PASSWORD\0" -/* 5411 */ "empty-password\0" -/* 5426 */ "Print big number in an easier format to parse\0" -/* 5472 */ "HEX_NUMBERS\0" -/* 5484 */ "hex-numbers\0" -/* 5496 */ "In certain operations it prints the information in C-friendly format\0" -/* 5565 */ "CPRINT\0" -/* 5572 */ "cprint\0" -/* 5579 */ "Generate RSA key (deprecated)\0" -/* 5609 */ "RSA\0" -/* 5613 */ "rsa\0" -/* 5617 */ "Generate DSA key (deprecated)\0" -/* 5647 */ "DSA\0" -/* 5651 */ "dsa\0" -/* 5655 */ "Generate ECC (ECDSA) key (deprecated)\0" -/* 5693 */ "ECC\0" -/* 5697 */ "ecc\0" -/* 5701 */ "an alias for the 'ecc' option (deprecated)\0" -/* 5744 */ "ecdsa\0" -/* 5750 */ "Hash algorithm to use for signing\0" -/* 5784 */ "HASH\0" -/* 5789 */ "hash\0" -/* 5794 */ "Specify the RSA-PSS key default salt size\0" -/* 5836 */ "SALT_SIZE\0" -/* 5846 */ "salt-size\0" -/* 5856 */ "Use DER format for input certificates, private keys, and DH parameters\0" -/* 5927 */ "INDER\0" -/* 5933 */ "no-inder\0" -/* 5942 */ "an alias for the 'inder' option\0" -/* 5974 */ "inraw\0" -/* 5980 */ "Use DER format for output certificates, private keys, and DH parameters\0" -/* 6052 */ "OUTDER\0" -/* 6059 */ "no-outder\0" -/* 6069 */ "an alias for the 'outder' option\0" -/* 6102 */ "outraw\0" -/* 6109 */ "No effect (deprecated)\0" -/* 6132 */ "DISABLE_QUICK_RANDOM\0" -/* 6153 */ "disable-quick-random\0" -/* 6174 */ "Template file to use for non-interactive operation\0" -/* 6225 */ "TEMPLATE\0" -/* 6234 */ "template\0" -/* 6243 */ "Print information to stdout instead of stderr\0" -/* 6289 */ "STDOUT_INFO\0" -/* 6301 */ "stdout-info\0" -/* 6313 */ "Enable interaction for entering password when in batch mode.\0" -/* 6374 */ "ASK_PASS\0" -/* 6383 */ "ask-pass\0" -/* 6392 */ "Cipher to use for PKCS #8 and #12 operations\0" -/* 6437 */ "PKCS_CIPHER\0" -/* 6449 */ "pkcs-cipher\0" -/* 6461 */ "Specify the PKCS #11 provider library\0" -/* 6499 */ "PROVIDER\0" -/* 6508 */ "provider\0" -/* 6517 */ "display extended usage information and exit\0" -/* 6561 */ "help\0" -/* 6566 */ "extended usage information passed thru pager\0" -/* 6611 */ "more-help\0" -/* 6621 */ "output version information and exit\0" -/* 6657 */ "version\0" -/* 6665 */ "CERTTOOL\0" -/* 6674 */ "certtool - GnuTLS certificate tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 6767 */ "bugs@gnutls.org\0" -/* 6783 */ "\n\0" -/* 6785 */ "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\n" - "The tool accepts files or supported URIs via the --infile option. In case\n" - "PIN is required for URI access you can provide it using the environment\n" - "variables GNUTLS_PIN and GNUTLS_SO_PIN.\n\0" -/* 7146 */ "certtool 3.6.4\0" -/* 7161 */ "certtool [options]\n" - "certtool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (certtool_opt_strs+888) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (certtool_opt_strs+905) -/** Name string for the debug option */ -#define DEBUG_name (certtool_opt_strs+911) -/** 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 (certtool_opt_strs+917) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (certtool_opt_strs+937) -/** Name string for the verbose option */ -#define VERBOSE_name (certtool_opt_strs+945) -/** 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 (certtool_opt_strs+953) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (certtool_opt_strs+964) -/** Name string for the infile option */ -#define INFILE_name (certtool_opt_strs+971) -/** 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 (certtool_opt_strs+978) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (certtool_opt_strs+990) -/** Name string for the outfile option */ -#define OUTFILE_name (certtool_opt_strs+998) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * cert_options option description: - */ -/** cert_options option separation text */ -#define CERT_OPTIONS_DESC (certtool_opt_strs+1006) -#define CERT_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * certificate-info option description: - */ -/** Descriptive text for the certificate-info option */ -#define CERTIFICATE_INFO_DESC (certtool_opt_strs+1035) -/** Upper-cased name for the certificate-info option */ -#define CERTIFICATE_INFO_NAME (certtool_opt_strs+1078) -/** Name string for the certificate-info option */ -#define CERTIFICATE_INFO_name (certtool_opt_strs+1095) -/** Compiled in flag settings for the certificate-info option */ -#define CERTIFICATE_INFO_FLAGS (OPTST_DISABLED) - -/** - * pubkey-info option description: - */ -/** Descriptive text for the pubkey-info option */ -#define PUBKEY_INFO_DESC (certtool_opt_strs+1112) -/** Upper-cased name for the pubkey-info option */ -#define PUBKEY_INFO_NAME (certtool_opt_strs+1146) -/** Name string for the pubkey-info option */ -#define PUBKEY_INFO_name (certtool_opt_strs+1158) -/** Compiled in flag settings for the pubkey-info option */ -#define PUBKEY_INFO_FLAGS (OPTST_DISABLED) - -/** - * generate-self-signed option description: - */ -/** Descriptive text for the generate-self-signed option */ -#define GENERATE_SELF_SIGNED_DESC (certtool_opt_strs+1170) -/** Upper-cased name for the generate-self-signed option */ -#define GENERATE_SELF_SIGNED_NAME (certtool_opt_strs+1205) -/** Name string for the generate-self-signed option */ -#define GENERATE_SELF_SIGNED_name (certtool_opt_strs+1226) -/** Compiled in flag settings for the generate-self-signed option */ -#define GENERATE_SELF_SIGNED_FLAGS (OPTST_DISABLED) - -/** - * generate-certificate option description: - */ -/** Descriptive text for the generate-certificate option */ -#define GENERATE_CERTIFICATE_DESC (certtool_opt_strs+1247) -/** Upper-cased name for the generate-certificate option */ -#define GENERATE_CERTIFICATE_NAME (certtool_opt_strs+1277) -/** Name string for the generate-certificate option */ -#define GENERATE_CERTIFICATE_name (certtool_opt_strs+1298) -/** Compiled in flag settings for the generate-certificate option */ -#define GENERATE_CERTIFICATE_FLAGS (OPTST_DISABLED) - -/** - * generate-proxy option description: - */ -/** Descriptive text for the generate-proxy option */ -#define GENERATE_PROXY_DESC (certtool_opt_strs+1319) -/** Upper-cased name for the generate-proxy option */ -#define GENERATE_PROXY_NAME (certtool_opt_strs+1349) -/** Name string for the generate-proxy option */ -#define GENERATE_PROXY_name (certtool_opt_strs+1364) -/** Compiled in flag settings for the generate-proxy option */ -#define GENERATE_PROXY_FLAGS (OPTST_DISABLED) - -/** - * update-certificate option description: - */ -/** Descriptive text for the update-certificate option */ -#define UPDATE_CERTIFICATE_DESC (certtool_opt_strs+1379) -/** Upper-cased name for the update-certificate option */ -#define UPDATE_CERTIFICATE_NAME (certtool_opt_strs+1407) -/** Name string for the update-certificate option */ -#define UPDATE_CERTIFICATE_name (certtool_opt_strs+1426) -/** Compiled in flag settings for the update-certificate option */ -#define UPDATE_CERTIFICATE_FLAGS (OPTST_DISABLED) - -/** - * fingerprint option description: - */ -/** Descriptive text for the fingerprint option */ -#define FINGERPRINT_DESC (certtool_opt_strs+1445) -/** Upper-cased name for the fingerprint option */ -#define FINGERPRINT_NAME (certtool_opt_strs+1492) -/** Name string for the fingerprint option */ -#define FINGERPRINT_name (certtool_opt_strs+1504) -/** Compiled in flag settings for the fingerprint option */ -#define FINGERPRINT_FLAGS (OPTST_DISABLED) - -/** - * key-id option description: - */ -/** Descriptive text for the key-id option */ -#define KEY_ID_DESC (certtool_opt_strs+1516) -/** Upper-cased name for the key-id option */ -#define KEY_ID_NAME (certtool_opt_strs+1558) -/** Name string for the key-id option */ -#define KEY_ID_name (certtool_opt_strs+1565) -/** Compiled in flag settings for the key-id option */ -#define KEY_ID_FLAGS (OPTST_DISABLED) - -/** - * certificate-pubkey option description: - */ -/** Descriptive text for the certificate-pubkey option */ -#define CERTIFICATE_PUBKEY_DESC (certtool_opt_strs+1572) -/** Upper-cased name for the certificate-pubkey option */ -#define CERTIFICATE_PUBKEY_NAME (certtool_opt_strs+1616) -/** Name string for the certificate-pubkey option */ -#define CERTIFICATE_PUBKEY_name (certtool_opt_strs+1635) -/** Compiled in flag settings for the certificate-pubkey option */ -#define CERTIFICATE_PUBKEY_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * v1 option description: - */ -/** Descriptive text for the v1 option */ -#define V1_DESC (certtool_opt_strs+1654) -/** Upper-cased name for the v1 option */ -#define V1_NAME (certtool_opt_strs+1715) -/** Name string for the v1 option */ -#define V1_name (certtool_opt_strs+1718) -/** Compiled in flag settings for the v1 option */ -#define V1_FLAGS (OPTST_DISABLED) - -/** - * sign-params option description: - */ -/** Descriptive text for the sign-params option */ -#define SIGN_PARAMS_DESC (certtool_opt_strs+1721) -/** Upper-cased name for the sign-params option */ -#define SIGN_PARAMS_NAME (certtool_opt_strs+1776) -/** Name string for the sign-params option */ -#define SIGN_PARAMS_name (certtool_opt_strs+1788) -/** Compiled in flag settings for the sign-params option */ -#define SIGN_PARAMS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * crq_options option description: - */ -/** crq_options option separation text */ -#define CRQ_OPTIONS_DESC (certtool_opt_strs+1800) -#define CRQ_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * crq-info option description: - */ -/** Descriptive text for the crq-info option */ -#define CRQ_INFO_DESC (certtool_opt_strs+1837) -/** Upper-cased name for the crq-info option */ -#define CRQ_INFO_NAME (certtool_opt_strs+1888) -/** Name string for the crq-info option */ -#define CRQ_INFO_name (certtool_opt_strs+1897) -/** Compiled in flag settings for the crq-info option */ -#define CRQ_INFO_FLAGS (OPTST_DISABLED) - -/** - * generate-request option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the generate-request option */ -#define GENERATE_REQUEST_DESC (certtool_opt_strs+1906) -/** Upper-cased name for the generate-request option */ -#define GENERATE_REQUEST_NAME (certtool_opt_strs+1946) -/** Name string for the generate-request option */ -#define GENERATE_REQUEST_name (certtool_opt_strs+1963) -/** Other options that appear in conjunction with the generate-request option */ -static int const aGenerate_RequestCantList[] = { - INDEX_OPT_INFILE, NO_EQUIVALENT }; -/** Compiled in flag settings for the generate-request option */ -#define GENERATE_REQUEST_FLAGS (OPTST_DISABLED) - -/** - * no-crq-extensions option description: - */ -/** Descriptive text for the no-crq-extensions option */ -#define NO_CRQ_EXTENSIONS_DESC (certtool_opt_strs+1980) -/** Upper-cased name for the no-crq-extensions option */ -#define NO_CRQ_EXTENSIONS_NAME (certtool_opt_strs+2026) -/** Name string for the no-crq-extensions option */ -#define NO_CRQ_EXTENSIONS_name (certtool_opt_strs+2044) -/** Compiled in flag settings for the no-crq-extensions option */ -#define NO_CRQ_EXTENSIONS_FLAGS (OPTST_DISABLED) - -/** - * pkcs12_options option description: - */ -/** pkcs12_options option separation text */ -#define PKCS12_OPTIONS_DESC (certtool_opt_strs+2062) -#define PKCS12_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * p12-info option description: - */ -/** Descriptive text for the p12-info option */ -#define P12_INFO_DESC (certtool_opt_strs+2092) -/** Upper-cased name for the p12-info option */ -#define P12_INFO_NAME (certtool_opt_strs+2134) -/** Name string for the p12-info option */ -#define P12_INFO_name (certtool_opt_strs+2143) -/** Compiled in flag settings for the p12-info option */ -#define P12_INFO_FLAGS (OPTST_DISABLED) - -/** - * p12-name option description: - */ -/** Descriptive text for the p12-name option */ -#define P12_NAME_DESC (certtool_opt_strs+2152) -/** Upper-cased name for the p12-name option */ -#define P12_NAME_NAME (certtool_opt_strs+2186) -/** Name string for the p12-name option */ -#define P12_NAME_name (certtool_opt_strs+2195) -/** Compiled in flag settings for the p12-name option */ -#define P12_NAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * to-p12 option description: - */ -/** Descriptive text for the to-p12 option */ -#define TO_P12_DESC (certtool_opt_strs+2204) -/** Upper-cased name for the to-p12 option */ -#define TO_P12_NAME (certtool_opt_strs+2234) -/** Name string for the to-p12 option */ -#define TO_P12_name (certtool_opt_strs+2241) -/** Compiled in flag settings for the to-p12 option */ -#define TO_P12_FLAGS (OPTST_DISABLED) - -/** - * key_options option description: - */ -/** key_options option separation text */ -#define KEY_OPTIONS_DESC (certtool_opt_strs+2248) -#define KEY_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * key-info option description: - */ -/** Descriptive text for the key-info option */ -#define KEY_INFO_DESC (certtool_opt_strs+2277) -/** Upper-cased name for the key-info option */ -#define KEY_INFO_NAME (certtool_opt_strs+2312) -/** Name string for the key-info option */ -#define KEY_INFO_name (certtool_opt_strs+2321) -/** Compiled in flag settings for the key-info option */ -#define KEY_INFO_FLAGS (OPTST_DISABLED) - -/** - * p8-info option description: - */ -/** Descriptive text for the p8-info option */ -#define P8_INFO_DESC (certtool_opt_strs+2330) -/** Upper-cased name for the p8-info option */ -#define P8_INFO_NAME (certtool_opt_strs+2371) -/** Name string for the p8-info option */ -#define P8_INFO_name (certtool_opt_strs+2379) -/** Compiled in flag settings for the p8-info option */ -#define P8_INFO_FLAGS (OPTST_DISABLED) - -/** - * to-rsa option description: - */ -/** Descriptive text for the to-rsa option */ -#define TO_RSA_DESC (certtool_opt_strs+2387) -/** Upper-cased name for the to-rsa option */ -#define TO_RSA_NAME (certtool_opt_strs+2428) -/** Name string for the to-rsa option */ -#define TO_RSA_name (certtool_opt_strs+2435) -/** Compiled in flag settings for the to-rsa option */ -#define TO_RSA_FLAGS (OPTST_DISABLED) - -/** - * generate-privkey option description: - */ -/** Descriptive text for the generate-privkey option */ -#define GENERATE_PRIVKEY_DESC (certtool_opt_strs+2442) -/** Upper-cased name for the generate-privkey option */ -#define GENERATE_PRIVKEY_NAME (certtool_opt_strs+2465) -/** Name string for the generate-privkey option */ -#define GENERATE_PRIVKEY_name (certtool_opt_strs+2482) -/** Compiled in flag settings for the generate-privkey option */ -#define GENERATE_PRIVKEY_FLAGS (OPTST_DISABLED) - -/** - * key-type option description: - */ -/** Descriptive text for the key-type option */ -#define KEY_TYPE_DESC (certtool_opt_strs+2499) -/** Upper-cased name for the key-type option */ -#define KEY_TYPE_NAME (certtool_opt_strs+2545) -/** Name string for the key-type option */ -#define KEY_TYPE_name (certtool_opt_strs+2554) -/** Compiled in flag settings for the key-type option */ -#define KEY_TYPE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * bits option description: - */ -/** Descriptive text for the bits option */ -#define BITS_DESC (certtool_opt_strs+2563) -/** Upper-cased name for the bits option */ -#define BITS_NAME (certtool_opt_strs+2609) -/** Name string for the bits option */ -#define BITS_name (certtool_opt_strs+2614) -/** Compiled in flag settings for the bits option */ -#define BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * curve option description: - */ -/** Descriptive text for the curve option */ -#define CURVE_DESC (certtool_opt_strs+2619) -/** Upper-cased name for the curve option */ -#define CURVE_NAME (certtool_opt_strs+2664) -/** Name string for the curve option */ -#define CURVE_name (certtool_opt_strs+2670) -/** Compiled in flag settings for the curve option */ -#define CURVE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * sec-param option description: - */ -/** Descriptive text for the sec-param option */ -#define SEC_PARAM_DESC (certtool_opt_strs+2676) -/** Upper-cased name for the sec-param option */ -#define SEC_PARAM_NAME (certtool_opt_strs+2738) -/** Name string for the sec-param option */ -#define SEC_PARAM_name (certtool_opt_strs+2748) -/** Compiled in flag settings for the sec-param option */ -#define SEC_PARAM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * to-p8 option description: - */ -/** Descriptive text for the to-p8 option */ -#define TO_P8_DESC (certtool_opt_strs+2758) -/** Upper-cased name for the to-p8 option */ -#define TO_P8_NAME (certtool_opt_strs+2801) -/** Name string for the to-p8 option */ -#define TO_P8_name (certtool_opt_strs+2807) -/** Compiled in flag settings for the to-p8 option */ -#define TO_P8_FLAGS (OPTST_DISABLED) - -/** - * pkcs8 option description: - */ -/** Descriptive text for the pkcs8 option */ -#define PKCS8_DESC (certtool_opt_strs+2813) -/** Upper-cased name for the pkcs8 option */ -#define PKCS8_NAME (certtool_opt_strs+2849) -/** Name string for the pkcs8 option */ -#define PKCS8_name (certtool_opt_strs+2855) -/** Compiled in flag settings for the pkcs8 option */ -#define PKCS8_FLAGS (OPTST_DISABLED) - -/** - * provable option description: - */ -/** Descriptive text for the provable option */ -#define PROVABLE_DESC (certtool_opt_strs+2861) -/** Upper-cased name for the provable option */ -#define PROVABLE_NAME (certtool_opt_strs+2934) -/** Name string for the provable option */ -#define PROVABLE_name (certtool_opt_strs+2943) -/** Compiled in flag settings for the provable option */ -#define PROVABLE_FLAGS (OPTST_DISABLED) - -/** - * verify-provable-privkey option description: - */ -/** Descriptive text for the verify-provable-privkey option */ -#define VERIFY_PROVABLE_PRIVKEY_DESC (certtool_opt_strs+2952) -/** Upper-cased name for the verify-provable-privkey option */ -#define VERIFY_PROVABLE_PRIVKEY_NAME (certtool_opt_strs+3019) -/** Name string for the verify-provable-privkey option */ -#define VERIFY_PROVABLE_PRIVKEY_name (certtool_opt_strs+3043) -/** Compiled in flag settings for the verify-provable-privkey option */ -#define VERIFY_PROVABLE_PRIVKEY_FLAGS (OPTST_DISABLED) - -/** - * seed option description: - */ -/** Descriptive text for the seed option */ -#define SEED_DESC (certtool_opt_strs+3067) -/** Upper-cased name for the seed option */ -#define SEED_NAME (certtool_opt_strs+3128) -/** Name string for the seed option */ -#define SEED_name (certtool_opt_strs+3133) -/** Compiled in flag settings for the seed option */ -#define SEED_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * crl_options option description: - */ -/** crl_options option separation text */ -#define CRL_OPTIONS_DESC (certtool_opt_strs+3138) -#define CRL_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * crl-info option description: - */ -/** Descriptive text for the crl-info option */ -#define CRL_INFO_DESC (certtool_opt_strs+3159) -/** Upper-cased name for the crl-info option */ -#define CRL_INFO_NAME (certtool_opt_strs+3204) -/** Name string for the crl-info option */ -#define CRL_INFO_name (certtool_opt_strs+3213) -/** Compiled in flag settings for the crl-info option */ -#define CRL_INFO_FLAGS (OPTST_DISABLED) - -/** - * generate-crl option description: - */ -/** Descriptive text for the generate-crl option */ -#define GENERATE_CRL_DESC (certtool_opt_strs+3222) -/** Upper-cased name for the generate-crl option */ -#define GENERATE_CRL_NAME (certtool_opt_strs+3237) -/** Name string for the generate-crl option */ -#define GENERATE_CRL_name (certtool_opt_strs+3250) -/** Compiled in flag settings for the generate-crl option */ -#define GENERATE_CRL_FLAGS (OPTST_DISABLED) - -/** - * verify-crl option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the verify-crl option */ -#define VERIFY_CRL_DESC (certtool_opt_strs+3263) -/** Upper-cased name for the verify-crl option */ -#define VERIFY_CRL_NAME (certtool_opt_strs+3321) -/** Name string for the verify-crl option */ -#define VERIFY_CRL_name (certtool_opt_strs+3332) -/** Other options that are required by the verify-crl option */ -static int const aVerify_CrlMustList[] = { - INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT }; -/** Compiled in flag settings for the verify-crl option */ -#define VERIFY_CRL_FLAGS (OPTST_DISABLED) - -/** - * cert_verify_options option description: - */ -/** cert_verify_options option separation text */ -#define CERT_VERIFY_OPTIONS_DESC (certtool_opt_strs+3343) -#define CERT_VERIFY_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * verify-chain option description: - */ -/** Descriptive text for the verify-chain option */ -#define VERIFY_CHAIN_DESC (certtool_opt_strs+3385) -/** Upper-cased name for the verify-chain option */ -#define VERIFY_CHAIN_NAME (certtool_opt_strs+3424) -/** Name string for the verify-chain option */ -#define VERIFY_CHAIN_name (certtool_opt_strs+3437) -/** Compiled in flag settings for the verify-chain option */ -#define VERIFY_CHAIN_FLAGS (OPTST_DISABLED) - -/** - * verify option description: - */ -/** Descriptive text for the verify option */ -#define VERIFY_DESC (certtool_opt_strs+3450) -/** Upper-cased name for the verify option */ -#define VERIFY_NAME (certtool_opt_strs+3513) -/** Name string for the verify option */ -#define VERIFY_name (certtool_opt_strs+3520) -/** Compiled in flag settings for the verify option */ -#define VERIFY_FLAGS (OPTST_DISABLED) - -/** - * verify-hostname option description: - */ -/** Descriptive text for the verify-hostname option */ -#define VERIFY_HOSTNAME_DESC (certtool_opt_strs+3527) -/** Upper-cased name for the verify-hostname option */ -#define VERIFY_HOSTNAME_NAME (certtool_opt_strs+3592) -/** Name string for the verify-hostname option */ -#define VERIFY_HOSTNAME_name (certtool_opt_strs+3608) -/** Compiled in flag settings for the verify-hostname option */ -#define VERIFY_HOSTNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * verify-email option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the verify-email option */ -#define VERIFY_EMAIL_DESC (certtool_opt_strs+3624) -/** Upper-cased name for the verify-email option */ -#define VERIFY_EMAIL_NAME (certtool_opt_strs+3686) -/** Name string for the verify-email option */ -#define VERIFY_EMAIL_name (certtool_opt_strs+3699) -/** Other options that appear in conjunction with the verify-email option */ -static int const aVerify_EmailCantList[] = { - INDEX_OPT_VERIFY_HOSTNAME, NO_EQUIVALENT }; -/** Compiled in flag settings for the verify-email option */ -#define VERIFY_EMAIL_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * verify-purpose option description: - */ -/** Descriptive text for the verify-purpose option */ -#define VERIFY_PURPOSE_DESC (certtool_opt_strs+3712) -/** Upper-cased name for the verify-purpose option */ -#define VERIFY_PURPOSE_NAME (certtool_opt_strs+3780) -/** Name string for the verify-purpose option */ -#define VERIFY_PURPOSE_name (certtool_opt_strs+3795) -/** Compiled in flag settings for the verify-purpose option */ -#define VERIFY_PURPOSE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * verify-allow-broken option description: - */ -/** Descriptive text for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_DESC (certtool_opt_strs+3810) -/** Upper-cased name for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_NAME (certtool_opt_strs+3864) -/** Name string for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_name (certtool_opt_strs+3884) -/** Compiled in flag settings for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_FLAGS (OPTST_DISABLED) - -/** - * pkcs7_options option description: - */ -/** pkcs7_options option separation text */ -#define PKCS7_OPTIONS_DESC (certtool_opt_strs+3904) -#define PKCS7_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * p7-generate option description: - */ -/** Descriptive text for the p7-generate option */ -#define P7_GENERATE_DESC (certtool_opt_strs+3930) -/** Upper-cased name for the p7-generate option */ -#define P7_GENERATE_NAME (certtool_opt_strs+3959) -/** Name string for the p7-generate option */ -#define P7_GENERATE_name (certtool_opt_strs+3971) -/** Compiled in flag settings for the p7-generate option */ -#define P7_GENERATE_FLAGS (OPTST_DISABLED) - -/** - * p7-sign option description: - */ -/** Descriptive text for the p7-sign option */ -#define P7_SIGN_DESC (certtool_opt_strs+3983) -/** Upper-cased name for the p7-sign option */ -#define P7_SIGN_NAME (certtool_opt_strs+4015) -/** Name string for the p7-sign option */ -#define P7_SIGN_name (certtool_opt_strs+4023) -/** Compiled in flag settings for the p7-sign option */ -#define P7_SIGN_FLAGS (OPTST_DISABLED) - -/** - * p7-detached-sign option description: - */ -/** Descriptive text for the p7-detached-sign option */ -#define P7_DETACHED_SIGN_DESC (certtool_opt_strs+4031) -/** Upper-cased name for the p7-detached-sign option */ -#define P7_DETACHED_SIGN_NAME (certtool_opt_strs+4072) -/** Name string for the p7-detached-sign option */ -#define P7_DETACHED_SIGN_name (certtool_opt_strs+4089) -/** Compiled in flag settings for the p7-detached-sign option */ -#define P7_DETACHED_SIGN_FLAGS (OPTST_DISABLED) - -/** - * p7-include-cert option description: - */ -/** Descriptive text for the p7-include-cert option */ -#define P7_INCLUDE_CERT_DESC (certtool_opt_strs+4106) -/** Upper-cased name for the p7-include-cert option */ -#define P7_INCLUDE_CERT_NAME (certtool_opt_strs+4166) -/** disablement name for the p7-include-cert option */ -#define NOT_P7_INCLUDE_CERT_name (certtool_opt_strs+4182) -/** disablement prefix for the p7-include-cert option */ -#define NOT_P7_INCLUDE_CERT_PFX (certtool_opt_strs+4201) -/** Name string for the p7-include-cert option */ -#define P7_INCLUDE_CERT_name (NOT_P7_INCLUDE_CERT_name + 3) -/** Compiled in flag settings for the p7-include-cert option */ -#define P7_INCLUDE_CERT_FLAGS (OPTST_INITENABLED) - -/** - * p7-time option description: - */ -/** Descriptive text for the p7-time option */ -#define P7_TIME_DESC (certtool_opt_strs+4204) -/** Upper-cased name for the p7-time option */ -#define P7_TIME_NAME (certtool_opt_strs+4254) -/** disablement name for the p7-time option */ -#define NOT_P7_TIME_name (certtool_opt_strs+4262) -/** disablement prefix for the p7-time option */ -#define NOT_P7_TIME_PFX (certtool_opt_strs+4201) -/** Name string for the p7-time option */ -#define P7_TIME_name (NOT_P7_TIME_name + 3) -/** Compiled in flag settings for the p7-time option */ -#define P7_TIME_FLAGS (OPTST_DISABLED) - -/** - * p7-show-data option description: - */ -/** Descriptive text for the p7-show-data option */ -#define P7_SHOW_DATA_DESC (certtool_opt_strs+4273) -/** Upper-cased name for the p7-show-data option */ -#define P7_SHOW_DATA_NAME (certtool_opt_strs+4326) -/** disablement name for the p7-show-data option */ -#define NOT_P7_SHOW_DATA_name (certtool_opt_strs+4339) -/** disablement prefix for the p7-show-data option */ -#define NOT_P7_SHOW_DATA_PFX (certtool_opt_strs+4201) -/** Name string for the p7-show-data option */ -#define P7_SHOW_DATA_name (NOT_P7_SHOW_DATA_name + 3) -/** Compiled in flag settings for the p7-show-data option */ -#define P7_SHOW_DATA_FLAGS (OPTST_DISABLED) - -/** - * p7-info option description: - */ -/** Descriptive text for the p7-info option */ -#define P7_INFO_DESC (certtool_opt_strs+4355) -/** Upper-cased name for the p7-info option */ -#define P7_INFO_NAME (certtool_opt_strs+4396) -/** Name string for the p7-info option */ -#define P7_INFO_name (certtool_opt_strs+4404) -/** Compiled in flag settings for the p7-info option */ -#define P7_INFO_FLAGS (OPTST_DISABLED) - -/** - * p7-verify option description: - */ -/** Descriptive text for the p7-verify option */ -#define P7_VERIFY_DESC (certtool_opt_strs+4412) -/** Upper-cased name for the p7-verify option */ -#define P7_VERIFY_NAME (certtool_opt_strs+4450) -/** Name string for the p7-verify option */ -#define P7_VERIFY_name (certtool_opt_strs+4460) -/** Compiled in flag settings for the p7-verify option */ -#define P7_VERIFY_FLAGS (OPTST_DISABLED) - -/** - * smime-to-p7 option description: - */ -/** Descriptive text for the smime-to-p7 option */ -#define SMIME_TO_P7_DESC (certtool_opt_strs+4470) -/** Upper-cased name for the smime-to-p7 option */ -#define SMIME_TO_P7_NAME (certtool_opt_strs+4506) -/** Name string for the smime-to-p7 option */ -#define SMIME_TO_P7_name (certtool_opt_strs+4518) -/** Compiled in flag settings for the smime-to-p7 option */ -#define SMIME_TO_P7_FLAGS (OPTST_DISABLED) - -/** - * other_options option description: - */ -/** other_options option separation text */ -#define OTHER_OPTIONS_DESC (certtool_opt_strs+4530) -#define OTHER_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * generate-dh-params option description: - */ -/** Descriptive text for the generate-dh-params option */ -#define GENERATE_DH_PARAMS_DESC (certtool_opt_strs+4545) -/** Upper-cased name for the generate-dh-params option */ -#define GENERATE_DH_PARAMS_NAME (certtool_opt_strs+4609) -/** Name string for the generate-dh-params option */ -#define GENERATE_DH_PARAMS_name (certtool_opt_strs+4628) -/** Compiled in flag settings for the generate-dh-params option */ -#define GENERATE_DH_PARAMS_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * get-dh-params option description: - */ -/** Descriptive text for the get-dh-params option */ -#define GET_DH_PARAMS_DESC (certtool_opt_strs+4647) -/** Upper-cased name for the get-dh-params option */ -#define GET_DH_PARAMS_NAME (certtool_opt_strs+4707) -/** Name string for the get-dh-params option */ -#define GET_DH_PARAMS_name (certtool_opt_strs+4721) -/** Compiled in flag settings for the get-dh-params option */ -#define GET_DH_PARAMS_FLAGS (OPTST_DISABLED) - -/** - * dh-info option description: - */ -/** Descriptive text for the dh-info option */ -#define DH_INFO_DESC (certtool_opt_strs+4735) -/** Upper-cased name for the dh-info option */ -#define DH_INFO_NAME (certtool_opt_strs+4795) -/** Name string for the dh-info option */ -#define DH_INFO_name (certtool_opt_strs+4803) -/** Compiled in flag settings for the dh-info option */ -#define DH_INFO_FLAGS (OPTST_DISABLED) - -/** - * load-privkey option description: - */ -/** Descriptive text for the load-privkey option */ -#define LOAD_PRIVKEY_DESC (certtool_opt_strs+4811) -/** Upper-cased name for the load-privkey option */ -#define LOAD_PRIVKEY_NAME (certtool_opt_strs+4836) -/** Name string for the load-privkey option */ -#define LOAD_PRIVKEY_name (certtool_opt_strs+4849) -/** Compiled in flag settings for the load-privkey option */ -#define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-pubkey option description: - */ -/** Descriptive text for the load-pubkey option */ -#define LOAD_PUBKEY_DESC (certtool_opt_strs+4862) -/** Upper-cased name for the load-pubkey option */ -#define LOAD_PUBKEY_NAME (certtool_opt_strs+4886) -/** Name string for the load-pubkey option */ -#define LOAD_PUBKEY_name (certtool_opt_strs+4898) -/** Compiled in flag settings for the load-pubkey option */ -#define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-request option description: - */ -/** Descriptive text for the load-request option */ -#define LOAD_REQUEST_DESC (certtool_opt_strs+4910) -/** Upper-cased name for the load-request option */ -#define LOAD_REQUEST_NAME (certtool_opt_strs+4943) -/** Name string for the load-request option */ -#define LOAD_REQUEST_name (certtool_opt_strs+4956) -/** Compiled in flag settings for the load-request option */ -#define LOAD_REQUEST_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-certificate option description: - */ -/** Descriptive text for the load-certificate option */ -#define LOAD_CERTIFICATE_DESC (certtool_opt_strs+4969) -/** Upper-cased name for the load-certificate option */ -#define LOAD_CERTIFICATE_NAME (certtool_opt_strs+4994) -/** Name string for the load-certificate option */ -#define LOAD_CERTIFICATE_name (certtool_opt_strs+5011) -/** Compiled in flag settings for the load-certificate option */ -#define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-ca-privkey option description: - */ -/** Descriptive text for the load-ca-privkey option */ -#define LOAD_CA_PRIVKEY_DESC (certtool_opt_strs+5028) -/** Upper-cased name for the load-ca-privkey option */ -#define LOAD_CA_PRIVKEY_NAME (certtool_opt_strs+5079) -/** Name string for the load-ca-privkey option */ -#define LOAD_CA_PRIVKEY_name (certtool_opt_strs+5095) -/** Compiled in flag settings for the load-ca-privkey option */ -#define LOAD_CA_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-ca-certificate option description: - */ -/** Descriptive text for the load-ca-certificate option */ -#define LOAD_CA_CERTIFICATE_DESC (certtool_opt_strs+5111) -/** Upper-cased name for the load-ca-certificate option */ -#define LOAD_CA_CERTIFICATE_NAME (certtool_opt_strs+5162) -/** Name string for the load-ca-certificate option */ -#define LOAD_CA_CERTIFICATE_name (certtool_opt_strs+5182) -/** Compiled in flag settings for the load-ca-certificate option */ -#define LOAD_CA_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-crl option description: - */ -/** Descriptive text for the load-crl option */ -#define LOAD_CRL_DESC (certtool_opt_strs+5202) -/** Upper-cased name for the load-crl option */ -#define LOAD_CRL_NAME (certtool_opt_strs+5225) -/** Name string for the load-crl option */ -#define LOAD_CRL_name (certtool_opt_strs+5234) -/** Compiled in flag settings for the load-crl option */ -#define LOAD_CRL_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-data option description: - */ -/** Descriptive text for the load-data option */ -#define LOAD_DATA_DESC (certtool_opt_strs+5243) -/** Upper-cased name for the load-data option */ -#define LOAD_DATA_NAME (certtool_opt_strs+5264) -/** Name string for the load-data option */ -#define LOAD_DATA_name (certtool_opt_strs+5274) -/** Compiled in flag settings for the load-data option */ -#define LOAD_DATA_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * password option description: - */ -/** Descriptive text for the password option */ -#define PASSWORD_DESC (certtool_opt_strs+5284) -/** Upper-cased name for the password option */ -#define PASSWORD_NAME (certtool_opt_strs+5300) -/** Name string for the password option */ -#define PASSWORD_name (certtool_opt_strs+5309) -/** Compiled in flag settings for the password option */ -#define PASSWORD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * null-password option description: - */ -/** Descriptive text for the null-password option */ -#define NULL_PASSWORD_DESC (certtool_opt_strs+5318) -/** Upper-cased name for the null-password option */ -#define NULL_PASSWORD_NAME (certtool_opt_strs+5342) -/** Name string for the null-password option */ -#define NULL_PASSWORD_name (certtool_opt_strs+5356) -/** Compiled in flag settings for the null-password option */ -#define NULL_PASSWORD_FLAGS (OPTST_DISABLED) - -/** - * empty-password option description: - */ -/** Descriptive text for the empty-password option */ -#define EMPTY_PASSWORD_DESC (certtool_opt_strs+5370) -/** Upper-cased name for the empty-password option */ -#define EMPTY_PASSWORD_NAME (certtool_opt_strs+5396) -/** Name string for the empty-password option */ -#define EMPTY_PASSWORD_name (certtool_opt_strs+5411) -/** Compiled in flag settings for the empty-password option */ -#define EMPTY_PASSWORD_FLAGS (OPTST_DISABLED) - -/** - * hex-numbers option description: - */ -/** Descriptive text for the hex-numbers option */ -#define HEX_NUMBERS_DESC (certtool_opt_strs+5426) -/** Upper-cased name for the hex-numbers option */ -#define HEX_NUMBERS_NAME (certtool_opt_strs+5472) -/** Name string for the hex-numbers option */ -#define HEX_NUMBERS_name (certtool_opt_strs+5484) -/** Compiled in flag settings for the hex-numbers option */ -#define HEX_NUMBERS_FLAGS (OPTST_DISABLED) - -/** - * cprint option description: - */ -/** Descriptive text for the cprint option */ -#define CPRINT_DESC (certtool_opt_strs+5496) -/** Upper-cased name for the cprint option */ -#define CPRINT_NAME (certtool_opt_strs+5565) -/** Name string for the cprint option */ -#define CPRINT_name (certtool_opt_strs+5572) -/** Compiled in flag settings for the cprint option */ -#define CPRINT_FLAGS (OPTST_DISABLED) - -/** - * rsa option description: - */ -/** Descriptive text for the rsa option */ -#define RSA_DESC (certtool_opt_strs+5579) -/** Upper-cased name for the rsa option */ -#define RSA_NAME (certtool_opt_strs+5609) -/** Name string for the rsa option */ -#define RSA_name (certtool_opt_strs+5613) -/** Compiled in flag settings for the rsa option */ -#define RSA_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * dsa option description: - */ -/** Descriptive text for the dsa option */ -#define DSA_DESC (certtool_opt_strs+5617) -/** Upper-cased name for the dsa option */ -#define DSA_NAME (certtool_opt_strs+5647) -/** Name string for the dsa option */ -#define DSA_name (certtool_opt_strs+5651) -/** Compiled in flag settings for the dsa option */ -#define DSA_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * ecc option description: - */ -/** Descriptive text for the ecc option */ -#define ECC_DESC (certtool_opt_strs+5655) -/** Upper-cased name for the ecc option */ -#define ECC_NAME (certtool_opt_strs+5693) -/** Name string for the ecc option */ -#define ECC_name (certtool_opt_strs+5697) -/** Compiled in flag settings for the ecc option */ -#define ECC_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * ecdsa option description: - */ -/** Descriptive text for the ecdsa option */ -#define ECDSA_DESC (certtool_opt_strs+5701) -#define ECDSA_NAME NULL -/** Unmodified name string for the ecdsa option */ -#define ECDSA_name (certtool_opt_strs+5744) -/** Compiled in flag settings for the ecdsa option */ -#define ECDSA_FLAGS (ECC_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/** - * hash option description: - */ -/** Descriptive text for the hash option */ -#define HASH_DESC (certtool_opt_strs+5750) -/** Upper-cased name for the hash option */ -#define HASH_NAME (certtool_opt_strs+5784) -/** Name string for the hash option */ -#define HASH_name (certtool_opt_strs+5789) -/** Compiled in flag settings for the hash option */ -#define HASH_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * salt-size option description: - */ -/** Descriptive text for the salt-size option */ -#define SALT_SIZE_DESC (certtool_opt_strs+5794) -/** Upper-cased name for the salt-size option */ -#define SALT_SIZE_NAME (certtool_opt_strs+5836) -/** Name string for the salt-size option */ -#define SALT_SIZE_name (certtool_opt_strs+5846) -/** Compiled in flag settings for the salt-size option */ -#define SALT_SIZE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (certtool_opt_strs+5856) -/** Upper-cased name for the inder option */ -#define INDER_NAME (certtool_opt_strs+5927) -/** disablement name for the inder option */ -#define NOT_INDER_name (certtool_opt_strs+5933) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (certtool_opt_strs+4201) -/** 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 (certtool_opt_strs+5942) -#define INRAW_NAME NULL -/** Unmodified name string for the inraw option */ -#define INRAW_name (certtool_opt_strs+5974) -/** Compiled in flag settings for the inraw option */ -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/** - * outder option description: - */ -/** Descriptive text for the outder option */ -#define OUTDER_DESC (certtool_opt_strs+5980) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (certtool_opt_strs+6052) -/** disablement name for the outder option */ -#define NOT_OUTDER_name (certtool_opt_strs+6059) -/** disablement prefix for the outder option */ -#define NOT_OUTDER_PFX (certtool_opt_strs+4201) -/** 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) - -/** - * outraw option description: - */ -/** Descriptive text for the outraw option */ -#define OUTRAW_DESC (certtool_opt_strs+6069) -#define OUTRAW_NAME NULL -/** Unmodified name string for the outraw option */ -#define OUTRAW_name (certtool_opt_strs+6102) -/** Compiled in flag settings for the outraw option */ -#define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS) - -/** - * disable-quick-random option description: - */ -/** Descriptive text for the disable-quick-random option */ -#define DISABLE_QUICK_RANDOM_DESC (certtool_opt_strs+6109) -/** Upper-cased name for the disable-quick-random option */ -#define DISABLE_QUICK_RANDOM_NAME (certtool_opt_strs+6132) -/** Name string for the disable-quick-random option */ -#define DISABLE_QUICK_RANDOM_name (certtool_opt_strs+6153) -/** Compiled in flag settings for the disable-quick-random option */ -#define DISABLE_QUICK_RANDOM_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * template option description: - */ -/** Descriptive text for the template option */ -#define TEMPLATE_DESC (certtool_opt_strs+6174) -/** Upper-cased name for the template option */ -#define TEMPLATE_NAME (certtool_opt_strs+6225) -/** Name string for the template option */ -#define TEMPLATE_name (certtool_opt_strs+6234) -/** Compiled in flag settings for the template option */ -#define TEMPLATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * stdout-info option description: - */ -/** Descriptive text for the stdout-info option */ -#define STDOUT_INFO_DESC (certtool_opt_strs+6243) -/** Upper-cased name for the stdout-info option */ -#define STDOUT_INFO_NAME (certtool_opt_strs+6289) -/** Name string for the stdout-info option */ -#define STDOUT_INFO_name (certtool_opt_strs+6301) -/** Compiled in flag settings for the stdout-info option */ -#define STDOUT_INFO_FLAGS (OPTST_DISABLED) - -/** - * ask-pass option description: - */ -/** Descriptive text for the ask-pass option */ -#define ASK_PASS_DESC (certtool_opt_strs+6313) -/** Upper-cased name for the ask-pass option */ -#define ASK_PASS_NAME (certtool_opt_strs+6374) -/** Name string for the ask-pass option */ -#define ASK_PASS_name (certtool_opt_strs+6383) -/** Compiled in flag settings for the ask-pass option */ -#define ASK_PASS_FLAGS (OPTST_DISABLED) - -/** - * pkcs-cipher option description: - */ -/** Descriptive text for the pkcs-cipher option */ -#define PKCS_CIPHER_DESC (certtool_opt_strs+6392) -/** Upper-cased name for the pkcs-cipher option */ -#define PKCS_CIPHER_NAME (certtool_opt_strs+6437) -/** Name string for the pkcs-cipher option */ -#define PKCS_CIPHER_name (certtool_opt_strs+6449) -/** Compiled in flag settings for the pkcs-cipher option */ -#define PKCS_CIPHER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * provider option description: - */ -/** Descriptive text for the provider option */ -#define PROVIDER_DESC (certtool_opt_strs+6461) -/** Upper-cased name for the provider option */ -#define PROVIDER_NAME (certtool_opt_strs+6499) -/** Name string for the provider option */ -#define PROVIDER_name (certtool_opt_strs+6508) -/** Compiled in flag settings for the provider option */ -#define PROVIDER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (certtool_opt_strs+6517) -#define HELP_name (certtool_opt_strs+6561) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (certtool_opt_strs+6566) -#define MORE_HELP_name (certtool_opt_strs+6611) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+6621) -#define VER_name (certtool_opt_strs+6657) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptEcdsa, doOptInfile, doOptInraw, doOptOutraw, - 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ CERT_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CERT_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_CERTIFICATE_INFO, - /* equiv idx, value */ 5, 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 */ 6, VALUE_OPT_PUBKEY_INFO, - /* equiv idx, value */ 6, 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 */ 7, VALUE_OPT_GENERATE_SELF_SIGNED, - /* equiv idx, value */ 7, 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 */ 8, VALUE_OPT_GENERATE_CERTIFICATE, - /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_GENERATE_PROXY, - /* equiv idx, value */ 9, 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 */ 10, VALUE_OPT_UPDATE_CERTIFICATE, - /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_FINGERPRINT, - /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_KEY_ID, - /* equiv idx, value */ 12, VALUE_OPT_KEY_ID, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ KEY_ID_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --key-id */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ KEY_ID_DESC, KEY_ID_NAME, KEY_ID_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_CERTIFICATE_PUBKEY, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_V1, - /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_SIGN_PARAMS, - /* equiv idx, value */ 15, VALUE_OPT_SIGN_PARAMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SIGN_PARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sign-params */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SIGN_PARAMS_DESC, SIGN_PARAMS_NAME, SIGN_PARAMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ CRQ_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CRQ_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_CRQ_INFO, - /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_GENERATE_REQUEST, - /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_NO_CRQ_EXTENSIONS, - /* equiv idx, value */ 19, 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ PKCS12_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PKCS12_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_P12_INFO, - /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_P12_NAME, - /* equiv idx, value */ 22, VALUE_OPT_P12_NAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P12_NAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p12-name */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P12_NAME_DESC, P12_NAME_NAME, P12_NAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_TO_P12, - /* equiv idx, value */ 23, 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 */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TO_P12_DESC, TO_P12_NAME, TO_P12_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ KEY_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ KEY_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_KEY_INFO, - /* equiv idx, value */ 25, 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 */ 26, VALUE_OPT_P8_INFO, - /* equiv idx, value */ 26, VALUE_OPT_P8_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P8_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p8-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P8_INFO_DESC, P8_INFO_NAME, P8_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_TO_RSA, - /* equiv idx, value */ 27, VALUE_OPT_TO_RSA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TO_RSA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --to-rsa */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TO_RSA_DESC, TO_RSA_NAME, TO_RSA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_GENERATE_PRIVKEY, - /* equiv idx, value */ 28, 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 */ 29, VALUE_OPT_KEY_TYPE, - /* equiv idx, value */ 29, VALUE_OPT_KEY_TYPE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ KEY_TYPE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --key-type */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ KEY_TYPE_DESC, KEY_TYPE_NAME, KEY_TYPE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 30, VALUE_OPT_BITS, - /* equiv idx, value */ 30, 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 */ 31, VALUE_OPT_CURVE, - /* equiv idx, value */ 31, VALUE_OPT_CURVE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CURVE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --curve */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CURVE_DESC, CURVE_NAME, CURVE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 32, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 32, 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 */ 33, VALUE_OPT_TO_P8, - /* equiv idx, value */ 33, 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 */ 34, VALUE_OPT_PKCS8, - /* equiv idx, value */ 34, 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 */ 35, VALUE_OPT_PROVABLE, - /* equiv idx, value */ 35, VALUE_OPT_PROVABLE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PROVABLE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --provable */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PROVABLE_DESC, PROVABLE_NAME, PROVABLE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 36, VALUE_OPT_VERIFY_PROVABLE_PRIVKEY, - /* equiv idx, value */ 36, VALUE_OPT_VERIFY_PROVABLE_PRIVKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_PROVABLE_PRIVKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-provable-privkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_PROVABLE_PRIVKEY_DESC, VERIFY_PROVABLE_PRIVKEY_NAME, VERIFY_PROVABLE_PRIVKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 37, VALUE_OPT_SEED, - /* equiv idx, value */ 37, VALUE_OPT_SEED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SEED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --seed */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SEED_DESC, SEED_NAME, SEED_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ CRL_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CRL_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 39, VALUE_OPT_CRL_INFO, - /* equiv idx, value */ 39, 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 */ 40, VALUE_OPT_GENERATE_CRL, - /* equiv idx, value */ 40, 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 */ 41, VALUE_OPT_VERIFY_CRL, - /* equiv idx, value */ 41, 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ CERT_VERIFY_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CERT_VERIFY_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 43, VALUE_OPT_VERIFY_CHAIN, - /* equiv idx, value */ 43, 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 */ 44, VALUE_OPT_VERIFY, - /* equiv idx, value */ 44, 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 */ 45, VALUE_OPT_VERIFY_HOSTNAME, - /* equiv idx, value */ 45, VALUE_OPT_VERIFY_HOSTNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_HOSTNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-hostname */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_HOSTNAME_DESC, VERIFY_HOSTNAME_NAME, VERIFY_HOSTNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 46, VALUE_OPT_VERIFY_EMAIL, - /* equiv idx, value */ 46, VALUE_OPT_VERIFY_EMAIL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_EMAIL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-email */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aVerify_EmailCantList, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_EMAIL_DESC, VERIFY_EMAIL_NAME, VERIFY_EMAIL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 47, VALUE_OPT_VERIFY_PURPOSE, - /* equiv idx, value */ 47, VALUE_OPT_VERIFY_PURPOSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_PURPOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-purpose */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_PURPOSE_DESC, VERIFY_PURPOSE_NAME, VERIFY_PURPOSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 48, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equiv idx, value */ 48, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_ALLOW_BROKEN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-allow-broken */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_ALLOW_BROKEN_DESC, VERIFY_ALLOW_BROKEN_NAME, VERIFY_ALLOW_BROKEN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ PKCS7_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PKCS7_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 50, VALUE_OPT_P7_GENERATE, - /* equiv idx, value */ 50, VALUE_OPT_P7_GENERATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_GENERATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-generate */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_GENERATE_DESC, P7_GENERATE_NAME, P7_GENERATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 51, VALUE_OPT_P7_SIGN, - /* equiv idx, value */ 51, VALUE_OPT_P7_SIGN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_SIGN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-sign */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_SIGN_DESC, P7_SIGN_NAME, P7_SIGN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 52, VALUE_OPT_P7_DETACHED_SIGN, - /* equiv idx, value */ 52, VALUE_OPT_P7_DETACHED_SIGN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_DETACHED_SIGN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-detached-sign */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_DETACHED_SIGN_DESC, P7_DETACHED_SIGN_NAME, P7_DETACHED_SIGN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 53, VALUE_OPT_P7_INCLUDE_CERT, - /* equiv idx, value */ 53, VALUE_OPT_P7_INCLUDE_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_INCLUDE_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-include-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_INCLUDE_CERT_DESC, P7_INCLUDE_CERT_NAME, P7_INCLUDE_CERT_name, - /* disablement strs */ NOT_P7_INCLUDE_CERT_name, NOT_P7_INCLUDE_CERT_PFX }, - - { /* entry idx, value */ 54, VALUE_OPT_P7_TIME, - /* equiv idx, value */ 54, VALUE_OPT_P7_TIME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_TIME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-time */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_TIME_DESC, P7_TIME_NAME, P7_TIME_name, - /* disablement strs */ NOT_P7_TIME_name, NOT_P7_TIME_PFX }, - - { /* entry idx, value */ 55, VALUE_OPT_P7_SHOW_DATA, - /* equiv idx, value */ 55, VALUE_OPT_P7_SHOW_DATA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_SHOW_DATA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-show-data */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_SHOW_DATA_DESC, P7_SHOW_DATA_NAME, P7_SHOW_DATA_name, - /* disablement strs */ NOT_P7_SHOW_DATA_name, NOT_P7_SHOW_DATA_PFX }, - - { /* entry idx, value */ 56, VALUE_OPT_P7_INFO, - /* equiv idx, value */ 56, 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 */ 57, VALUE_OPT_P7_VERIFY, - /* equiv idx, value */ 57, VALUE_OPT_P7_VERIFY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ P7_VERIFY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --p7-verify */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ P7_VERIFY_DESC, P7_VERIFY_NAME, P7_VERIFY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 58, VALUE_OPT_SMIME_TO_P7, - /* equiv idx, value */ 58, 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ OTHER_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OTHER_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 60, VALUE_OPT_GENERATE_DH_PARAMS, - /* equiv idx, value */ 60, 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 */ 61, VALUE_OPT_GET_DH_PARAMS, - /* equiv idx, value */ 61, 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 */ 62, VALUE_OPT_DH_INFO, - /* equiv idx, value */ 62, 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 */ 63, VALUE_OPT_LOAD_PRIVKEY, - /* equiv idx, value */ 63, 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 */ 64, VALUE_OPT_LOAD_PUBKEY, - /* equiv idx, value */ 64, 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 */ 65, VALUE_OPT_LOAD_REQUEST, - /* equiv idx, value */ 65, 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 */ NULL, - /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, LOAD_REQUEST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 66, VALUE_OPT_LOAD_CERTIFICATE, - /* equiv idx, value */ 66, 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 */ 67, VALUE_OPT_LOAD_CA_PRIVKEY, - /* equiv idx, value */ 67, 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 */ 68, VALUE_OPT_LOAD_CA_CERTIFICATE, - /* equiv idx, value */ 68, 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 */ 69, VALUE_OPT_LOAD_CRL, - /* equiv idx, value */ 69, VALUE_OPT_LOAD_CRL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CRL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-crl */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_CRL_DESC, LOAD_CRL_NAME, LOAD_CRL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 70, VALUE_OPT_LOAD_DATA, - /* equiv idx, value */ 70, VALUE_OPT_LOAD_DATA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_DATA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-data */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LOAD_DATA_DESC, LOAD_DATA_NAME, LOAD_DATA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 71, VALUE_OPT_PASSWORD, - /* equiv idx, value */ 71, 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 */ 72, VALUE_OPT_NULL_PASSWORD, - /* equiv idx, value */ 72, 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 */ 73, VALUE_OPT_EMPTY_PASSWORD, - /* equiv idx, value */ 73, VALUE_OPT_EMPTY_PASSWORD, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EMPTY_PASSWORD_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --empty-password */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ EMPTY_PASSWORD_DESC, EMPTY_PASSWORD_NAME, EMPTY_PASSWORD_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 74, VALUE_OPT_HEX_NUMBERS, - /* equiv idx, value */ 74, 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 */ 75, VALUE_OPT_CPRINT, - /* equiv idx, value */ 75, 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 */ 76, VALUE_OPT_RSA, - /* equiv idx, value */ 76, 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 */ 77, VALUE_OPT_DSA, - /* equiv idx, value */ 77, 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 */ 78, VALUE_OPT_ECC, - /* equiv idx, value */ 78, 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 */ 79, VALUE_OPT_ECDSA, - /* equiv idx, value */ 79, 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 */ 80, VALUE_OPT_HASH, - /* equiv idx, value */ 80, 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 */ 81, VALUE_OPT_SALT_SIZE, - /* equiv idx, value */ 81, VALUE_OPT_SALT_SIZE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SALT_SIZE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --salt-size */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionNumericVal, - /* desc, NAME, name */ SALT_SIZE_DESC, SALT_SIZE_NAME, SALT_SIZE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 82, VALUE_OPT_INDER, - /* equiv idx, value */ 82, 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 */ 83, VALUE_OPT_INRAW, - /* equiv idx, value */ 83, 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 */ 84, VALUE_OPT_OUTDER, - /* equiv idx, value */ 84, 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 */ 85, VALUE_OPT_OUTRAW, - /* equiv idx, value */ 85, 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 */ 86, VALUE_OPT_DISABLE_QUICK_RANDOM, - /* equiv idx, value */ 86, 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 */ 87, VALUE_OPT_TEMPLATE, - /* equiv idx, value */ 87, 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 */ NULL, - /* desc, NAME, name */ TEMPLATE_DESC, TEMPLATE_NAME, TEMPLATE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 88, VALUE_OPT_STDOUT_INFO, - /* equiv idx, value */ 88, VALUE_OPT_STDOUT_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STDOUT_INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --stdout-info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ STDOUT_INFO_DESC, STDOUT_INFO_NAME, STDOUT_INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 89, VALUE_OPT_ASK_PASS, - /* equiv idx, value */ 89, VALUE_OPT_ASK_PASS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ASK_PASS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ask-pass */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ASK_PASS_DESC, ASK_PASS_NAME, ASK_PASS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 90, VALUE_OPT_PKCS_CIPHER, - /* equiv idx, value */ 90, 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 */ 91, VALUE_OPT_PROVIDER, - /* equiv idx, value */ 91, 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 */ NULL, - /* 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, 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 certtool. */ -#define zPROGNAME (certtool_opt_strs+6665) -/** Reference to the title line for certtool usage. */ -#define zUsageTitle (certtool_opt_strs+6674) -/** There is no certtool configuration file. */ -#define zRcName NULL -/** There are no directories to search for certtool config files. */ -#define apzHomeList NULL -/** The certtool program bug email address. */ -#define zBugsAddr (certtool_opt_strs+6767) -/** Clarification/explanation of what certtool does. */ -#define zExplain (certtool_opt_strs+6783) -/** Extra detail explaining what certtool does. */ -#define zDetail (certtool_opt_strs+6785) -/** The full version string for certtool. */ -#define zFullVersion (certtool_opt_strs+7146) -/* extracted from optcode.tlib near line 364 */ - -#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+7161) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = CERTTOOL_EXIT_SUCCESS; - optionUsage(&certtoolOptions, ex_code); - /* NOTREACHED */ - exit(CERTTOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the certtool 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param[in] pOptions the certtool 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 ecdsa option. - * - * @param[in] pOptions the certtool options data structure - * @param[in,out] 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[in] pOptions the certtool 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(CERTTOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the outraw option. - * - * @param[in] pOptions the certtool options data structure - * @param[in,out] 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); - -} -/* extracted from optmain.tlib near line 1250 */ - -/** - * 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 -/** Packager information for certtool. */ -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 */ - }, - 95 /* full option count */, 92 /* user option count */, - certtool_full_usage, certtool_short_usage, - NULL, NULL, - PKGDATADIR, certtool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * certtool program. These translations happen upon entry - * to optionProcess(). - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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. - */ - char ** ppz = (char**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 certtoolOptions structure noted in the - comments below. The literal text is defined in certtool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - certtool_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 certtoolOptions.pzCopyright */ - puts(_("certtool 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n")); - - /* referenced via certtoolOptions.pzCopyNotice */ - puts(_("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")); - puts(_("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")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see <http://www.gnu.org/licenses/>.\n")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("More verbose output")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Input file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Certificate related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on the given certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on a public key")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a self-signed certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a signed certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generates a proxy certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Update a signed certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print the fingerprint of the given certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print the key ID of the given certificate")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print certificate's public key (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate an X.509 version 1 certificate (with no extensions)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Sign a certificate with a specific signature algorithm")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Certificate request related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on the given certificate request")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a PKCS #10 certificate request")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Do not use extensions in certificate requests")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("PKCS#12 file related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on a PKCS #12 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("The PKCS #12 friendly name to use")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a PKCS #12 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Private key related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on a private key")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on a PKCS #8 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Convert an RSA-PSS key to raw RSA format")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a private key")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the key type to use on key generation")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the number of bits for key generation")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the curve used for EC key generation")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the security level [low, legacy, medium, high, ultra]")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Convert a given key to a PKCS #8 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Use PKCS #8 format for private keys")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a private key or parameters from a seed using a provable method")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Verify a private key generated from a seed using a provable method")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("When generating a private key use the given hex-encoded seed")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("CRL related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on the given CRL structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a CRL")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Verify a Certificate Revocation List using a trusted list")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Certificate verification related options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Verify a PEM encoded certificate chain")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Verify a PEM encoded certificate (chain) against a trusted set")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify a hostname to be used for certificate chain verification")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify a email to be used for certificate chain verification")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify a purpose OID to be used for certificate chain verification")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Allow broken algorithms, such as MD5 for verification")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("PKCS#7 structure options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate a PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Signs using a PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Signs using a detached PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("The signer's certificate will be included in the cert list.")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Will include a timestamp in the PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Will show the embedded data in the PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information on a PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Verify the provided PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Convert S/MIME to PKCS #7 structure")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Other options:")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate PKCS #3 encoded Diffie-Hellman parameters (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("List the included PKCS #3 encoded Diffie-Hellman parameters")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information PKCS #3 encoded Diffie-Hellman parameters")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads a private key file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads a public key file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads a certificate request file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads a certificate file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads the certificate authority's private key file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads the certificate authority's certificate file")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads the provided CRL")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Loads auxiliary data")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Password to use")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Enforce a NULL password")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Enforce an empty password")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print big number in an easier format to parse")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("In certain operations it prints the information in C-friendly format")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate RSA key (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate DSA key (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Generate ECC (ECDSA) key (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'ecc' option (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Hash algorithm to use for signing")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the RSA-PSS key default salt size")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Use DER format for input certificates, private keys, and DH parameters")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'inder' option")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Use DER format for output certificates, private keys, and DH parameters")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'outder' option")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("No effect (deprecated)")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Template file to use for non-interactive operation")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Print information to stdout instead of stderr")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Enable interaction for entering password when in batch mode.")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Cipher to use for PKCS #8 and #12 operations")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("Specify the PKCS #11 provider library")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via certtoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via certtoolOptions.pzUsageTitle */ - puts(_("certtool - GnuTLS certificate tool\n\ -Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); - - /* referenced via certtoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via certtoolOptions.pzDetail */ - puts(_("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\n")); - puts(_("The tool accepts files or supported URIs via the --infile option. In case\n\ -PIN is required for URI access you can provide it using the environment\n\ -variables GNUTLS_PIN and GNUTLS_SO_PIN.\n")); - - /* referenced via certtoolOptions.pzFullVersion */ - puts(_("certtool 3.6.4")); - - /* referenced via certtoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via certtoolOptions.pzShortUsage */ - puts(_("certtool [options]\n\ -certtool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* certtool-args.c ends here */ diff --git a/src/certtool-args.h.bak b/src/certtool-args.h.bak deleted file mode 100644 index d84edec4f5..0000000000 --- a/src/certtool-args.h.bak +++ /dev/null @@ -1,383 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (certtool-args.h) - * - * It has been AutoGen-ed - * From the definitions certtool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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 certtool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_INFILE = 2, - INDEX_OPT_OUTFILE = 3, - INDEX_OPT_CERTIFICATE_INFO = 5, - INDEX_OPT_PUBKEY_INFO = 6, - INDEX_OPT_GENERATE_SELF_SIGNED = 7, - INDEX_OPT_GENERATE_CERTIFICATE = 8, - INDEX_OPT_GENERATE_PROXY = 9, - INDEX_OPT_UPDATE_CERTIFICATE = 10, - INDEX_OPT_FINGERPRINT = 11, - INDEX_OPT_KEY_ID = 12, - INDEX_OPT_CERTIFICATE_PUBKEY = 13, - INDEX_OPT_V1 = 14, - INDEX_OPT_SIGN_PARAMS = 15, - INDEX_OPT_CRQ_INFO = 17, - INDEX_OPT_GENERATE_REQUEST = 18, - INDEX_OPT_NO_CRQ_EXTENSIONS = 19, - INDEX_OPT_P12_INFO = 21, - INDEX_OPT_P12_NAME = 22, - INDEX_OPT_TO_P12 = 23, - INDEX_OPT_KEY_INFO = 25, - INDEX_OPT_P8_INFO = 26, - INDEX_OPT_TO_RSA = 27, - INDEX_OPT_GENERATE_PRIVKEY = 28, - INDEX_OPT_KEY_TYPE = 29, - INDEX_OPT_BITS = 30, - INDEX_OPT_CURVE = 31, - INDEX_OPT_SEC_PARAM = 32, - INDEX_OPT_TO_P8 = 33, - INDEX_OPT_PKCS8 = 34, - INDEX_OPT_PROVABLE = 35, - INDEX_OPT_VERIFY_PROVABLE_PRIVKEY = 36, - INDEX_OPT_SEED = 37, - INDEX_OPT_CRL_INFO = 39, - INDEX_OPT_GENERATE_CRL = 40, - INDEX_OPT_VERIFY_CRL = 41, - INDEX_OPT_VERIFY_CHAIN = 43, - INDEX_OPT_VERIFY = 44, - INDEX_OPT_VERIFY_HOSTNAME = 45, - INDEX_OPT_VERIFY_EMAIL = 46, - INDEX_OPT_VERIFY_PURPOSE = 47, - INDEX_OPT_VERIFY_ALLOW_BROKEN = 48, - INDEX_OPT_P7_GENERATE = 50, - INDEX_OPT_P7_SIGN = 51, - INDEX_OPT_P7_DETACHED_SIGN = 52, - INDEX_OPT_P7_INCLUDE_CERT = 53, - INDEX_OPT_P7_TIME = 54, - INDEX_OPT_P7_SHOW_DATA = 55, - INDEX_OPT_P7_INFO = 56, - INDEX_OPT_P7_VERIFY = 57, - INDEX_OPT_SMIME_TO_P7 = 58, - INDEX_OPT_GENERATE_DH_PARAMS = 60, - INDEX_OPT_GET_DH_PARAMS = 61, - INDEX_OPT_DH_INFO = 62, - INDEX_OPT_LOAD_PRIVKEY = 63, - INDEX_OPT_LOAD_PUBKEY = 64, - INDEX_OPT_LOAD_REQUEST = 65, - INDEX_OPT_LOAD_CERTIFICATE = 66, - INDEX_OPT_LOAD_CA_PRIVKEY = 67, - INDEX_OPT_LOAD_CA_CERTIFICATE = 68, - INDEX_OPT_LOAD_CRL = 69, - INDEX_OPT_LOAD_DATA = 70, - INDEX_OPT_PASSWORD = 71, - INDEX_OPT_NULL_PASSWORD = 72, - INDEX_OPT_EMPTY_PASSWORD = 73, - INDEX_OPT_HEX_NUMBERS = 74, - INDEX_OPT_CPRINT = 75, - INDEX_OPT_RSA = 76, - INDEX_OPT_DSA = 77, - INDEX_OPT_ECC = 78, - INDEX_OPT_ECDSA = 79, - INDEX_OPT_HASH = 80, - INDEX_OPT_SALT_SIZE = 81, - INDEX_OPT_INDER = 82, - INDEX_OPT_INRAW = 83, - INDEX_OPT_OUTDER = 84, - INDEX_OPT_OUTRAW = 85, - INDEX_OPT_DISABLE_QUICK_RANDOM = 86, - INDEX_OPT_TEMPLATE = 87, - INDEX_OPT_STDOUT_INFO = 88, - INDEX_OPT_ASK_PASS = 89, - INDEX_OPT_PKCS_CIPHER = 90, - INDEX_OPT_PROVIDER = 91, - INDEX_OPT_VERSION = 92, - INDEX_OPT_HELP = 93, - INDEX_OPT_MORE_HELP = 94 -} teOptIndex; -/** count of all options for certtool */ -#define OPTION_CT 95 -/** certtool version */ -#define CERTTOOL_VERSION "3.6.4" -/** Full certtool version text */ -#define CERTTOOL_FULL_VERSION "certtool 3.6.4" - -/** - * 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]) -/** '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 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 0x1001 -#define VALUE_OPT_OUTFILE 0x1002 -#define VALUE_OPT_CERTIFICATE_INFO 'i' -#define VALUE_OPT_PUBKEY_INFO 0x1003 -#define VALUE_OPT_GENERATE_SELF_SIGNED 's' -#define VALUE_OPT_GENERATE_CERTIFICATE 'c' -#define VALUE_OPT_GENERATE_PROXY 0x1004 -#define VALUE_OPT_UPDATE_CERTIFICATE 'u' -#define VALUE_OPT_FINGERPRINT 0x1005 -#define VALUE_OPT_KEY_ID 0x1006 -#define VALUE_OPT_CERTIFICATE_PUBKEY 0x1007 -#define VALUE_OPT_V1 0x1008 -#define VALUE_OPT_SIGN_PARAMS 0x1009 -#define VALUE_OPT_CRQ_INFO 0x100A -#define VALUE_OPT_GENERATE_REQUEST 'q' -#define VALUE_OPT_NO_CRQ_EXTENSIONS 0x100B -#define VALUE_OPT_P12_INFO 0x100C -#define VALUE_OPT_P12_NAME 0x100D -#define VALUE_OPT_TO_P12 0x100E -#define VALUE_OPT_KEY_INFO 'k' -#define VALUE_OPT_P8_INFO 0x100F -#define VALUE_OPT_TO_RSA 0x1010 -#define VALUE_OPT_GENERATE_PRIVKEY 'p' -#define VALUE_OPT_KEY_TYPE 0x1011 -#define VALUE_OPT_BITS 0x1012 - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_CURVE 0x1013 -#define VALUE_OPT_SEC_PARAM 0x1014 -#define VALUE_OPT_TO_P8 0x1015 -#define VALUE_OPT_PKCS8 '8' -#define VALUE_OPT_PROVABLE 0x1016 -#define VALUE_OPT_VERIFY_PROVABLE_PRIVKEY 0x1017 -#define VALUE_OPT_SEED 0x1018 -#define VALUE_OPT_CRL_INFO 'l' -#define VALUE_OPT_GENERATE_CRL 0x1019 -#define VALUE_OPT_VERIFY_CRL 0x101A -#define VALUE_OPT_VERIFY_CHAIN 'e' -#define VALUE_OPT_VERIFY 0x101B -#define VALUE_OPT_VERIFY_HOSTNAME 0x101C -#define VALUE_OPT_VERIFY_EMAIL 0x101D -#define VALUE_OPT_VERIFY_PURPOSE 0x101E -#define VALUE_OPT_VERIFY_ALLOW_BROKEN 0x101F -#define VALUE_OPT_P7_GENERATE 0x1020 -#define VALUE_OPT_P7_SIGN 0x1021 -#define VALUE_OPT_P7_DETACHED_SIGN 0x1022 -#define VALUE_OPT_P7_INCLUDE_CERT 0x1023 -#define VALUE_OPT_P7_TIME 0x1024 -#define VALUE_OPT_P7_SHOW_DATA 0x1025 -#define VALUE_OPT_P7_INFO 0x1026 -#define VALUE_OPT_P7_VERIFY 0x1027 -#define VALUE_OPT_SMIME_TO_P7 0x1028 -#define VALUE_OPT_GENERATE_DH_PARAMS 0x1029 -#define VALUE_OPT_GET_DH_PARAMS 0x102A -#define VALUE_OPT_DH_INFO 0x102B -#define VALUE_OPT_LOAD_PRIVKEY 0x102C -#define VALUE_OPT_LOAD_PUBKEY 0x102D -#define VALUE_OPT_LOAD_REQUEST 0x102E -#define VALUE_OPT_LOAD_CERTIFICATE 0x102F -#define VALUE_OPT_LOAD_CA_PRIVKEY 0x1030 -#define VALUE_OPT_LOAD_CA_CERTIFICATE 0x1031 -#define VALUE_OPT_LOAD_CRL 0x1032 -#define VALUE_OPT_LOAD_DATA 0x1033 -#define VALUE_OPT_PASSWORD 0x1034 -#define VALUE_OPT_NULL_PASSWORD 0x1035 -#define VALUE_OPT_EMPTY_PASSWORD 0x1036 -#define VALUE_OPT_HEX_NUMBERS 0x1037 -#define VALUE_OPT_CPRINT 0x1038 -#define VALUE_OPT_RSA 0x1039 -#define VALUE_OPT_DSA 0x103A -#define VALUE_OPT_ECC 0x103B -#define VALUE_OPT_ECDSA 0x103C -#define VALUE_OPT_HASH 0x103D -#define VALUE_OPT_SALT_SIZE 0x103E - -#define OPT_VALUE_SALT_SIZE (DESC(SALT_SIZE).optArg.argInt) -#define VALUE_OPT_INDER 0x103F -#define VALUE_OPT_INRAW 0x1040 -#define VALUE_OPT_OUTDER 0x1041 -#define VALUE_OPT_OUTRAW 0x1042 -#define VALUE_OPT_DISABLE_QUICK_RANDOM 0x1043 -#define VALUE_OPT_TEMPLATE 0x1044 -#define VALUE_OPT_STDOUT_INFO 0x1045 -#define VALUE_OPT_ASK_PASS 0x1046 -#define VALUE_OPT_PKCS_CIPHER 0x1047 -#define VALUE_OPT_PROVIDER 0x1048 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value option */ -#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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the certtool option descriptor. - */ -extern tOptions certtoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/cli-args.c.bak deleted file mode 100644 index cb49046a9c..0000000000 --- a/src/cli-args.c.bak +++ /dev/null @@ -1,2753 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-args.c) - * - * It has been AutoGen-ed - * From the definitions cli-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "cli-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (gnutls_cli_opt_strs+0) -#define zLicenseDescrip (gnutls_cli_opt_strs+285) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for gnutls-cli options - */ -static char const gnutls_cli_opt_strs[5176] = -/* 0 */ "gnutls-cli 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 285 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 894 */ "Enable debugging\0" -/* 911 */ "DEBUG\0" -/* 917 */ "debug\0" -/* 923 */ "More verbose output\0" -/* 943 */ "VERBOSE\0" -/* 951 */ "verbose\0" -/* 959 */ "Enable trust on first use authentication\0" -/* 1000 */ "TOFU\0" -/* 1005 */ "no-tofu\0" -/* 1013 */ "no\0" -/* 1016 */ "Fail to connect if a certificate is unknown or a known certificate has\n" - "changed\0" -/* 1095 */ "STRICT_TOFU\0" -/* 1107 */ "no-strict-tofu\0" -/* 1122 */ "Enable DANE certificate verification (DNSSEC)\0" -/* 1168 */ "DANE\0" -/* 1173 */ "no-dane\0" -/* 1181 */ "Use the local DNS server for DNSSEC resolving\0" -/* 1227 */ "LOCAL_DNS\0" -/* 1237 */ "no-local-dns\0" -/* 1250 */ "Enable CA certificate verification\0" -/* 1285 */ "CA_VERIFICATION\0" -/* 1301 */ "no-ca-verification\0" -/* 1320 */ "Enable OCSP certificate verification\0" -/* 1357 */ "OCSP\0" -/* 1362 */ "no-ocsp\0" -/* 1370 */ "Establish a session and resume\0" -/* 1401 */ "RESUME\0" -/* 1408 */ "resume\0" -/* 1415 */ "Send early data on resumption from the specified file\0" -/* 1469 */ "EARLYDATA\0" -/* 1479 */ "earlydata\0" -/* 1489 */ "Establish a session and rehandshake\0" -/* 1525 */ "REHANDSHAKE\0" -/* 1537 */ "rehandshake\0" -/* 1549 */ "Server's hostname for server name indication extension\0" -/* 1604 */ "SNI_HOSTNAME\0" -/* 1617 */ "sni-hostname\0" -/* 1630 */ "Server's hostname to use for validation\0" -/* 1670 */ "VERIFY_HOSTNAME\0" -/* 1686 */ "verify-hostname\0" -/* 1702 */ "Connect, establish a plain session and start TLS\0" -/* 1751 */ "STARTTLS\0" -/* 1760 */ "starttls\0" -/* 1769 */ "an alias for the 'starttls-proto' option\0" -/* 1810 */ "app-proto\0" -/* 1820 */ "The application protocol to be used to obtain the server's certificate\n" - "(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)\0" -/* 1963 */ "STARTTLS_PROTO\0" -/* 1978 */ "starttls-proto\0" -/* 1993 */ "Use DTLS (datagram TLS) over UDP\0" -/* 2026 */ "UDP\0" -/* 2030 */ "udp\0" -/* 2034 */ "Set MTU for datagram TLS\0" -/* 2059 */ "MTU\0" -/* 2063 */ "mtu\0" -/* 2067 */ "Send CR LF instead of LF\0" -/* 2092 */ "CRLF\0" -/* 2097 */ "crlf\0" -/* 2102 */ "Enable TCP Fast Open\0" -/* 2123 */ "FASTOPEN\0" -/* 2132 */ "fastopen\0" -/* 2141 */ "Use DER format for certificates to read from\0" -/* 2186 */ "X509FMTDER\0" -/* 2197 */ "x509fmtder\0" -/* 2208 */ "Print peer's certificate in PEM format\0" -/* 2247 */ "PRINT_CERT\0" -/* 2258 */ "print-cert\0" -/* 2269 */ "Save the peer's certificate chain in the specified file in PEM format\0" -/* 2339 */ "SAVE_CERT\0" -/* 2349 */ "save-cert\0" -/* 2359 */ "Save the peer's OCSP status response in the provided file\0" -/* 2417 */ "SAVE_OCSP\0" -/* 2427 */ "save-ocsp\0" -/* 2437 */ "Save the server-side TLS message trace in the provided file\0" -/* 2497 */ "SAVE_SERVER_TRACE\0" -/* 2515 */ "save-server-trace\0" -/* 2533 */ "Save the client-side TLS message trace in the provided file\0" -/* 2593 */ "SAVE_CLIENT_TRACE\0" -/* 2611 */ "save-client-trace\0" -/* 2629 */ "The minimum number of bits allowed for DH\0" -/* 2671 */ "DH_BITS\0" -/* 2679 */ "dh-bits\0" -/* 2687 */ "Priorities string\0" -/* 2705 */ "PRIORITY\0" -/* 2714 */ "priority\0" -/* 2723 */ "Certificate file or PKCS #11 URL to use\0" -/* 2763 */ "X509CAFILE\0" -/* 2774 */ "x509cafile\0" -/* 2785 */ "CRL file to use\0" -/* 2801 */ "X509CRLFILE\0" -/* 2813 */ "x509crlfile\0" -/* 2825 */ "X.509 key file or PKCS #11 URL to use\0" -/* 2863 */ "X509KEYFILE\0" -/* 2875 */ "x509keyfile\0" -/* 2887 */ "X.509 Certificate file or PKCS #11 URL to use\0" -/* 2933 */ "X509CERTFILE\0" -/* 2946 */ "x509certfile\0" -/* 2959 */ "SRP username to use\0" -/* 2979 */ "SRPUSERNAME\0" -/* 2991 */ "srpusername\0" -/* 3003 */ "SRP password to use\0" -/* 3023 */ "SRPPASSWD\0" -/* 3033 */ "srppasswd\0" -/* 3043 */ "PSK username to use\0" -/* 3063 */ "PSKUSERNAME\0" -/* 3075 */ "pskusername\0" -/* 3087 */ "PSK key (in hex) to use\0" -/* 3111 */ "PSKKEY\0" -/* 3118 */ "pskkey\0" -/* 3125 */ "The port or service to connect to\0" -/* 3159 */ "PORT\0" -/* 3164 */ "port\0" -/* 3169 */ "Don't abort program if server certificate can't be validated\0" -/* 3230 */ "INSECURE\0" -/* 3239 */ "insecure\0" -/* 3248 */ "Allow broken algorithms, such as MD5 for certificate verification\0" -/* 3314 */ "VERIFY_ALLOW_BROKEN\0" -/* 3334 */ "verify-allow-broken\0" -/* 3354 */ "Use length-hiding padding to prevent traffic analysis (deprecated)\0" -/* 3421 */ "RANGES\0" -/* 3428 */ "ranges\0" -/* 3435 */ "Benchmark individual ciphers\0" -/* 3464 */ "BENCHMARK_CIPHERS\0" -/* 3482 */ "benchmark-ciphers\0" -/* 3500 */ "Benchmark TLS key exchange methods\0" -/* 3535 */ "BENCHMARK_TLS_KX\0" -/* 3552 */ "benchmark-tls-kx\0" -/* 3569 */ "Benchmark TLS ciphers\0" -/* 3591 */ "BENCHMARK_TLS_CIPHERS\0" -/* 3613 */ "benchmark-tls-ciphers\0" -/* 3635 */ "Print a list of the supported algorithms and modes\0" -/* 3686 */ "LIST\0" -/* 3691 */ "list\0" -/* 3696 */ "Print a list of the supported priority strings\0" -/* 3743 */ "PRIORITY_LIST\0" -/* 3757 */ "priority-list\0" -/* 3771 */ "Don't allow session tickets\0" -/* 3799 */ "NOTICKET\0" -/* 3808 */ "noticket\0" -/* 3817 */ "Offer SRTP profiles\0" -/* 3837 */ "SRTP_PROFILES\0" -/* 3851 */ "srtp-profiles\0" -/* 3865 */ "Application layer protocol\0" -/* 3892 */ "ALPN\0" -/* 3897 */ "alpn\0" -/* 3902 */ "Activate heartbeat support\0" -/* 3929 */ "HEARTBEAT\0" -/* 3939 */ "heartbeat\0" -/* 3949 */ "The maximum record size to advertize\0" -/* 3986 */ "RECORDSIZE\0" -/* 3997 */ "recordsize\0" -/* 4008 */ "Do not send a Server Name Indication (SNI)\0" -/* 4051 */ "DISABLE_SNI\0" -/* 4063 */ "disable-sni\0" -/* 4075 */ "Disable all the TLS extensions (deprecated)\0" -/* 4119 */ "DISABLE_EXTENSIONS\0" -/* 4138 */ "disable-extensions\0" -/* 4157 */ "Send a single key share under TLS1.3\0" -/* 4194 */ "SINGLE_KEY_SHARE\0" -/* 4211 */ "single-key-share\0" -/* 4228 */ "Enable post-handshake authentication under TLS1.3\0" -/* 4278 */ "POST_HANDSHAKE_AUTH\0" -/* 4298 */ "post-handshake-auth\0" -/* 4318 */ "Inline commands of the form ^<cmd>^\0" -/* 4354 */ "INLINE_COMMANDS\0" -/* 4370 */ "inline-commands\0" -/* 4386 */ "Change the default delimiter for inline commands.\0" -/* 4436 */ "INLINE_COMMANDS_PREFIX\0" -/* 4459 */ "inline-commands-prefix\0" -/* 4482 */ "Specify the PKCS #11 provider library\0" -/* 4520 */ "PROVIDER\0" -/* 4529 */ "provider\0" -/* 4538 */ "Reports the status of the FIPS140-2 mode in gnutls library\0" -/* 4597 */ "FIPS140_MODE\0" -/* 4610 */ "fips140-mode\0" -/* 4623 */ "display extended usage information and exit\0" -/* 4667 */ "help\0" -/* 4672 */ "extended usage information passed thru pager\0" -/* 4717 */ "more-help\0" -/* 4727 */ "output version information and exit\0" -/* 4763 */ "version\0" -/* 4771 */ "GNUTLS_CLI\0" -/* 4782 */ "gnutls-cli - GnuTLS client\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostname]\n\0" -/* 4878 */ "bugs@gnutls.org\0" -/* 4894 */ "\n\0" -/* 4896 */ "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" -/* 5079 */ "gnutls-cli 3.6.4\0" -/* 5096 */ "Usage: gnutls-cli [options] hostname\n" - "gnutls-cli --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (gnutls_cli_opt_strs+894) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (gnutls_cli_opt_strs+911) -/** Name string for the debug option */ -#define DEBUG_name (gnutls_cli_opt_strs+917) -/** 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_opt_strs+923) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (gnutls_cli_opt_strs+943) -/** Name string for the verbose option */ -#define VERBOSE_name (gnutls_cli_opt_strs+951) -/** Compiled in flag settings for the verbose option */ -#define VERBOSE_FLAGS (OPTST_DISABLED) - -/** - * tofu option description: - */ -/** Descriptive text for the tofu option */ -#define TOFU_DESC (gnutls_cli_opt_strs+959) -/** Upper-cased name for the tofu option */ -#define TOFU_NAME (gnutls_cli_opt_strs+1000) -/** disablement name for the tofu option */ -#define NOT_TOFU_name (gnutls_cli_opt_strs+1005) -/** disablement prefix for the tofu option */ -#define NOT_TOFU_PFX (gnutls_cli_opt_strs+1013) -/** Name string for the tofu option */ -#define TOFU_name (NOT_TOFU_name + 3) -/** Compiled in flag settings for the tofu option */ -#define TOFU_FLAGS (OPTST_DISABLED) - -/** - * strict-tofu option description: - */ -/** Descriptive text for the strict-tofu option */ -#define STRICT_TOFU_DESC (gnutls_cli_opt_strs+1016) -/** Upper-cased name for the strict-tofu option */ -#define STRICT_TOFU_NAME (gnutls_cli_opt_strs+1095) -/** disablement name for the strict-tofu option */ -#define NOT_STRICT_TOFU_name (gnutls_cli_opt_strs+1107) -/** disablement prefix for the strict-tofu option */ -#define NOT_STRICT_TOFU_PFX (gnutls_cli_opt_strs+1013) -/** Name string for the strict-tofu option */ -#define STRICT_TOFU_name (NOT_STRICT_TOFU_name + 3) -/** Compiled in flag settings for the strict-tofu option */ -#define STRICT_TOFU_FLAGS (OPTST_DISABLED) - -/** - * dane option description: - */ -/** Descriptive text for the dane option */ -#define DANE_DESC (gnutls_cli_opt_strs+1122) -/** Upper-cased name for the dane option */ -#define DANE_NAME (gnutls_cli_opt_strs+1168) -/** disablement name for the dane option */ -#define NOT_DANE_name (gnutls_cli_opt_strs+1173) -/** disablement prefix for the dane option */ -#define NOT_DANE_PFX (gnutls_cli_opt_strs+1013) -/** Name string for the dane option */ -#define DANE_name (NOT_DANE_name + 3) -/** Compiled in flag settings for the dane option */ -#define DANE_FLAGS (OPTST_DISABLED) - -/** - * local-dns option description: - */ -/** Descriptive text for the local-dns option */ -#define LOCAL_DNS_DESC (gnutls_cli_opt_strs+1181) -/** Upper-cased name for the local-dns option */ -#define LOCAL_DNS_NAME (gnutls_cli_opt_strs+1227) -/** disablement name for the local-dns option */ -#define NOT_LOCAL_DNS_name (gnutls_cli_opt_strs+1237) -/** disablement prefix for the local-dns option */ -#define NOT_LOCAL_DNS_PFX (gnutls_cli_opt_strs+1013) -/** 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) - -/** - * ca-verification option description: - */ -/** Descriptive text for the ca-verification option */ -#define CA_VERIFICATION_DESC (gnutls_cli_opt_strs+1250) -/** Upper-cased name for the ca-verification option */ -#define CA_VERIFICATION_NAME (gnutls_cli_opt_strs+1285) -/** disablement name for the ca-verification option */ -#define NOT_CA_VERIFICATION_name (gnutls_cli_opt_strs+1301) -/** disablement prefix for the ca-verification option */ -#define NOT_CA_VERIFICATION_PFX (gnutls_cli_opt_strs+1013) -/** Name string for the ca-verification option */ -#define CA_VERIFICATION_name (NOT_CA_VERIFICATION_name + 3) -/** Compiled in flag settings for the ca-verification option */ -#define CA_VERIFICATION_FLAGS (OPTST_INITENABLED) - -/** - * ocsp option description: - */ -/** Descriptive text for the ocsp option */ -#define OCSP_DESC (gnutls_cli_opt_strs+1320) -/** Upper-cased name for the ocsp option */ -#define OCSP_NAME (gnutls_cli_opt_strs+1357) -/** disablement name for the ocsp option */ -#define NOT_OCSP_name (gnutls_cli_opt_strs+1362) -/** disablement prefix for the ocsp option */ -#define NOT_OCSP_PFX (gnutls_cli_opt_strs+1013) -/** Name string for the ocsp option */ -#define OCSP_name (NOT_OCSP_name + 3) -/** Compiled in flag settings for the ocsp option */ -#define OCSP_FLAGS (OPTST_DISABLED) - -/** - * resume option description: - */ -/** Descriptive text for the resume option */ -#define RESUME_DESC (gnutls_cli_opt_strs+1370) -/** Upper-cased name for the resume option */ -#define RESUME_NAME (gnutls_cli_opt_strs+1401) -/** Name string for the resume option */ -#define RESUME_name (gnutls_cli_opt_strs+1408) -/** Compiled in flag settings for the resume option */ -#define RESUME_FLAGS (OPTST_DISABLED) - -/** - * earlydata option description: - */ -/** Descriptive text for the earlydata option */ -#define EARLYDATA_DESC (gnutls_cli_opt_strs+1415) -/** Upper-cased name for the earlydata option */ -#define EARLYDATA_NAME (gnutls_cli_opt_strs+1469) -/** Name string for the earlydata option */ -#define EARLYDATA_name (gnutls_cli_opt_strs+1479) -/** Compiled in flag settings for the earlydata option */ -#define EARLYDATA_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * rehandshake option description: - */ -/** Descriptive text for the rehandshake option */ -#define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1489) -/** Upper-cased name for the rehandshake option */ -#define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1525) -/** Name string for the rehandshake option */ -#define REHANDSHAKE_name (gnutls_cli_opt_strs+1537) -/** Compiled in flag settings for the rehandshake option */ -#define REHANDSHAKE_FLAGS (OPTST_DISABLED) - -/** - * sni-hostname option description: - */ -/** Descriptive text for the sni-hostname option */ -#define SNI_HOSTNAME_DESC (gnutls_cli_opt_strs+1549) -/** Upper-cased name for the sni-hostname option */ -#define SNI_HOSTNAME_NAME (gnutls_cli_opt_strs+1604) -/** Name string for the sni-hostname option */ -#define SNI_HOSTNAME_name (gnutls_cli_opt_strs+1617) -/** Compiled in flag settings for the sni-hostname option */ -#define SNI_HOSTNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * verify-hostname option description: - */ -/** Descriptive text for the verify-hostname option */ -#define VERIFY_HOSTNAME_DESC (gnutls_cli_opt_strs+1630) -/** Upper-cased name for the verify-hostname option */ -#define VERIFY_HOSTNAME_NAME (gnutls_cli_opt_strs+1670) -/** Name string for the verify-hostname option */ -#define VERIFY_HOSTNAME_name (gnutls_cli_opt_strs+1686) -/** Compiled in flag settings for the verify-hostname option */ -#define VERIFY_HOSTNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * starttls option description: - */ -/** Descriptive text for the starttls option */ -#define STARTTLS_DESC (gnutls_cli_opt_strs+1702) -/** Upper-cased name for the starttls option */ -#define STARTTLS_NAME (gnutls_cli_opt_strs+1751) -/** Name string for the starttls option */ -#define STARTTLS_name (gnutls_cli_opt_strs+1760) -/** Compiled in flag settings for the starttls option */ -#define STARTTLS_FLAGS (OPTST_DISABLED) - -/** - * app-proto option description: - */ -/** Descriptive text for the app-proto option */ -#define APP_PROTO_DESC (gnutls_cli_opt_strs+1769) -#define APP_PROTO_NAME NULL -/** Unmodified name string for the app-proto option */ -#define APP_PROTO_name (gnutls_cli_opt_strs+1810) -/** Compiled in flag settings for the app-proto option */ -#define APP_PROTO_FLAGS (STARTTLS_PROTO_FLAGS | OPTST_ALIAS) - -/** - * starttls-proto option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the starttls-proto option */ -#define STARTTLS_PROTO_DESC (gnutls_cli_opt_strs+1820) -/** Upper-cased name for the starttls-proto option */ -#define STARTTLS_PROTO_NAME (gnutls_cli_opt_strs+1963) -/** Name string for the starttls-proto option */ -#define STARTTLS_PROTO_name (gnutls_cli_opt_strs+1978) -/** Other options that appear in conjunction with the starttls-proto option */ -static int const aStarttls_ProtoCantList[] = { - INDEX_OPT_STARTTLS, NO_EQUIVALENT }; -/** Compiled in flag settings for the starttls-proto option */ -#define STARTTLS_PROTO_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * udp option description: - */ -/** Descriptive text for the udp option */ -#define UDP_DESC (gnutls_cli_opt_strs+1993) -/** Upper-cased name for the udp option */ -#define UDP_NAME (gnutls_cli_opt_strs+2026) -/** Name string for the udp option */ -#define UDP_name (gnutls_cli_opt_strs+2030) -/** 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_cli_opt_strs+2034) -/** Upper-cased name for the mtu option */ -#define MTU_NAME (gnutls_cli_opt_strs+2059) -/** Name string for the mtu option */ -#define MTU_name (gnutls_cli_opt_strs+2063) -/** Compiled in flag settings for the mtu option */ -#define MTU_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * crlf option description: - */ -/** Descriptive text for the crlf option */ -#define CRLF_DESC (gnutls_cli_opt_strs+2067) -/** Upper-cased name for the crlf option */ -#define CRLF_NAME (gnutls_cli_opt_strs+2092) -/** Name string for the crlf option */ -#define CRLF_name (gnutls_cli_opt_strs+2097) -/** Compiled in flag settings for the crlf option */ -#define CRLF_FLAGS (OPTST_DISABLED) - -/** - * fastopen option description: - */ -/** Descriptive text for the fastopen option */ -#define FASTOPEN_DESC (gnutls_cli_opt_strs+2102) -/** Upper-cased name for the fastopen option */ -#define FASTOPEN_NAME (gnutls_cli_opt_strs+2123) -/** Name string for the fastopen option */ -#define FASTOPEN_name (gnutls_cli_opt_strs+2132) -/** Compiled in flag settings for the fastopen option */ -#define FASTOPEN_FLAGS (OPTST_DISABLED) - -/** - * x509fmtder option description: - */ -/** Descriptive text for the x509fmtder option */ -#define X509FMTDER_DESC (gnutls_cli_opt_strs+2141) -/** Upper-cased name for the x509fmtder option */ -#define X509FMTDER_NAME (gnutls_cli_opt_strs+2186) -/** Name string for the x509fmtder option */ -#define X509FMTDER_name (gnutls_cli_opt_strs+2197) -/** Compiled in flag settings for the x509fmtder option */ -#define X509FMTDER_FLAGS (OPTST_DISABLED) - -/** - * print-cert option description: - */ -/** Descriptive text for the print-cert option */ -#define PRINT_CERT_DESC (gnutls_cli_opt_strs+2208) -/** Upper-cased name for the print-cert option */ -#define PRINT_CERT_NAME (gnutls_cli_opt_strs+2247) -/** Name string for the print-cert option */ -#define PRINT_CERT_name (gnutls_cli_opt_strs+2258) -/** Compiled in flag settings for the print-cert option */ -#define PRINT_CERT_FLAGS (OPTST_DISABLED) - -/** - * save-cert option description: - */ -/** Descriptive text for the save-cert option */ -#define SAVE_CERT_DESC (gnutls_cli_opt_strs+2269) -/** Upper-cased name for the save-cert option */ -#define SAVE_CERT_NAME (gnutls_cli_opt_strs+2339) -/** Name string for the save-cert option */ -#define SAVE_CERT_name (gnutls_cli_opt_strs+2349) -/** Compiled in flag settings for the save-cert option */ -#define SAVE_CERT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * save-ocsp option description: - */ -/** Descriptive text for the save-ocsp option */ -#define SAVE_OCSP_DESC (gnutls_cli_opt_strs+2359) -/** Upper-cased name for the save-ocsp option */ -#define SAVE_OCSP_NAME (gnutls_cli_opt_strs+2417) -/** Name string for the save-ocsp option */ -#define SAVE_OCSP_name (gnutls_cli_opt_strs+2427) -/** Compiled in flag settings for the save-ocsp option */ -#define SAVE_OCSP_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * save-server-trace option description: - */ -/** Descriptive text for the save-server-trace option */ -#define SAVE_SERVER_TRACE_DESC (gnutls_cli_opt_strs+2437) -/** Upper-cased name for the save-server-trace option */ -#define SAVE_SERVER_TRACE_NAME (gnutls_cli_opt_strs+2497) -/** Name string for the save-server-trace option */ -#define SAVE_SERVER_TRACE_name (gnutls_cli_opt_strs+2515) -/** Compiled in flag settings for the save-server-trace option */ -#define SAVE_SERVER_TRACE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * save-client-trace option description: - */ -/** Descriptive text for the save-client-trace option */ -#define SAVE_CLIENT_TRACE_DESC (gnutls_cli_opt_strs+2533) -/** Upper-cased name for the save-client-trace option */ -#define SAVE_CLIENT_TRACE_NAME (gnutls_cli_opt_strs+2593) -/** Name string for the save-client-trace option */ -#define SAVE_CLIENT_TRACE_name (gnutls_cli_opt_strs+2611) -/** Compiled in flag settings for the save-client-trace option */ -#define SAVE_CLIENT_TRACE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * dh-bits option description: - */ -/** Descriptive text for the dh-bits option */ -#define DH_BITS_DESC (gnutls_cli_opt_strs+2629) -/** Upper-cased name for the dh-bits option */ -#define DH_BITS_NAME (gnutls_cli_opt_strs+2671) -/** Name string for the dh-bits option */ -#define DH_BITS_name (gnutls_cli_opt_strs+2679) -/** Compiled in flag settings for the dh-bits option */ -#define DH_BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * priority option description: - */ -/** Descriptive text for the priority option */ -#define PRIORITY_DESC (gnutls_cli_opt_strs+2687) -/** Upper-cased name for the priority option */ -#define PRIORITY_NAME (gnutls_cli_opt_strs+2705) -/** Name string for the priority option */ -#define PRIORITY_name (gnutls_cli_opt_strs+2714) -/** Compiled in flag settings for the priority option */ -#define PRIORITY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509cafile option description: - */ -/** Descriptive text for the x509cafile option */ -#define X509CAFILE_DESC (gnutls_cli_opt_strs+2723) -/** Upper-cased name for the x509cafile option */ -#define X509CAFILE_NAME (gnutls_cli_opt_strs+2763) -/** Name string for the x509cafile option */ -#define X509CAFILE_name (gnutls_cli_opt_strs+2774) -/** 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_cli_opt_strs+2785) -/** Upper-cased name for the x509crlfile option */ -#define X509CRLFILE_NAME (gnutls_cli_opt_strs+2801) -/** Name string for the x509crlfile option */ -#define X509CRLFILE_name (gnutls_cli_opt_strs+2813) -/** Compiled in flag settings for the x509crlfile option */ -#define X509CRLFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * x509keyfile option description: - */ -/** Descriptive text for the x509keyfile option */ -#define X509KEYFILE_DESC (gnutls_cli_opt_strs+2825) -/** Upper-cased name for the x509keyfile option */ -#define X509KEYFILE_NAME (gnutls_cli_opt_strs+2863) -/** Name string for the x509keyfile option */ -#define X509KEYFILE_name (gnutls_cli_opt_strs+2875) -/** Compiled in flag settings for the x509keyfile option */ -#define X509KEYFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509certfile option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the x509certfile option */ -#define X509CERTFILE_DESC (gnutls_cli_opt_strs+2887) -/** Upper-cased name for the x509certfile option */ -#define X509CERTFILE_NAME (gnutls_cli_opt_strs+2933) -/** Name string for the x509certfile option */ -#define X509CERTFILE_name (gnutls_cli_opt_strs+2946) -/** Other options that are required by the x509certfile option */ -static int const aX509certfileMustList[] = { - INDEX_OPT_X509KEYFILE, NO_EQUIVALENT }; -/** Compiled in flag settings for the x509certfile option */ -#define X509CERTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * srpusername option description: - */ -/** Descriptive text for the srpusername option */ -#define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2959) -/** Upper-cased name for the srpusername option */ -#define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2979) -/** Name string for the srpusername option */ -#define SRPUSERNAME_name (gnutls_cli_opt_strs+2991) -/** Compiled in flag settings for the srpusername option */ -#define SRPUSERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * srppasswd option description: - */ -/** Descriptive text for the srppasswd option */ -#define SRPPASSWD_DESC (gnutls_cli_opt_strs+3003) -/** Upper-cased name for the srppasswd option */ -#define SRPPASSWD_NAME (gnutls_cli_opt_strs+3023) -/** Name string for the srppasswd option */ -#define SRPPASSWD_name (gnutls_cli_opt_strs+3033) -/** Compiled in flag settings for the srppasswd option */ -#define SRPPASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * pskusername option description: - */ -/** Descriptive text for the pskusername option */ -#define PSKUSERNAME_DESC (gnutls_cli_opt_strs+3043) -/** Upper-cased name for the pskusername option */ -#define PSKUSERNAME_NAME (gnutls_cli_opt_strs+3063) -/** Name string for the pskusername option */ -#define PSKUSERNAME_name (gnutls_cli_opt_strs+3075) -/** Compiled in flag settings for the pskusername option */ -#define PSKUSERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * pskkey option description: - */ -/** Descriptive text for the pskkey option */ -#define PSKKEY_DESC (gnutls_cli_opt_strs+3087) -/** Upper-cased name for the pskkey option */ -#define PSKKEY_NAME (gnutls_cli_opt_strs+3111) -/** Name string for the pskkey option */ -#define PSKKEY_name (gnutls_cli_opt_strs+3118) -/** Compiled in flag settings for the pskkey option */ -#define PSKKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * port option description: - */ -/** Descriptive text for the port option */ -#define PORT_DESC (gnutls_cli_opt_strs+3125) -/** Upper-cased name for the port option */ -#define PORT_NAME (gnutls_cli_opt_strs+3159) -/** Name string for the port option */ -#define PORT_name (gnutls_cli_opt_strs+3164) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * insecure option description: - */ -/** Descriptive text for the insecure option */ -#define INSECURE_DESC (gnutls_cli_opt_strs+3169) -/** Upper-cased name for the insecure option */ -#define INSECURE_NAME (gnutls_cli_opt_strs+3230) -/** Name string for the insecure option */ -#define INSECURE_name (gnutls_cli_opt_strs+3239) -/** Compiled in flag settings for the insecure option */ -#define INSECURE_FLAGS (OPTST_DISABLED) - -/** - * verify-allow-broken option description: - */ -/** Descriptive text for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_DESC (gnutls_cli_opt_strs+3248) -/** Upper-cased name for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_NAME (gnutls_cli_opt_strs+3314) -/** Name string for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_name (gnutls_cli_opt_strs+3334) -/** Compiled in flag settings for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_FLAGS (OPTST_DISABLED) - -/** - * ranges option description: - */ -/** Descriptive text for the ranges option */ -#define RANGES_DESC (gnutls_cli_opt_strs+3354) -/** Upper-cased name for the ranges option */ -#define RANGES_NAME (gnutls_cli_opt_strs+3421) -/** Name string for the ranges option */ -#define RANGES_name (gnutls_cli_opt_strs+3428) -/** Compiled in flag settings for the ranges option */ -#define RANGES_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * benchmark-ciphers option description: - */ -/** Descriptive text for the benchmark-ciphers option */ -#define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+3435) -/** Upper-cased name for the benchmark-ciphers option */ -#define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+3464) -/** Name string for the benchmark-ciphers option */ -#define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+3482) -/** Compiled in flag settings for the benchmark-ciphers option */ -#define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) - -/** - * benchmark-tls-kx option description: - */ -/** Descriptive text for the benchmark-tls-kx option */ -#define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+3500) -/** Upper-cased name for the benchmark-tls-kx option */ -#define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+3535) -/** Name string for the benchmark-tls-kx option */ -#define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+3552) -/** Compiled in flag settings for the benchmark-tls-kx option */ -#define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) - -/** - * benchmark-tls-ciphers option description: - */ -/** Descriptive text for the benchmark-tls-ciphers option */ -#define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+3569) -/** Upper-cased name for the benchmark-tls-ciphers option */ -#define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+3591) -/** Name string for the benchmark-tls-ciphers option */ -#define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+3613) -/** Compiled in flag settings for the benchmark-tls-ciphers option */ -#define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) - -/** - * list option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the list option */ -#define LIST_DESC (gnutls_cli_opt_strs+3635) -/** Upper-cased name for the list option */ -#define LIST_NAME (gnutls_cli_opt_strs+3686) -/** Name string for the list option */ -#define LIST_name (gnutls_cli_opt_strs+3691) -/** Other options that appear in conjunction with the list option */ -static int const aListCantList[] = { - INDEX_OPT_PORT, NO_EQUIVALENT }; -/** Compiled in flag settings for the list option */ -#define LIST_FLAGS (OPTST_DISABLED) - -/** - * priority-list option description: - */ -/** Descriptive text for the priority-list option */ -#define PRIORITY_LIST_DESC (gnutls_cli_opt_strs+3696) -/** Upper-cased name for the priority-list option */ -#define PRIORITY_LIST_NAME (gnutls_cli_opt_strs+3743) -/** Name string for the priority-list option */ -#define PRIORITY_LIST_name (gnutls_cli_opt_strs+3757) -/** Compiled in flag settings for the priority-list option */ -#define PRIORITY_LIST_FLAGS (OPTST_DISABLED) - -/** - * noticket option description: - */ -/** Descriptive text for the noticket option */ -#define NOTICKET_DESC (gnutls_cli_opt_strs+3771) -/** Upper-cased name for the noticket option */ -#define NOTICKET_NAME (gnutls_cli_opt_strs+3799) -/** Name string for the noticket option */ -#define NOTICKET_name (gnutls_cli_opt_strs+3808) -/** Compiled in flag settings for the noticket option */ -#define NOTICKET_FLAGS (OPTST_DISABLED) - -/** - * srtp_profiles option description: - */ -/** Descriptive text for the srtp_profiles option */ -#define SRTP_PROFILES_DESC (gnutls_cli_opt_strs+3817) -/** Upper-cased name for the srtp_profiles option */ -#define SRTP_PROFILES_NAME (gnutls_cli_opt_strs+3837) -/** Name string for the srtp_profiles option */ -#define SRTP_PROFILES_name (gnutls_cli_opt_strs+3851) -/** Compiled in flag settings for the srtp_profiles option */ -#define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * alpn option description: - */ -/** Descriptive text for the alpn option */ -#define ALPN_DESC (gnutls_cli_opt_strs+3865) -/** Upper-cased name for the alpn option */ -#define ALPN_NAME (gnutls_cli_opt_strs+3892) -/** Name string for the alpn option */ -#define ALPN_name (gnutls_cli_opt_strs+3897) -/** Compiled in flag settings for the alpn option */ -#define ALPN_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * heartbeat option description: - */ -/** Descriptive text for the heartbeat option */ -#define HEARTBEAT_DESC (gnutls_cli_opt_strs+3902) -/** Upper-cased name for the heartbeat option */ -#define HEARTBEAT_NAME (gnutls_cli_opt_strs+3929) -/** Name string for the heartbeat option */ -#define HEARTBEAT_name (gnutls_cli_opt_strs+3939) -/** Compiled in flag settings for the heartbeat option */ -#define HEARTBEAT_FLAGS (OPTST_DISABLED) - -/** - * recordsize option description: - */ -/** Descriptive text for the recordsize option */ -#define RECORDSIZE_DESC (gnutls_cli_opt_strs+3949) -/** Upper-cased name for the recordsize option */ -#define RECORDSIZE_NAME (gnutls_cli_opt_strs+3986) -/** Name string for the recordsize option */ -#define RECORDSIZE_name (gnutls_cli_opt_strs+3997) -/** Compiled in flag settings for the recordsize option */ -#define RECORDSIZE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * disable-sni option description: - */ -/** Descriptive text for the disable-sni option */ -#define DISABLE_SNI_DESC (gnutls_cli_opt_strs+4008) -/** Upper-cased name for the disable-sni option */ -#define DISABLE_SNI_NAME (gnutls_cli_opt_strs+4051) -/** Name string for the disable-sni option */ -#define DISABLE_SNI_name (gnutls_cli_opt_strs+4063) -/** Compiled in flag settings for the disable-sni option */ -#define DISABLE_SNI_FLAGS (OPTST_DISABLED) - -/** - * disable-extensions option description: - */ -/** Descriptive text for the disable-extensions option */ -#define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+4075) -/** Upper-cased name for the disable-extensions option */ -#define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+4119) -/** Name string for the disable-extensions option */ -#define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+4138) -/** Compiled in flag settings for the disable-extensions option */ -#define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * single-key-share option description: - */ -/** Descriptive text for the single-key-share option */ -#define SINGLE_KEY_SHARE_DESC (gnutls_cli_opt_strs+4157) -/** Upper-cased name for the single-key-share option */ -#define SINGLE_KEY_SHARE_NAME (gnutls_cli_opt_strs+4194) -/** Name string for the single-key-share option */ -#define SINGLE_KEY_SHARE_name (gnutls_cli_opt_strs+4211) -/** Compiled in flag settings for the single-key-share option */ -#define SINGLE_KEY_SHARE_FLAGS (OPTST_DISABLED) - -/** - * post-handshake-auth option description: - */ -/** Descriptive text for the post-handshake-auth option */ -#define POST_HANDSHAKE_AUTH_DESC (gnutls_cli_opt_strs+4228) -/** Upper-cased name for the post-handshake-auth option */ -#define POST_HANDSHAKE_AUTH_NAME (gnutls_cli_opt_strs+4278) -/** Name string for the post-handshake-auth option */ -#define POST_HANDSHAKE_AUTH_name (gnutls_cli_opt_strs+4298) -/** Compiled in flag settings for the post-handshake-auth option */ -#define POST_HANDSHAKE_AUTH_FLAGS (OPTST_DISABLED) - -/** - * inline-commands option description: - */ -/** Descriptive text for the inline-commands option */ -#define INLINE_COMMANDS_DESC (gnutls_cli_opt_strs+4318) -/** Upper-cased name for the inline-commands option */ -#define INLINE_COMMANDS_NAME (gnutls_cli_opt_strs+4354) -/** Name string for the inline-commands option */ -#define INLINE_COMMANDS_name (gnutls_cli_opt_strs+4370) -/** Compiled in flag settings for the inline-commands option */ -#define INLINE_COMMANDS_FLAGS (OPTST_DISABLED) - -/** - * inline-commands-prefix option description: - */ -/** Descriptive text for the inline-commands-prefix option */ -#define INLINE_COMMANDS_PREFIX_DESC (gnutls_cli_opt_strs+4386) -/** Upper-cased name for the inline-commands-prefix option */ -#define INLINE_COMMANDS_PREFIX_NAME (gnutls_cli_opt_strs+4436) -/** Name string for the inline-commands-prefix option */ -#define INLINE_COMMANDS_PREFIX_name (gnutls_cli_opt_strs+4459) -/** Compiled in flag settings for the inline-commands-prefix option */ -#define INLINE_COMMANDS_PREFIX_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * provider option description: - */ -/** Descriptive text for the provider option */ -#define PROVIDER_DESC (gnutls_cli_opt_strs+4482) -/** Upper-cased name for the provider option */ -#define PROVIDER_NAME (gnutls_cli_opt_strs+4520) -/** Name string for the provider option */ -#define PROVIDER_name (gnutls_cli_opt_strs+4529) -/** Compiled in flag settings for the provider option */ -#define PROVIDER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * fips140-mode option description: - */ -/** Descriptive text for the fips140-mode option */ -#define FIPS140_MODE_DESC (gnutls_cli_opt_strs+4538) -/** Upper-cased name for the fips140-mode option */ -#define FIPS140_MODE_NAME (gnutls_cli_opt_strs+4597) -/** Name string for the fips140-mode option */ -#define FIPS140_MODE_name (gnutls_cli_opt_strs+4610) -/** Compiled in flag settings for the fips140-mode option */ -#define FIPS140_MODE_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_cli_opt_strs+4623) -#define HELP_name (gnutls_cli_opt_strs+4667) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_cli_opt_strs+4672) -#define MORE_HELP_name (gnutls_cli_opt_strs+4717) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+4727) -#define VER_name (gnutls_cli_opt_strs+4763) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptApp_Proto, doOptDebug, doOptMtu, doOptProvider, - 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_STRICT_TOFU, - /* equiv idx, value */ 3, VALUE_OPT_STRICT_TOFU, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STRICT_TOFU_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --strict-tofu */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ STRICT_TOFU_DESC, STRICT_TOFU_NAME, STRICT_TOFU_name, - /* disablement strs */ NOT_STRICT_TOFU_name, NOT_STRICT_TOFU_PFX }, - - { /* entry idx, value */ 4, VALUE_OPT_DANE, - /* equiv idx, value */ 4, 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 */ 5, VALUE_OPT_LOCAL_DNS, - /* equiv idx, value */ 5, 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 */ 6, VALUE_OPT_CA_VERIFICATION, - /* equiv idx, value */ 6, 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 */ 7, VALUE_OPT_OCSP, - /* equiv idx, value */ 7, 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 */ 8, VALUE_OPT_RESUME, - /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_EARLYDATA, - /* equiv idx, value */ 9, VALUE_OPT_EARLYDATA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EARLYDATA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --earlydata */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ EARLYDATA_DESC, EARLYDATA_NAME, EARLYDATA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_REHANDSHAKE, - /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_SNI_HOSTNAME, - /* equiv idx, value */ 11, VALUE_OPT_SNI_HOSTNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SNI_HOSTNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sni-hostname */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SNI_HOSTNAME_DESC, SNI_HOSTNAME_NAME, SNI_HOSTNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 12, VALUE_OPT_VERIFY_HOSTNAME, - /* equiv idx, value */ 12, VALUE_OPT_VERIFY_HOSTNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_HOSTNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-hostname */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_HOSTNAME_DESC, VERIFY_HOSTNAME_NAME, VERIFY_HOSTNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_STARTTLS, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_APP_PROTO, - /* equiv idx, value */ 14, VALUE_OPT_APP_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ APP_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --app-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptApp_Proto, - /* desc, NAME, name */ APP_PROTO_DESC, APP_PROTO_NAME, APP_PROTO_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 15, VALUE_OPT_STARTTLS_PROTO, - /* equiv idx, value */ 15, VALUE_OPT_STARTTLS_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STARTTLS_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --starttls-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aStarttls_ProtoCantList, - /* option proc */ NULL, - /* desc, NAME, name */ STARTTLS_PROTO_DESC, STARTTLS_PROTO_NAME, STARTTLS_PROTO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 16, VALUE_OPT_UDP, - /* equiv idx, value */ 16, 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 */ 17, VALUE_OPT_MTU, - /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_CRLF, - /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_FASTOPEN, - /* equiv idx, value */ 19, VALUE_OPT_FASTOPEN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ FASTOPEN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --fastopen */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ FASTOPEN_DESC, FASTOPEN_NAME, FASTOPEN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_X509FMTDER, - /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_PRINT_CERT, - /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_SAVE_CERT, - /* equiv idx, value */ 22, VALUE_OPT_SAVE_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SAVE_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --save-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SAVE_CERT_DESC, SAVE_CERT_NAME, SAVE_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 23, VALUE_OPT_SAVE_OCSP, - /* equiv idx, value */ 23, VALUE_OPT_SAVE_OCSP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SAVE_OCSP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --save-ocsp */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SAVE_OCSP_DESC, SAVE_OCSP_NAME, SAVE_OCSP_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 24, VALUE_OPT_SAVE_SERVER_TRACE, - /* equiv idx, value */ 24, VALUE_OPT_SAVE_SERVER_TRACE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SAVE_SERVER_TRACE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --save-server-trace */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SAVE_SERVER_TRACE_DESC, SAVE_SERVER_TRACE_NAME, SAVE_SERVER_TRACE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_SAVE_CLIENT_TRACE, - /* equiv idx, value */ 25, VALUE_OPT_SAVE_CLIENT_TRACE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SAVE_CLIENT_TRACE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --save-client-trace */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SAVE_CLIENT_TRACE_DESC, SAVE_CLIENT_TRACE_NAME, SAVE_CLIENT_TRACE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 26, VALUE_OPT_DH_BITS, - /* equiv idx, value */ 26, 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 */ 27, VALUE_OPT_PRIORITY, - /* equiv idx, value */ 27, 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 */ 28, VALUE_OPT_X509CAFILE, - /* equiv idx, value */ 28, 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 */ 29, VALUE_OPT_X509CRLFILE, - /* equiv idx, value */ 29, 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 */ 30, VALUE_OPT_X509KEYFILE, - /* equiv idx, value */ 30, 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 */ 31, VALUE_OPT_X509CERTFILE, - /* equiv idx, value */ 31, 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 */ aX509certfileMustList, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 32, VALUE_OPT_SRPUSERNAME, - /* equiv idx, value */ 32, 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 */ 33, VALUE_OPT_SRPPASSWD, - /* equiv idx, value */ 33, 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 */ 34, VALUE_OPT_PSKUSERNAME, - /* equiv idx, value */ 34, 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 */ 35, VALUE_OPT_PSKKEY, - /* equiv idx, value */ 35, 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 */ 36, VALUE_OPT_PORT, - /* equiv idx, value */ 36, 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 */ 37, VALUE_OPT_INSECURE, - /* equiv idx, value */ 37, 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 */ 38, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equiv idx, value */ 38, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_ALLOW_BROKEN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-allow-broken */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_ALLOW_BROKEN_DESC, VERIFY_ALLOW_BROKEN_NAME, VERIFY_ALLOW_BROKEN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 39, VALUE_OPT_RANGES, - /* equiv idx, value */ 39, 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 */ 40, VALUE_OPT_BENCHMARK_CIPHERS, - /* equiv idx, value */ 40, 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 */ 41, VALUE_OPT_BENCHMARK_TLS_KX, - /* equiv idx, value */ 41, 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 */ 42, VALUE_OPT_BENCHMARK_TLS_CIPHERS, - /* equiv idx, value */ 42, 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 */ 43, VALUE_OPT_LIST, - /* equiv idx, value */ 43, 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, aListCantList, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 44, VALUE_OPT_PRIORITY_LIST, - /* equiv idx, value */ 44, VALUE_OPT_PRIORITY_LIST, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRIORITY_LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --priority-list */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRIORITY_LIST_DESC, PRIORITY_LIST_NAME, PRIORITY_LIST_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 45, VALUE_OPT_NOTICKET, - /* equiv idx, value */ 45, 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 */ 46, VALUE_OPT_SRTP_PROFILES, - /* equiv idx, value */ 46, 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 */ 47, VALUE_OPT_ALPN, - /* equiv idx, value */ 47, 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 */ 48, VALUE_OPT_HEARTBEAT, - /* equiv idx, value */ 48, 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 */ 49, VALUE_OPT_RECORDSIZE, - /* equiv idx, value */ 49, 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 */ 50, VALUE_OPT_DISABLE_SNI, - /* equiv idx, value */ 50, 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 */ 51, VALUE_OPT_DISABLE_EXTENSIONS, - /* equiv idx, value */ 51, 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 */ 52, VALUE_OPT_SINGLE_KEY_SHARE, - /* equiv idx, value */ 52, VALUE_OPT_SINGLE_KEY_SHARE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SINGLE_KEY_SHARE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --single-key-share */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SINGLE_KEY_SHARE_DESC, SINGLE_KEY_SHARE_NAME, SINGLE_KEY_SHARE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 53, VALUE_OPT_POST_HANDSHAKE_AUTH, - /* equiv idx, value */ 53, VALUE_OPT_POST_HANDSHAKE_AUTH, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ POST_HANDSHAKE_AUTH_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --post-handshake-auth */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ POST_HANDSHAKE_AUTH_DESC, POST_HANDSHAKE_AUTH_NAME, POST_HANDSHAKE_AUTH_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 54, VALUE_OPT_INLINE_COMMANDS, - /* equiv idx, value */ 54, 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 */ 55, VALUE_OPT_INLINE_COMMANDS_PREFIX, - /* equiv idx, value */ 55, 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 */ 56, VALUE_OPT_PROVIDER, - /* equiv idx, value */ 56, 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 */ 57, VALUE_OPT_FIPS140_MODE, - /* equiv idx, value */ 57, VALUE_OPT_FIPS140_MODE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ FIPS140_MODE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --fips140-mode */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ FIPS140_MODE_DESC, FIPS140_MODE_NAME, FIPS140_MODE_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. */ -#define zPROGNAME (gnutls_cli_opt_strs+4771) -/** Reference to the title line for gnutls-cli usage. */ -#define zUsageTitle (gnutls_cli_opt_strs+4782) -/** There is no gnutls-cli configuration file. */ -#define zRcName NULL -/** There are no directories to search for gnutls-cli config files. */ -#define apzHomeList NULL -/** The gnutls-cli program bug email address. */ -#define zBugsAddr (gnutls_cli_opt_strs+4878) -/** Clarification/explanation of what gnutls-cli does. */ -#define zExplain (gnutls_cli_opt_strs+4894) -/** Extra detail explaining what gnutls-cli does. */ -#define zDetail (gnutls_cli_opt_strs+4896) -/** The full version string for gnutls-cli. */ -#define zFullVersion (gnutls_cli_opt_strs+5079) -/* extracted from optcode.tlib near line 364 */ - -#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+5096) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = GNUTLS_CLI_EXIT_SUCCESS; - optionUsage(&gnutls_cliOptions, ex_code); - /* NOTREACHED */ - exit(GNUTLS_CLI_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the gnutls-cli 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the app-proto option. - * - * @param[in] pOptions the gnutls-cli options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptApp_Proto(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_STARTTLS_PROTO); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_CLI_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the mtu option. - * - * @param[in] pOptions the gnutls-cli 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509crlfile option. - * - * @param[in] pOptions the gnutls-cli 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 recordsize option. - * - * @param[in] pOptions the gnutls-cli options data structure - * @param[in,out] 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the provider option. - * This will override the default options in /etc/gnutls/pkcs11.conf - * @param[in] pOptions the gnutls-cli options data structure - * @param[in,out] 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 1250 */ - -/** - * 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 -/** Packager information for gnutls-cli. */ -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 */ - }, - 61 /* full option count */, 58 /* user option count */, - gnutls_cli_full_usage, gnutls_cli_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_cli_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * gnutls-cli program. These translations happen upon entry - * to optionProcess(). - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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. - */ - char ** ppz = (char**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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_cliOptions structure noted in the - comments below. The literal text is defined in gnutls_cli_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - gnutls_cli_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_cliOptions.pzCopyright */ - puts(_("gnutls-cli 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n")); - - /* referenced via gnutls_cliOptions.pzCopyNotice */ - puts(_("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")); - puts(_("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")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see <http://www.gnu.org/licenses/>.\n")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("More verbose output")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable trust on first use authentication")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Fail to connect if a certificate is unknown or a known certificate has\n\ -changed")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable DANE certificate verification (DNSSEC)")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Use the local DNS server for DNSSEC resolving")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable CA certificate verification")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable OCSP certificate verification")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Establish a session and resume")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Send early data on resumption from the specified file")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Establish a session and rehandshake")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Server's hostname for server name indication extension")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Server's hostname to use for validation")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Connect, establish a plain session and start TLS")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("an alias for the 'starttls-proto' option")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("The application protocol to be used to obtain the server's certificate\n\ -(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Use DTLS (datagram TLS) over UDP")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Set MTU for datagram TLS")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Send CR LF instead of LF")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable TCP Fast Open")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Use DER format for certificates to read from")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Print peer's certificate in PEM format")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Save the peer's certificate chain in the specified file in PEM format")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Save the peer's OCSP status response in the provided file")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Save the server-side TLS message trace in the provided file")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Save the client-side TLS message trace in the provided file")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("The minimum number of bits allowed for DH")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Priorities string")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("CRL file to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("X.509 key file or PKCS #11 URL to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("X.509 Certificate file or PKCS #11 URL to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("SRP username to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("SRP password to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("PSK username to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("PSK key (in hex) to use")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("The port or service to connect to")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Don't abort program if server certificate can't be validated")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Allow broken algorithms, such as MD5 for certificate verification")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Use length-hiding padding to prevent traffic analysis (deprecated)")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Benchmark individual ciphers")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Benchmark TLS key exchange methods")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Benchmark TLS ciphers")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Print a list of the supported algorithms and modes")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Print a list of the supported priority strings")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Don't allow session tickets")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Offer SRTP profiles")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Application layer protocol")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Activate heartbeat support")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("The maximum record size to advertize")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Do not send a Server Name Indication (SNI)")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Disable all the TLS extensions (deprecated)")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Send a single key share under TLS1.3")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Enable post-handshake authentication under TLS1.3")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Inline commands of the form ^<cmd>^")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Change the default delimiter for inline commands.")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Specify the PKCS #11 provider library")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("Reports the status of the FIPS140-2 mode in gnutls library")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via gnutls_cliOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via gnutls_cliOptions.pzUsageTitle */ - puts(_("gnutls-cli - GnuTLS client\n\ -Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostname]\n")); - - /* referenced via gnutls_cliOptions.pzExplain */ - puts(_("\n")); - - /* referenced via gnutls_cliOptions.pzDetail */ - puts(_("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")); - - /* referenced via gnutls_cliOptions.pzFullVersion */ - puts(_("gnutls-cli 3.6.4")); - - /* referenced via gnutls_cliOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via gnutls_cliOptions.pzShortUsage */ - puts(_("Usage: gnutls-cli [options] hostname\n\ -gnutls-cli --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* cli-args.c ends here */ diff --git a/src/cli-args.h.bak b/src/cli-args.h.bak deleted file mode 100644 index a1788f6d86..0000000000 --- a/src/cli-args.h.bak +++ /dev/null @@ -1,333 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-args.h) - * - * It has been AutoGen-ed - * From the definitions cli-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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 - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_VERBOSE = 1, - INDEX_OPT_TOFU = 2, - INDEX_OPT_STRICT_TOFU = 3, - INDEX_OPT_DANE = 4, - INDEX_OPT_LOCAL_DNS = 5, - INDEX_OPT_CA_VERIFICATION = 6, - INDEX_OPT_OCSP = 7, - INDEX_OPT_RESUME = 8, - INDEX_OPT_EARLYDATA = 9, - INDEX_OPT_REHANDSHAKE = 10, - INDEX_OPT_SNI_HOSTNAME = 11, - INDEX_OPT_VERIFY_HOSTNAME = 12, - INDEX_OPT_STARTTLS = 13, - INDEX_OPT_APP_PROTO = 14, - INDEX_OPT_STARTTLS_PROTO = 15, - INDEX_OPT_UDP = 16, - INDEX_OPT_MTU = 17, - INDEX_OPT_CRLF = 18, - INDEX_OPT_FASTOPEN = 19, - INDEX_OPT_X509FMTDER = 20, - INDEX_OPT_PRINT_CERT = 21, - INDEX_OPT_SAVE_CERT = 22, - INDEX_OPT_SAVE_OCSP = 23, - INDEX_OPT_SAVE_SERVER_TRACE = 24, - INDEX_OPT_SAVE_CLIENT_TRACE = 25, - INDEX_OPT_DH_BITS = 26, - INDEX_OPT_PRIORITY = 27, - INDEX_OPT_X509CAFILE = 28, - INDEX_OPT_X509CRLFILE = 29, - INDEX_OPT_X509KEYFILE = 30, - INDEX_OPT_X509CERTFILE = 31, - INDEX_OPT_SRPUSERNAME = 32, - INDEX_OPT_SRPPASSWD = 33, - INDEX_OPT_PSKUSERNAME = 34, - INDEX_OPT_PSKKEY = 35, - INDEX_OPT_PORT = 36, - INDEX_OPT_INSECURE = 37, - INDEX_OPT_VERIFY_ALLOW_BROKEN = 38, - INDEX_OPT_RANGES = 39, - INDEX_OPT_BENCHMARK_CIPHERS = 40, - INDEX_OPT_BENCHMARK_TLS_KX = 41, - INDEX_OPT_BENCHMARK_TLS_CIPHERS = 42, - INDEX_OPT_LIST = 43, - INDEX_OPT_PRIORITY_LIST = 44, - INDEX_OPT_NOTICKET = 45, - INDEX_OPT_SRTP_PROFILES = 46, - INDEX_OPT_ALPN = 47, - INDEX_OPT_HEARTBEAT = 48, - INDEX_OPT_RECORDSIZE = 49, - INDEX_OPT_DISABLE_SNI = 50, - INDEX_OPT_DISABLE_EXTENSIONS = 51, - INDEX_OPT_SINGLE_KEY_SHARE = 52, - INDEX_OPT_POST_HANDSHAKE_AUTH = 53, - INDEX_OPT_INLINE_COMMANDS = 54, - INDEX_OPT_INLINE_COMMANDS_PREFIX = 55, - INDEX_OPT_PROVIDER = 56, - INDEX_OPT_FIPS140_MODE = 57, - INDEX_OPT_VERSION = 58, - INDEX_OPT_HELP = 59, - INDEX_OPT_MORE_HELP = 60 -} teOptIndex; -/** count of all options for gnutls-cli */ -#define OPTION_CT 61 -/** gnutls-cli version */ -#define GNUTLS_CLI_VERSION "3.6.4" -/** Full gnutls-cli version text */ -#define GNUTLS_CLI_FULL_VERSION "gnutls-cli 3.6.4" - -/** - * 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]) -/** '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 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 0x1001 -#define VALUE_OPT_STRICT_TOFU 0x1002 -#define VALUE_OPT_DANE 0x1003 -#define VALUE_OPT_LOCAL_DNS 0x1004 -#define VALUE_OPT_CA_VERIFICATION 0x1005 -#define VALUE_OPT_OCSP 0x1006 -#define VALUE_OPT_RESUME 'r' -#define VALUE_OPT_EARLYDATA 0x1007 -#define VALUE_OPT_REHANDSHAKE 'e' -#define VALUE_OPT_SNI_HOSTNAME 0x1008 -#define VALUE_OPT_VERIFY_HOSTNAME 0x1009 -#define VALUE_OPT_STARTTLS 's' -#define VALUE_OPT_APP_PROTO 0x100A -#define VALUE_OPT_STARTTLS_PROTO 0x100B -#define VALUE_OPT_UDP 'u' -#define VALUE_OPT_MTU 0x100C - -#define OPT_VALUE_MTU (DESC(MTU).optArg.argInt) -#define VALUE_OPT_CRLF 0x100D -#define VALUE_OPT_FASTOPEN 0x100E -#define VALUE_OPT_X509FMTDER 0x100F -#define VALUE_OPT_PRINT_CERT 0x1010 -#define VALUE_OPT_SAVE_CERT 0x1011 -#define VALUE_OPT_SAVE_OCSP 0x1012 -#define VALUE_OPT_SAVE_SERVER_TRACE 0x1013 -#define VALUE_OPT_SAVE_CLIENT_TRACE 0x1014 -#define VALUE_OPT_DH_BITS 0x1015 - -#define OPT_VALUE_DH_BITS (DESC(DH_BITS).optArg.argInt) -#define VALUE_OPT_PRIORITY 0x1016 -#define VALUE_OPT_X509CAFILE 0x1017 -#define VALUE_OPT_X509CRLFILE 0x1018 -#define VALUE_OPT_X509KEYFILE 0x1019 -#define VALUE_OPT_X509CERTFILE 0x101A -#define VALUE_OPT_SRPUSERNAME 0x101B -#define VALUE_OPT_SRPPASSWD 0x101C -#define VALUE_OPT_PSKUSERNAME 0x101D -#define VALUE_OPT_PSKKEY 0x101E -#define VALUE_OPT_PORT 'p' -#define VALUE_OPT_INSECURE 0x101F -#define VALUE_OPT_VERIFY_ALLOW_BROKEN 0x1020 -#define VALUE_OPT_RANGES 0x1021 -#define VALUE_OPT_BENCHMARK_CIPHERS 0x1022 -#define VALUE_OPT_BENCHMARK_TLS_KX 0x1023 -#define VALUE_OPT_BENCHMARK_TLS_CIPHERS 0x1024 -#define VALUE_OPT_LIST 'l' -#define VALUE_OPT_PRIORITY_LIST 0x1025 -#define VALUE_OPT_NOTICKET 0x1026 -#define VALUE_OPT_SRTP_PROFILES 0x1027 -#define VALUE_OPT_ALPN 0x1028 -#define VALUE_OPT_HEARTBEAT 'b' -#define VALUE_OPT_RECORDSIZE 0x1029 - -#define OPT_VALUE_RECORDSIZE (DESC(RECORDSIZE).optArg.argInt) -#define VALUE_OPT_DISABLE_SNI 0x102A -#define VALUE_OPT_DISABLE_EXTENSIONS 0x102B -#define VALUE_OPT_SINGLE_KEY_SHARE 0x102C -#define VALUE_OPT_POST_HANDSHAKE_AUTH 0x102D -#define VALUE_OPT_INLINE_COMMANDS 0x102E -#define VALUE_OPT_INLINE_COMMANDS_PREFIX 0x102F -#define VALUE_OPT_PROVIDER 0x1030 -#define VALUE_OPT_FIPS140_MODE 0x1031 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value option */ -#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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the gnutls-cli option descriptor. - */ -extern tOptions gnutls_cliOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/cli-debug-args.c.bak deleted file mode 100644 index 1b30eb17e6..0000000000 --- a/src/cli-debug-args.c.bak +++ /dev/null @@ -1,1023 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-debug-args.c) - * - * It has been AutoGen-ed - * From the definitions cli-debug-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "cli-debug-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#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+291) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for gnutls-cli-debug options - */ -static char const gnutls_cli_debug_opt_strs[2042] = -/* 0 */ "gnutls-cli-debug 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 291 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 912 */ "Enable debugging\0" -/* 929 */ "DEBUG\0" -/* 935 */ "debug\0" -/* 941 */ "More verbose output\0" -/* 961 */ "VERBOSE\0" -/* 969 */ "verbose\0" -/* 977 */ "The port to connect to\0" -/* 1000 */ "PORT\0" -/* 1005 */ "port\0" -/* 1010 */ "an alias for the 'starttls-proto' option\0" -/* 1051 */ "app-proto\0" -/* 1061 */ "The application protocol to be used to obtain the server's certificate\n" - "(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)\0" -/* 1204 */ "STARTTLS_PROTO\0" -/* 1219 */ "starttls-proto\0" -/* 1234 */ "display extended usage information and exit\0" -/* 1278 */ "help\0" -/* 1283 */ "extended usage information passed thru pager\0" -/* 1328 */ "more-help\0" -/* 1338 */ "output version information and exit\0" -/* 1374 */ "version\0" -/* 1382 */ "GNUTLS_CLI_DEBUG\0" -/* 1399 */ "gnutls-cli-debug - GnuTLS debug client\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \n\0" -/* 1497 */ "bugs@gnutls.org\0" -/* 1513 */ "\n\0" -/* 1515 */ "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" -/* 1933 */ "gnutls-cli-debug 3.6.4\0" -/* 1956 */ "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+912) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (gnutls_cli_debug_opt_strs+929) -/** Name string for the debug option */ -#define DEBUG_name (gnutls_cli_debug_opt_strs+935) -/** 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+941) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (gnutls_cli_debug_opt_strs+961) -/** Name string for the verbose option */ -#define VERBOSE_name (gnutls_cli_debug_opt_strs+969) -/** 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+977) -/** Upper-cased name for the port option */ -#define PORT_NAME (gnutls_cli_debug_opt_strs+1000) -/** Name string for the port option */ -#define PORT_name (gnutls_cli_debug_opt_strs+1005) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * app-proto option description: - */ -/** Descriptive text for the app-proto option */ -#define APP_PROTO_DESC (gnutls_cli_debug_opt_strs+1010) -#define APP_PROTO_NAME NULL -/** Unmodified name string for the app-proto option */ -#define APP_PROTO_name (gnutls_cli_debug_opt_strs+1051) -/** Compiled in flag settings for the app-proto option */ -#define APP_PROTO_FLAGS (STARTTLS_PROTO_FLAGS | OPTST_ALIAS) - -/** - * starttls-proto option description: - */ -/** Descriptive text for the starttls-proto option */ -#define STARTTLS_PROTO_DESC (gnutls_cli_debug_opt_strs+1061) -/** Upper-cased name for the starttls-proto option */ -#define STARTTLS_PROTO_NAME (gnutls_cli_debug_opt_strs+1204) -/** Name string for the starttls-proto option */ -#define STARTTLS_PROTO_name (gnutls_cli_debug_opt_strs+1219) -/** Compiled in flag settings for the starttls-proto option */ -#define STARTTLS_PROTO_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_cli_debug_opt_strs+1234) -#define HELP_name (gnutls_cli_debug_opt_strs+1278) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_cli_debug_opt_strs+1283) -#define MORE_HELP_name (gnutls_cli_debug_opt_strs+1328) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+1338) -#define VER_name (gnutls_cli_debug_opt_strs+1374) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptApp_Proto, 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 */ 3, VALUE_OPT_APP_PROTO, - /* equiv idx, value */ 3, VALUE_OPT_APP_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ APP_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --app-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptApp_Proto, - /* desc, NAME, name */ APP_PROTO_DESC, APP_PROTO_NAME, APP_PROTO_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 4, VALUE_OPT_STARTTLS_PROTO, - /* equiv idx, value */ 4, VALUE_OPT_STARTTLS_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STARTTLS_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --starttls-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ STARTTLS_PROTO_DESC, STARTTLS_PROTO_NAME, STARTTLS_PROTO_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+1382) -/** Reference to the title line for gnutls-cli-debug usage. */ -#define zUsageTitle (gnutls_cli_debug_opt_strs+1399) -/** 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+1497) -/** Clarification/explanation of what gnutls-cli-debug does. */ -#define zExplain (gnutls_cli_debug_opt_strs+1513) -/** Extra detail explaining what gnutls-cli-debug does. */ -#define zDetail (gnutls_cli_debug_opt_strs+1515) -/** The full version string for gnutls-cli-debug. */ -#define zFullVersion (gnutls_cli_debug_opt_strs+1933) -/* extracted from optcode.tlib near line 364 */ - -#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+1956) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = GNUTLS_CLI_DEBUG_EXIT_SUCCESS; - optionUsage(&gnutls_cli_debugOptions, ex_code); - /* NOTREACHED */ - exit(GNUTLS_CLI_DEBUG_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the app-proto option. - * - * @param[in] pOptions the gnutls-cli-debug options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptApp_Proto(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_STARTTLS_PROTO); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_CLI_DEBUG_EXIT_USAGE_ERROR); - -} -/* extracted from optmain.tlib near line 1250 */ - -/** - * 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 */ - }, - 8 /* full option count */, 5 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\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(_("an alias for the 'starttls-proto' option")); - - /* referenced via gnutls_cli_debugOptions.pOptDesc->pzText */ - puts(_("The application protocol to be used to obtain the server's certificate\n\ -(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)")); - - /* 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \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 3.6.4")); - - /* referenced via gnutls_cli_debugOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via gnutls_cli_debugOptions.pzShortUsage */ - puts(_("Usage: gnutls-cli-debug [options] hostname\n\ -gnutls-cli --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../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.bak b/src/cli-debug-args.h.bak deleted file mode 100644 index ff6863e9b7..0000000000 --- a/src/cli-debug-args.h.bak +++ /dev/null @@ -1,223 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (cli-debug-args.h) - * - * It has been AutoGen-ed - * From the definitions cli-debug-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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_APP_PROTO = 3, - INDEX_OPT_STARTTLS_PROTO = 4, - INDEX_OPT_VERSION = 5, - INDEX_OPT_HELP = 6, - INDEX_OPT_MORE_HELP = 7 -} teOptIndex; -/** count of all options for gnutls-cli-debug */ -#define OPTION_CT 8 -/** gnutls-cli-debug version */ -#define GNUTLS_CLI_DEBUG_VERSION "3.6.4" -/** Full gnutls-cli-debug version text */ -#define GNUTLS_CLI_DEBUG_FULL_VERSION "gnutls-cli-debug 3.6.4" - -/** - * 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) -#define VALUE_OPT_APP_PROTO 0x1001 -#define VALUE_OPT_STARTTLS_PROTO 0x1002 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the gnutls-cli-debug option descriptor. - */ -extern tOptions gnutls_cli_debugOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/danetool-args.c.bak deleted file mode 100644 index 825e4f1edb..0000000000 --- a/src/danetool-args.c.bak +++ /dev/null @@ -1,1723 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (danetool-args.c) - * - * It has been AutoGen-ed - * From the definitions danetool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "danetool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (danetool_opt_strs+0) -#define zLicenseDescrip (danetool_opt_strs+283) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for danetool options - */ -static char const danetool_opt_strs[2870] = -/* 0 */ "danetool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 283 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 888 */ "Enable debugging\0" -/* 905 */ "DEBUG\0" -/* 911 */ "debug\0" -/* 917 */ "More verbose output\0" -/* 937 */ "VERBOSE\0" -/* 945 */ "verbose\0" -/* 953 */ "Input file\0" -/* 964 */ "INFILE\0" -/* 971 */ "infile\0" -/* 978 */ "Output file\0" -/* 990 */ "OUTFILE\0" -/* 998 */ "outfile\0" -/* 1006 */ "Loads a public key file\0" -/* 1030 */ "LOAD_PUBKEY\0" -/* 1042 */ "load-pubkey\0" -/* 1054 */ "Loads a certificate file\0" -/* 1079 */ "LOAD_CERTIFICATE\0" -/* 1096 */ "load-certificate\0" -/* 1113 */ "Sets a DLV file\0" -/* 1129 */ "DLV\0" -/* 1133 */ "dlv\0" -/* 1137 */ "Hash algorithm to use for signing\0" -/* 1171 */ "HASH\0" -/* 1176 */ "hash\0" -/* 1181 */ "Check a host's DANE TLSA entry\0" -/* 1212 */ "CHECK\0" -/* 1218 */ "check\0" -/* 1224 */ "Check only the end-entity's certificate\0" -/* 1264 */ "CHECK_EE\0" -/* 1273 */ "check-ee\0" -/* 1282 */ "Check only the CA's certificate\0" -/* 1314 */ "CHECK_CA\0" -/* 1323 */ "check-ca\0" -/* 1332 */ "Print the DANE RR data on a certificate or public key\0" -/* 1386 */ "TLSA_RR\0" -/* 1394 */ "tlsa-rr\0" -/* 1402 */ "Specify the hostname to be used in the DANE RR\0" -/* 1449 */ "HOST\0" -/* 1454 */ "host\0" -/* 1459 */ "The protocol set for DANE data (tcp, udp etc.)\0" -/* 1506 */ "PROTO\0" -/* 1512 */ "proto\0" -/* 1518 */ "The port or service to connect to, for DANE data\0" -/* 1567 */ "PORT\0" -/* 1572 */ "port\0" -/* 1577 */ "an alias for the 'starttls-proto' option\0" -/* 1618 */ "app-proto\0" -/* 1628 */ "The application protocol to be used to obtain the server's certificate\n" - "(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)\0" -/* 1771 */ "STARTTLS_PROTO\0" -/* 1786 */ "starttls-proto\0" -/* 1801 */ "Whether the provided certificate or public key is a Certificate\n" - "Authority\0" -/* 1875 */ "CA\0" -/* 1878 */ "ca\0" -/* 1881 */ "Use the hash of the X.509 certificate, rather than the public key\0" -/* 1947 */ "X509\0" -/* 1952 */ "x509\0" -/* 1957 */ "an alias for the 'domain' option\0" -/* 1990 */ "local\0" -/* 1996 */ "The provided certificate or public key is issued by the local domain\0" -/* 2065 */ "DOMAIN\0" -/* 2072 */ "no-domain\0" -/* 2082 */ "no\0" -/* 2085 */ "Use the local DNS server for DNSSEC resolving\0" -/* 2131 */ "LOCAL_DNS\0" -/* 2141 */ "no-local-dns\0" -/* 2154 */ "Do not verify any DNSSEC signature\0" -/* 2189 */ "INSECURE\0" -/* 2198 */ "insecure\0" -/* 2207 */ "Use DER format for input certificates and private keys\0" -/* 2262 */ "INDER\0" -/* 2268 */ "no-inder\0" -/* 2277 */ "an alias for the 'inder' option\0" -/* 2309 */ "inraw\0" -/* 2315 */ "Print the received DANE data in raw format\0" -/* 2358 */ "PRINT_RAW\0" -/* 2368 */ "no-print-raw\0" -/* 2381 */ "Suppress several informational messages\0" -/* 2421 */ "QUIET\0" -/* 2427 */ "quiet\0" -/* 2433 */ "display extended usage information and exit\0" -/* 2477 */ "help\0" -/* 2482 */ "extended usage information passed thru pager\0" -/* 2527 */ "more-help\0" -/* 2537 */ "output version information and exit\0" -/* 2573 */ "version\0" -/* 2581 */ "DANETOOL\0" -/* 2590 */ "danetool - GnuTLS DANE tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 2676 */ "bugs@gnutls.org\0" -/* 2692 */ "\n\0" -/* 2694 */ "Tool to generate and check DNS resource records for the DANE protocol.\n\0" -/* 2766 */ "danetool 3.6.4\0" -/* 2781 */ "danetool --[tlsa-rr|check] [options]\n" - "danetool --help for additional usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (danetool_opt_strs+888) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (danetool_opt_strs+905) -/** Name string for the debug option */ -#define DEBUG_name (danetool_opt_strs+911) -/** 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+917) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (danetool_opt_strs+937) -/** Name string for the verbose option */ -#define VERBOSE_name (danetool_opt_strs+945) -/** 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+953) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (danetool_opt_strs+964) -/** Name string for the infile option */ -#define INFILE_name (danetool_opt_strs+971) -/** 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+978) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (danetool_opt_strs+990) -/** Name string for the outfile option */ -#define OUTFILE_name (danetool_opt_strs+998) -/** 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+1006) -/** Upper-cased name for the load-pubkey option */ -#define LOAD_PUBKEY_NAME (danetool_opt_strs+1030) -/** Name string for the load-pubkey option */ -#define LOAD_PUBKEY_name (danetool_opt_strs+1042) -/** 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+1054) -/** Upper-cased name for the load-certificate option */ -#define LOAD_CERTIFICATE_NAME (danetool_opt_strs+1079) -/** Name string for the load-certificate option */ -#define LOAD_CERTIFICATE_name (danetool_opt_strs+1096) -/** 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+1113) -/** Upper-cased name for the dlv option */ -#define DLV_NAME (danetool_opt_strs+1129) -/** Name string for the dlv option */ -#define DLV_name (danetool_opt_strs+1133) -/** 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+1137) -/** Upper-cased name for the hash option */ -#define HASH_NAME (danetool_opt_strs+1171) -/** Name string for the hash option */ -#define HASH_name (danetool_opt_strs+1176) -/** 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+1181) -/** Upper-cased name for the check option */ -#define CHECK_NAME (danetool_opt_strs+1212) -/** Name string for the check option */ -#define CHECK_name (danetool_opt_strs+1218) -/** 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+1224) -/** Upper-cased name for the check-ee option */ -#define CHECK_EE_NAME (danetool_opt_strs+1264) -/** Name string for the check-ee option */ -#define CHECK_EE_name (danetool_opt_strs+1273) -/** 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+1282) -/** Upper-cased name for the check-ca option */ -#define CHECK_CA_NAME (danetool_opt_strs+1314) -/** Name string for the check-ca option */ -#define CHECK_CA_name (danetool_opt_strs+1323) -/** Compiled in flag settings for the check-ca option */ -#define CHECK_CA_FLAGS (OPTST_DISABLED) - -/** - * 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+1332) -/** Upper-cased name for the tlsa-rr option */ -#define TLSA_RR_NAME (danetool_opt_strs+1386) -/** Name string for the tlsa-rr option */ -#define TLSA_RR_name (danetool_opt_strs+1394) -/** 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+1402) -/** Upper-cased name for the host option */ -#define HOST_NAME (danetool_opt_strs+1449) -/** Name string for the host option */ -#define HOST_name (danetool_opt_strs+1454) -/** 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+1459) -/** Upper-cased name for the proto option */ -#define PROTO_NAME (danetool_opt_strs+1506) -/** Name string for the proto option */ -#define PROTO_name (danetool_opt_strs+1512) -/** 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+1518) -/** Upper-cased name for the port option */ -#define PORT_NAME (danetool_opt_strs+1567) -/** Name string for the port option */ -#define PORT_name (danetool_opt_strs+1572) -/** Compiled in flag settings for the port option */ -#define PORT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * app-proto option description: - */ -/** Descriptive text for the app-proto option */ -#define APP_PROTO_DESC (danetool_opt_strs+1577) -#define APP_PROTO_NAME NULL -/** Unmodified name string for the app-proto option */ -#define APP_PROTO_name (danetool_opt_strs+1618) -/** Compiled in flag settings for the app-proto option */ -#define APP_PROTO_FLAGS (STARTTLS_PROTO_FLAGS | OPTST_ALIAS) - -/** - * starttls-proto option description: - */ -/** Descriptive text for the starttls-proto option */ -#define STARTTLS_PROTO_DESC (danetool_opt_strs+1628) -/** Upper-cased name for the starttls-proto option */ -#define STARTTLS_PROTO_NAME (danetool_opt_strs+1771) -/** Name string for the starttls-proto option */ -#define STARTTLS_PROTO_name (danetool_opt_strs+1786) -/** Compiled in flag settings for the starttls-proto option */ -#define STARTTLS_PROTO_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * ca option description: - */ -/** Descriptive text for the ca option */ -#define CA_DESC (danetool_opt_strs+1801) -/** Upper-cased name for the ca option */ -#define CA_NAME (danetool_opt_strs+1875) -/** Name string for the ca option */ -#define CA_name (danetool_opt_strs+1878) -/** 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+1881) -/** Upper-cased name for the x509 option */ -#define X509_NAME (danetool_opt_strs+1947) -/** Name string for the x509 option */ -#define X509_name (danetool_opt_strs+1952) -/** 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+1957) -#define LOCAL_NAME NULL -/** Unmodified name string for the local option */ -#define LOCAL_name (danetool_opt_strs+1990) -/** 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+1996) -/** Upper-cased name for the domain option */ -#define DOMAIN_NAME (danetool_opt_strs+2065) -/** disablement name for the domain option */ -#define NOT_DOMAIN_name (danetool_opt_strs+2072) -/** disablement prefix for the domain option */ -#define NOT_DOMAIN_PFX (danetool_opt_strs+2082) -/** 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) - -/** - * local-dns option description: - */ -/** Descriptive text for the local-dns option */ -#define LOCAL_DNS_DESC (danetool_opt_strs+2085) -/** Upper-cased name for the local-dns option */ -#define LOCAL_DNS_NAME (danetool_opt_strs+2131) -/** disablement name for the local-dns option */ -#define NOT_LOCAL_DNS_name (danetool_opt_strs+2141) -/** disablement prefix for the local-dns option */ -#define NOT_LOCAL_DNS_PFX (danetool_opt_strs+2082) -/** 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) - -/** - * insecure option description: - */ -/** Descriptive text for the insecure option */ -#define INSECURE_DESC (danetool_opt_strs+2154) -/** Upper-cased name for the insecure option */ -#define INSECURE_NAME (danetool_opt_strs+2189) -/** Name string for the insecure option */ -#define INSECURE_name (danetool_opt_strs+2198) -/** Compiled in flag settings for the insecure option */ -#define INSECURE_FLAGS (OPTST_DISABLED) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (danetool_opt_strs+2207) -/** Upper-cased name for the inder option */ -#define INDER_NAME (danetool_opt_strs+2262) -/** disablement name for the inder option */ -#define NOT_INDER_name (danetool_opt_strs+2268) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (danetool_opt_strs+2082) -/** 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+2277) -#define INRAW_NAME NULL -/** Unmodified name string for the inraw option */ -#define INRAW_name (danetool_opt_strs+2309) -/** Compiled in flag settings for the inraw option */ -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/** - * print-raw option description: - */ -/** Descriptive text for the print-raw option */ -#define PRINT_RAW_DESC (danetool_opt_strs+2315) -/** Upper-cased name for the print-raw option */ -#define PRINT_RAW_NAME (danetool_opt_strs+2358) -/** disablement name for the print-raw option */ -#define NOT_PRINT_RAW_name (danetool_opt_strs+2368) -/** disablement prefix for the print-raw option */ -#define NOT_PRINT_RAW_PFX (danetool_opt_strs+2082) -/** Name string for the print-raw option */ -#define PRINT_RAW_name (NOT_PRINT_RAW_name + 3) -/** Compiled in flag settings for the print-raw option */ -#define PRINT_RAW_FLAGS (OPTST_DISABLED) - -/** - * quiet option description: - */ -/** Descriptive text for the quiet option */ -#define QUIET_DESC (danetool_opt_strs+2381) -/** Upper-cased name for the quiet option */ -#define QUIET_NAME (danetool_opt_strs+2421) -/** Name string for the quiet option */ -#define QUIET_name (danetool_opt_strs+2427) -/** Compiled in flag settings for the quiet option */ -#define QUIET_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (danetool_opt_strs+2433) -#define HELP_name (danetool_opt_strs+2477) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (danetool_opt_strs+2482) -#define MORE_HELP_name (danetool_opt_strs+2527) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+2537) -#define VER_name (danetool_opt_strs+2573) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptApp_Proto, 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_TLSA_RR, - /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_HOST, - /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_PROTO, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_PORT, - /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_APP_PROTO, - /* equiv idx, value */ 15, VALUE_OPT_APP_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ APP_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --app-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptApp_Proto, - /* desc, NAME, name */ APP_PROTO_DESC, APP_PROTO_NAME, APP_PROTO_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 16, VALUE_OPT_STARTTLS_PROTO, - /* equiv idx, value */ 16, VALUE_OPT_STARTTLS_PROTO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STARTTLS_PROTO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --starttls-proto */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ STARTTLS_PROTO_DESC, STARTTLS_PROTO_NAME, STARTTLS_PROTO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_CA, - /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_X509, - /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_LOCAL, - /* equiv idx, value */ 19, 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 */ 20, VALUE_OPT_DOMAIN, - /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_LOCAL_DNS, - /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_INSECURE, - /* equiv idx, value */ 22, 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 */ 23, VALUE_OPT_INDER, - /* equiv idx, value */ 23, 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 */ 24, VALUE_OPT_INRAW, - /* equiv idx, value */ 24, 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 */ 25, VALUE_OPT_PRINT_RAW, - /* equiv idx, value */ 25, VALUE_OPT_PRINT_RAW, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PRINT_RAW_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --print-raw */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PRINT_RAW_DESC, PRINT_RAW_NAME, PRINT_RAW_name, - /* disablement strs */ NOT_PRINT_RAW_name, NOT_PRINT_RAW_PFX }, - - { /* entry idx, value */ 26, VALUE_OPT_QUIET, - /* equiv idx, value */ 26, 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 */ 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+2581) -/** Reference to the title line for danetool usage. */ -#define zUsageTitle (danetool_opt_strs+2590) -/** 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+2676) -/** Clarification/explanation of what danetool does. */ -#define zExplain (danetool_opt_strs+2692) -/** Extra detail explaining what danetool does. */ -#define zDetail (danetool_opt_strs+2694) -/** The full version string for danetool. */ -#define zFullVersion (danetool_opt_strs+2766) -/* extracted from optcode.tlib near line 364 */ - -#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+2781) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = DANETOOL_EXIT_SUCCESS; - optionUsage(&danetoolOptions, ex_code); - /* NOTREACHED */ - exit(DANETOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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 app-proto option. - * - * @param[in] pOptions the danetool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptApp_Proto(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_STARTTLS_PROTO); - 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); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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); - -} -/* extracted from optmain.tlib near line 1250 */ - -/** - * 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 */ - }, - 30 /* full option count */, 27 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\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(_("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(_("The port or service to connect to, for DANE data")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'starttls-proto' option")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("The application protocol to be used to obtain the server's certificate\n\ -(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)")); - - /* 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(_("Use the local DNS server for DNSSEC resolving")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Do not verify any DNSSEC signature")); - - /* 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 received DANE data in raw format")); - - /* referenced via danetoolOptions.pOptDesc->pzText */ - puts(_("Suppress several informational messages")); - - /* 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\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 3.6.4")); - - /* referenced via danetoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via danetoolOptions.pzShortUsage */ - puts(_("danetool --[tlsa-rr|check] [options]\n\ -danetool --help for additional usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../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.bak b/src/danetool-args.h.bak deleted file mode 100644 index 8d535e11a6..0000000000 --- a/src/danetool-args.h.bak +++ /dev/null @@ -1,265 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (danetool-args.h) - * - * It has been AutoGen-ed - * From the definitions danetool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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_TLSA_RR = 11, - INDEX_OPT_HOST = 12, - INDEX_OPT_PROTO = 13, - INDEX_OPT_PORT = 14, - INDEX_OPT_APP_PROTO = 15, - INDEX_OPT_STARTTLS_PROTO = 16, - INDEX_OPT_CA = 17, - INDEX_OPT_X509 = 18, - INDEX_OPT_LOCAL = 19, - INDEX_OPT_DOMAIN = 20, - INDEX_OPT_LOCAL_DNS = 21, - INDEX_OPT_INSECURE = 22, - INDEX_OPT_INDER = 23, - INDEX_OPT_INRAW = 24, - INDEX_OPT_PRINT_RAW = 25, - INDEX_OPT_QUIET = 26, - INDEX_OPT_VERSION = 27, - INDEX_OPT_HELP = 28, - INDEX_OPT_MORE_HELP = 29 -} teOptIndex; -/** count of all options for danetool */ -#define OPTION_CT 30 -/** danetool version */ -#define DANETOOL_VERSION "3.6.4" -/** Full danetool version text */ -#define DANETOOL_FULL_VERSION "danetool 3.6.4" - -/** - * 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 0x1001 -#define VALUE_OPT_OUTFILE 0x1002 -#define VALUE_OPT_LOAD_PUBKEY 0x1003 -#define VALUE_OPT_LOAD_CERTIFICATE 0x1004 -#define VALUE_OPT_DLV 0x1005 -#define VALUE_OPT_HASH 0x1006 -#define VALUE_OPT_CHECK 0x1007 -#define VALUE_OPT_CHECK_EE 0x1008 -#define VALUE_OPT_CHECK_CA 0x1009 -#define VALUE_OPT_TLSA_RR 0x100A -#define VALUE_OPT_HOST 0x100B -#define VALUE_OPT_PROTO 0x100C -#define VALUE_OPT_PORT 0x100D -#define VALUE_OPT_APP_PROTO 0x100E -#define VALUE_OPT_STARTTLS_PROTO 0x100F -#define VALUE_OPT_CA 0x1010 -#define VALUE_OPT_X509 0x1011 -#define VALUE_OPT_LOCAL 0x1012 -#define VALUE_OPT_DOMAIN 0x1013 -#define VALUE_OPT_LOCAL_DNS 0x1014 -#define VALUE_OPT_INSECURE 0x1015 -#define VALUE_OPT_INDER 0x1016 -#define VALUE_OPT_INRAW 0x1017 -#define VALUE_OPT_PRINT_RAW 0x1018 -#define VALUE_OPT_QUIET 0x1019 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the danetool option descriptor. - */ -extern tOptions danetoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/ocsptool-args.c.bak deleted file mode 100644 index 3cf1db61ef..0000000000 --- a/src/ocsptool-args.c.bak +++ /dev/null @@ -1,1700 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (ocsptool-args.c) - * - * It has been AutoGen-ed - * From the definitions ocsptool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "ocsptool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (ocsptool_opt_strs+0) -#define zLicenseDescrip (ocsptool_opt_strs+283) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for ocsptool options - */ -static char const ocsptool_opt_strs[2758] = -/* 0 */ "ocsptool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 283 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 888 */ "Enable debugging\0" -/* 905 */ "DEBUG\0" -/* 911 */ "debug\0" -/* 917 */ "More verbose output\0" -/* 937 */ "VERBOSE\0" -/* 945 */ "verbose\0" -/* 953 */ "Input file\0" -/* 964 */ "INFILE\0" -/* 971 */ "infile\0" -/* 978 */ "Output file\0" -/* 990 */ "OUTFILE\0" -/* 998 */ "outfile\0" -/* 1006 */ "Ask an OCSP/HTTP server on a certificate validity\0" -/* 1056 */ "ASK\0" -/* 1060 */ "ask\0" -/* 1064 */ "Verify response\0" -/* 1080 */ "VERIFY_RESPONSE\0" -/* 1096 */ "verify-response\0" -/* 1112 */ "Print information on a OCSP request\0" -/* 1148 */ "REQUEST_INFO\0" -/* 1161 */ "request-info\0" -/* 1174 */ "Print information on a OCSP response\0" -/* 1211 */ "RESPONSE_INFO\0" -/* 1225 */ "response-info\0" -/* 1239 */ "Generates an OCSP request\0" -/* 1265 */ "GENERATE_REQUEST\0" -/* 1282 */ "generate-request\0" -/* 1299 */ "Use (or not) a nonce to OCSP request\0" -/* 1336 */ "NONCE\0" -/* 1342 */ "no-nonce\0" -/* 1351 */ "no\0" -/* 1354 */ "Reads a set of certificates forming a chain from file\0" -/* 1408 */ "LOAD_CHAIN\0" -/* 1419 */ "load-chain\0" -/* 1430 */ "Reads issuer's certificate from file\0" -/* 1467 */ "LOAD_ISSUER\0" -/* 1479 */ "load-issuer\0" -/* 1491 */ "Reads the certificate to check from file\0" -/* 1532 */ "LOAD_CERT\0" -/* 1542 */ "load-cert\0" -/* 1552 */ "Read OCSP trust anchors from file\0" -/* 1586 */ "LOAD_TRUST\0" -/* 1597 */ "load-trust\0" -/* 1608 */ "Reads the OCSP response signer from file\0" -/* 1649 */ "LOAD_SIGNER\0" -/* 1661 */ "load-signer\0" -/* 1673 */ "Use DER format for input certificates and private keys\0" -/* 1728 */ "INDER\0" -/* 1734 */ "no-inder\0" -/* 1743 */ "Use DER format for output of responses (this is the default)\0" -/* 1804 */ "OUTDER\0" -/* 1811 */ "outder\0" -/* 1818 */ "Use PEM format for output of responses\0" -/* 1857 */ "OUTPEM\0" -/* 1864 */ "outpem\0" -/* 1871 */ "Reads the DER encoded OCSP request from file\0" -/* 1916 */ "LOAD_REQUEST\0" -/* 1929 */ "load-request\0" -/* 1942 */ "Reads the DER encoded OCSP response from file\0" -/* 1988 */ "LOAD_RESPONSE\0" -/* 2002 */ "load-response\0" -/* 2016 */ "Ignore any verification errors\0" -/* 2047 */ "IGNORE_ERRORS\0" -/* 2061 */ "ignore-errors\0" -/* 2075 */ "Allow broken algorithms, such as MD5 for verification\0" -/* 2129 */ "VERIFY_ALLOW_BROKEN\0" -/* 2149 */ "verify-allow-broken\0" -/* 2169 */ "display extended usage information and exit\0" -/* 2213 */ "help\0" -/* 2218 */ "extended usage information passed thru pager\0" -/* 2263 */ "more-help\0" -/* 2273 */ "output version information and exit\0" -/* 2309 */ "version\0" -/* 2317 */ "OCSPTOOL\0" -/* 2326 */ "ocsptool - GnuTLS OCSP tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 2412 */ "bugs@gnutls.org\0" -/* 2428 */ "\n\0" -/* 2430 */ "ocsptool is a program that can parse and print information about OCSP\n" - "requests/responses, generate requests and verify responses. Unlike other\n" - "GnuTLS applications it outputs DER encoded structures by default unless the\n" - "'--outpem' option is specified.\n\0" -/* 2683 */ "ocsptool 3.6.4\0" -/* 2698 */ "ocsptool [options]\n" - "ocsptool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (ocsptool_opt_strs+888) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (ocsptool_opt_strs+905) -/** Name string for the debug option */ -#define DEBUG_name (ocsptool_opt_strs+911) -/** 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+917) -/** Upper-cased name for the verbose option */ -#define VERBOSE_NAME (ocsptool_opt_strs+937) -/** Name string for the verbose option */ -#define VERBOSE_name (ocsptool_opt_strs+945) -/** 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+953) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (ocsptool_opt_strs+964) -/** Name string for the infile option */ -#define INFILE_name (ocsptool_opt_strs+971) -/** 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+978) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (ocsptool_opt_strs+990) -/** Name string for the outfile option */ -#define OUTFILE_name (ocsptool_opt_strs+998) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * ask option description: - */ -/** Descriptive text for the ask option */ -#define ASK_DESC (ocsptool_opt_strs+1006) -/** Upper-cased name for the ask option */ -#define ASK_NAME (ocsptool_opt_strs+1056) -/** Name string for the ask option */ -#define ASK_name (ocsptool_opt_strs+1060) -/** 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+1064) -/** Upper-cased name for the verify-response option */ -#define VERIFY_RESPONSE_NAME (ocsptool_opt_strs+1080) -/** Name string for the verify-response option */ -#define VERIFY_RESPONSE_name (ocsptool_opt_strs+1096) -/** 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+1112) -/** Upper-cased name for the request-info option */ -#define REQUEST_INFO_NAME (ocsptool_opt_strs+1148) -/** Name string for the request-info option */ -#define REQUEST_INFO_name (ocsptool_opt_strs+1161) -/** 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+1174) -/** Upper-cased name for the response-info option */ -#define RESPONSE_INFO_NAME (ocsptool_opt_strs+1211) -/** Name string for the response-info option */ -#define RESPONSE_INFO_name (ocsptool_opt_strs+1225) -/** 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+1239) -/** Upper-cased name for the generate-request option */ -#define GENERATE_REQUEST_NAME (ocsptool_opt_strs+1265) -/** Name string for the generate-request option */ -#define GENERATE_REQUEST_name (ocsptool_opt_strs+1282) -/** 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+1299) -/** Upper-cased name for the nonce option */ -#define NONCE_NAME (ocsptool_opt_strs+1336) -/** disablement name for the nonce option */ -#define NOT_NONCE_name (ocsptool_opt_strs+1342) -/** disablement prefix for the nonce option */ -#define NOT_NONCE_PFX (ocsptool_opt_strs+1351) -/** 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-chain option description: - */ -/** Descriptive text for the load-chain option */ -#define LOAD_CHAIN_DESC (ocsptool_opt_strs+1354) -/** Upper-cased name for the load-chain option */ -#define LOAD_CHAIN_NAME (ocsptool_opt_strs+1408) -/** Name string for the load-chain option */ -#define LOAD_CHAIN_name (ocsptool_opt_strs+1419) -/** Compiled in flag settings for the load-chain option */ -#define LOAD_CHAIN_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-issuer option description: - */ -/** Descriptive text for the load-issuer option */ -#define LOAD_ISSUER_DESC (ocsptool_opt_strs+1430) -/** Upper-cased name for the load-issuer option */ -#define LOAD_ISSUER_NAME (ocsptool_opt_strs+1467) -/** Name string for the load-issuer option */ -#define LOAD_ISSUER_name (ocsptool_opt_strs+1479) -/** 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+1491) -/** Upper-cased name for the load-cert option */ -#define LOAD_CERT_NAME (ocsptool_opt_strs+1532) -/** Name string for the load-cert option */ -#define LOAD_CERT_name (ocsptool_opt_strs+1542) -/** 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+1552) -/** Upper-cased name for the load-trust option */ -#define LOAD_TRUST_NAME (ocsptool_opt_strs+1586) -/** Name string for the load-trust option */ -#define LOAD_TRUST_name (ocsptool_opt_strs+1597) -/** 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+1608) -/** Upper-cased name for the load-signer option */ -#define LOAD_SIGNER_NAME (ocsptool_opt_strs+1649) -/** Name string for the load-signer option */ -#define LOAD_SIGNER_name (ocsptool_opt_strs+1661) -/** 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+1673) -/** Upper-cased name for the inder option */ -#define INDER_NAME (ocsptool_opt_strs+1728) -/** disablement name for the inder option */ -#define NOT_INDER_name (ocsptool_opt_strs+1734) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (ocsptool_opt_strs+1351) -/** 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 (ocsptool_opt_strs+1743) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (ocsptool_opt_strs+1804) -/** Name string for the outder option */ -#define OUTDER_name (ocsptool_opt_strs+1811) -/** Compiled in flag settings for the outder option */ -#define OUTDER_FLAGS (OPTST_DISABLED) - -/** - * outpem option description: - */ -/** Descriptive text for the outpem option */ -#define OUTPEM_DESC (ocsptool_opt_strs+1818) -/** Upper-cased name for the outpem option */ -#define OUTPEM_NAME (ocsptool_opt_strs+1857) -/** Name string for the outpem option */ -#define OUTPEM_name (ocsptool_opt_strs+1864) -/** Compiled in flag settings for the outpem option */ -#define OUTPEM_FLAGS (OPTST_DISABLED) - -/** - * load-request option description: - */ -/** Descriptive text for the load-request option */ -#define LOAD_REQUEST_DESC (ocsptool_opt_strs+1871) -/** Upper-cased name for the load-request option */ -#define LOAD_REQUEST_NAME (ocsptool_opt_strs+1916) -/** Name string for the load-request option */ -#define LOAD_REQUEST_name (ocsptool_opt_strs+1929) -/** 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+1942) -/** Upper-cased name for the load-response option */ -#define LOAD_RESPONSE_NAME (ocsptool_opt_strs+1988) -/** Name string for the load-response option */ -#define LOAD_RESPONSE_name (ocsptool_opt_strs+2002) -/** Compiled in flag settings for the load-response option */ -#define LOAD_RESPONSE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * ignore-errors option description: - */ -/** Descriptive text for the ignore-errors option */ -#define IGNORE_ERRORS_DESC (ocsptool_opt_strs+2016) -/** Upper-cased name for the ignore-errors option */ -#define IGNORE_ERRORS_NAME (ocsptool_opt_strs+2047) -/** Name string for the ignore-errors option */ -#define IGNORE_ERRORS_name (ocsptool_opt_strs+2061) -/** Compiled in flag settings for the ignore-errors option */ -#define IGNORE_ERRORS_FLAGS (OPTST_DISABLED) - -/** - * verify-allow-broken option description: - */ -/** Descriptive text for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_DESC (ocsptool_opt_strs+2075) -/** Upper-cased name for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_NAME (ocsptool_opt_strs+2129) -/** Name string for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_name (ocsptool_opt_strs+2149) -/** Compiled in flag settings for the verify-allow-broken option */ -#define VERIFY_ALLOW_BROKEN_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (ocsptool_opt_strs+2169) -#define HELP_name (ocsptool_opt_strs+2213) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (ocsptool_opt_strs+2218) -#define MORE_HELP_name (ocsptool_opt_strs+2263) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+2273) -#define VER_name (ocsptool_opt_strs+2309) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptInfile, doOptLoad_Cert, - doOptLoad_Chain, 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 */ NULL, 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_CHAIN, - /* equiv idx, value */ 10, VALUE_OPT_LOAD_CHAIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LOAD_CHAIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --load-chain */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptLoad_Chain, - /* desc, NAME, name */ LOAD_CHAIN_DESC, LOAD_CHAIN_NAME, LOAD_CHAIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 11, VALUE_OPT_LOAD_ISSUER, - /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_LOAD_CERT, - /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_LOAD_TRUST, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_LOAD_SIGNER, - /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_INDER, - /* equiv idx, value */ 15, 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 */ 16, VALUE_OPT_OUTDER, - /* equiv idx, value */ 16, 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 */ NULL, NULL }, - - { /* entry idx, value */ 17, VALUE_OPT_OUTPEM, - /* equiv idx, value */ 17, VALUE_OPT_OUTPEM, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OUTPEM_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --outpem */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OUTPEM_DESC, OUTPEM_NAME, OUTPEM_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_LOAD_REQUEST, - /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_LOAD_RESPONSE, - /* equiv idx, value */ 19, 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 */ 20, VALUE_OPT_IGNORE_ERRORS, - /* equiv idx, value */ 20, VALUE_OPT_IGNORE_ERRORS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ IGNORE_ERRORS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ignore-errors */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ IGNORE_ERRORS_DESC, IGNORE_ERRORS_NAME, IGNORE_ERRORS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equiv idx, value */ 21, VALUE_OPT_VERIFY_ALLOW_BROKEN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_ALLOW_BROKEN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-allow-broken */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_ALLOW_BROKEN_DESC, VERIFY_ALLOW_BROKEN_NAME, VERIFY_ALLOW_BROKEN_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+2317) -/** Reference to the title line for ocsptool usage. */ -#define zUsageTitle (ocsptool_opt_strs+2326) -/** 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+2412) -/** Clarification/explanation of what ocsptool does. */ -#define zExplain (ocsptool_opt_strs+2428) -/** Extra detail explaining what ocsptool does. */ -#define zDetail (ocsptool_opt_strs+2430) -/** The full version string for ocsptool. */ -#define zFullVersion (ocsptool_opt_strs+2683) -/* extracted from optcode.tlib near line 364 */ - -#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+2698) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = OCSPTOOL_EXIT_SUCCESS; - optionUsage(&ocsptoolOptions, ex_code); - /* NOTREACHED */ - exit(OCSPTOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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-chain option. - * - * @param[in] pOptions the ocsptool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptLoad_Chain(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. - * When verifying an OCSP response read the trust anchors from the - * provided file. When this is not provided, the system's trust anchors will be - * used. - * @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 1250 */ - -/** - * 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 */ - }, - 25 /* full option count */, 22 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\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(_("Generates an OCSP request")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Use (or not) a nonce to OCSP request")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads a set of certificates forming a chain from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads issuer's certificate from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads the certificate to check from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Read OCSP trust anchors from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads the 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(_("Use DER format for output of responses (this is the default)")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Use PEM format for output of responses")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads the DER encoded OCSP request from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Reads the DER encoded OCSP response from file")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Ignore any verification errors")); - - /* referenced via ocsptoolOptions.pOptDesc->pzText */ - puts(_("Allow broken algorithms, such as MD5 for verification")); - - /* 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\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. Unlike other\n\ -GnuTLS applications it outputs DER encoded structures by default unless the\n\ -'--outpem' option is specified.\n")); - - /* referenced via ocsptoolOptions.pzFullVersion */ - puts(_("ocsptool 3.6.4")); - - /* referenced via ocsptoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via ocsptoolOptions.pzShortUsage */ - puts(_("ocsptool [options]\n\ -ocsptool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../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.bak b/src/ocsptool-args.h.bak deleted file mode 100644 index 45275e0368..0000000000 --- a/src/ocsptool-args.h.bak +++ /dev/null @@ -1,255 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (ocsptool-args.h) - * - * It has been AutoGen-ed - * From the definitions ocsptool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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_CHAIN = 10, - INDEX_OPT_LOAD_ISSUER = 11, - INDEX_OPT_LOAD_CERT = 12, - INDEX_OPT_LOAD_TRUST = 13, - INDEX_OPT_LOAD_SIGNER = 14, - INDEX_OPT_INDER = 15, - INDEX_OPT_OUTDER = 16, - INDEX_OPT_OUTPEM = 17, - INDEX_OPT_LOAD_REQUEST = 18, - INDEX_OPT_LOAD_RESPONSE = 19, - INDEX_OPT_IGNORE_ERRORS = 20, - INDEX_OPT_VERIFY_ALLOW_BROKEN = 21, - INDEX_OPT_VERSION = 22, - INDEX_OPT_HELP = 23, - INDEX_OPT_MORE_HELP = 24 -} teOptIndex; -/** count of all options for ocsptool */ -#define OPTION_CT 25 -/** ocsptool version */ -#define OCSPTOOL_VERSION "3.6.4" -/** Full ocsptool version text */ -#define OCSPTOOL_FULL_VERSION "ocsptool 3.6.4" - -/** - * 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 0x1001 -#define VALUE_OPT_OUTFILE 0x1002 -#define VALUE_OPT_ASK 0x1003 -#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 0x1004 -#define VALUE_OPT_LOAD_CHAIN 0x1005 -#define VALUE_OPT_LOAD_ISSUER 0x1006 -#define VALUE_OPT_LOAD_CERT 0x1007 -#define VALUE_OPT_LOAD_TRUST 0x1008 -#define VALUE_OPT_LOAD_SIGNER 0x1009 -#define VALUE_OPT_INDER 0x100A -#define VALUE_OPT_OUTDER 0x100B -#define VALUE_OPT_OUTPEM 0x100C -#define VALUE_OPT_LOAD_REQUEST 'Q' -#define VALUE_OPT_LOAD_RESPONSE 'S' -#define VALUE_OPT_IGNORE_ERRORS 0x100D -#define VALUE_OPT_VERIFY_ALLOW_BROKEN 0x100E -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the ocsptool option descriptor. - */ -extern tOptions ocsptoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/p11tool-args.c.bak deleted file mode 100644 index 1c457ce91c..0000000000 --- a/src/p11tool-args.c.bak +++ /dev/null @@ -1,3284 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (p11tool-args.c) - * - * It has been AutoGen-ed - * From the definitions p11tool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "p11tool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (p11tool_opt_strs+0) -#define zLicenseDescrip (p11tool_opt_strs+282) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for p11tool options - */ -static char const p11tool_opt_strs[5982] = -/* 0 */ "p11tool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 282 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 885 */ "Tokens:\0" -/* 893 */ "List all available tokens\0" -/* 919 */ "LIST_TOKENS\0" -/* 931 */ "list-tokens\0" -/* 943 */ "List the URLs available tokens\0" -/* 974 */ "LIST_TOKEN_URLS\0" -/* 990 */ "list-token-urls\0" -/* 1006 */ "List all available mechanisms in a token\0" -/* 1047 */ "LIST_MECHANISMS\0" -/* 1063 */ "list-mechanisms\0" -/* 1079 */ "Initializes a PKCS #11 token\0" -/* 1108 */ "INITIALIZE\0" -/* 1119 */ "initialize\0" -/* 1130 */ "Initializes/Resets a PKCS #11 token user PIN\0" -/* 1175 */ "INITIALIZE_PIN\0" -/* 1190 */ "initialize-pin\0" -/* 1205 */ "Initializes/Resets a PKCS #11 token security officer PIN.\0" -/* 1263 */ "INITIALIZE_SO_PIN\0" -/* 1281 */ "initialize-so-pin\0" -/* 1299 */ "Specify the PIN to use on token operations\0" -/* 1342 */ "SET_PIN\0" -/* 1350 */ "set-pin\0" -/* 1358 */ "Specify the Security Officer's PIN to use on token initialization\0" -/* 1424 */ "SET_SO_PIN\0" -/* 1435 */ "set-so-pin\0" -/* 1446 */ "Object listing:\0" -/* 1462 */ "List all available objects in a token\0" -/* 1500 */ "LIST_ALL\0" -/* 1509 */ "list-all\0" -/* 1518 */ "List all available certificates in a token\0" -/* 1561 */ "LIST_ALL_CERTS\0" -/* 1576 */ "list-all-certs\0" -/* 1591 */ "List all certificates that have an associated private key\0" -/* 1649 */ "LIST_CERTS\0" -/* 1660 */ "list-certs\0" -/* 1671 */ "List all available private keys in a token\0" -/* 1714 */ "LIST_ALL_PRIVKEYS\0" -/* 1732 */ "list-all-privkeys\0" -/* 1750 */ "an alias for the 'list-all-privkeys' option\0" -/* 1794 */ "list-privkeys\0" -/* 1808 */ "list-keys\0" -/* 1818 */ "List all available certificates marked as trusted\0" -/* 1868 */ "LIST_ALL_TRUSTED\0" -/* 1885 */ "list-all-trusted\0" -/* 1902 */ "Export the object specified by the URL\0" -/* 1941 */ "EXPORT\0" -/* 1948 */ "export\0" -/* 1955 */ "Export the certificate object specified by the URL\0" -/* 2006 */ "EXPORT_STAPLED\0" -/* 2021 */ "export-stapled\0" -/* 2036 */ "Export the certificate specified by the URL and its chain of trust\0" -/* 2103 */ "EXPORT_CHAIN\0" -/* 2116 */ "export-chain\0" -/* 2129 */ "Export the public key for a private key\0" -/* 2169 */ "EXPORT_PUBKEY\0" -/* 2183 */ "export-pubkey\0" -/* 2197 */ "List information on an available object in a token\0" -/* 2248 */ "INFO\0" -/* 2253 */ "info\0" -/* 2258 */ "an alias for the 'mark-trusted' option\0" -/* 2297 */ "trusted\0" -/* 2305 */ "an alias for the 'mark-distrusted' option\0" -/* 2347 */ "distrusted\0" -/* 2358 */ "Key generation:\0" -/* 2374 */ "Generate private-public key pair of given type\0" -/* 2421 */ "GENERATE_PRIVKEY\0" -/* 2438 */ "generate-privkey\0" -/* 2455 */ "Generate an RSA private-public key pair (deprecated)\0" -/* 2508 */ "GENERATE_RSA\0" -/* 2521 */ "generate-rsa\0" -/* 2534 */ "Generate a DSA private-public key pair (deprecated)\0" -/* 2586 */ "GENERATE_DSA\0" -/* 2599 */ "generate-dsa\0" -/* 2612 */ "Generate an ECDSA private-public key pair (deprecated)\0" -/* 2667 */ "GENERATE_ECC\0" -/* 2680 */ "generate-ecc\0" -/* 2693 */ "Specify the number of bits for the key generate\0" -/* 2741 */ "BITS\0" -/* 2746 */ "bits\0" -/* 2751 */ "Specify the curve used for EC key generation\0" -/* 2796 */ "CURVE\0" -/* 2802 */ "curve\0" -/* 2808 */ "Specify the security level\0" -/* 2835 */ "SEC_PARAM\0" -/* 2845 */ "sec-param\0" -/* 2855 */ "Writing objects:\0" -/* 2872 */ "Set the CKA_ID (in hex) for the specified by the URL object\0" -/* 2932 */ "SET_ID\0" -/* 2939 */ "set-id\0" -/* 2946 */ "Set the CKA_LABEL for the specified by the URL object\0" -/* 3000 */ "SET_LABEL\0" -/* 3010 */ "set-label\0" -/* 3020 */ "Writes the loaded objects to a PKCS #11 token\0" -/* 3066 */ "WRITE\0" -/* 3072 */ "write\0" -/* 3078 */ "Deletes the objects matching the given PKCS #11 URL\0" -/* 3130 */ "DELETE\0" -/* 3137 */ "delete\0" -/* 3144 */ "Sets a label for the write operation\0" -/* 3181 */ "LABEL\0" -/* 3187 */ "label\0" -/* 3193 */ "Sets an ID for the write operation\0" -/* 3228 */ "ID\0" -/* 3231 */ "id\0" -/* 3234 */ "Marks the generated key to be a wrapping key\0" -/* 3279 */ "MARK_WRAP\0" -/* 3289 */ "no-mark-wrap\0" -/* 3302 */ "no\0" -/* 3305 */ "Marks the object to be written as trusted\0" -/* 3347 */ "MARK_TRUSTED\0" -/* 3360 */ "no-mark-trusted\0" -/* 3376 */ "When retrieving objects, it requires the objects to be distrusted\n" - "(blacklisted)\0" -/* 3456 */ "MARK_DISTRUSTED\0" -/* 3472 */ "mark-distrusted\0" -/* 3488 */ "Marks the object to be written for decryption\0" -/* 3534 */ "MARK_DECRYPT\0" -/* 3547 */ "no-mark-decrypt\0" -/* 3563 */ "Marks the object to be written for signature generation\0" -/* 3619 */ "MARK_SIGN\0" -/* 3629 */ "no-mark-sign\0" -/* 3642 */ "Marks the object to be written as a CA\0" -/* 3681 */ "MARK_CA\0" -/* 3689 */ "no-mark-ca\0" -/* 3700 */ "Marks the object to be written as private\0" -/* 3742 */ "MARK_PRIVATE\0" -/* 3755 */ "no-mark-private\0" -/* 3771 */ "an alias for the 'mark-ca' option\0" -/* 3805 */ "ca\0" -/* 3808 */ "an alias for the 'mark-private' option\0" -/* 3847 */ "private\0" -/* 3855 */ "Provide a hex encoded secret key\0" -/* 3888 */ "SECRET_KEY\0" -/* 3899 */ "secret-key\0" -/* 3910 */ "Private key file to use\0" -/* 3934 */ "LOAD_PRIVKEY\0" -/* 3947 */ "load-privkey\0" -/* 3960 */ "Public key file to use\0" -/* 3983 */ "LOAD_PUBKEY\0" -/* 3995 */ "load-pubkey\0" -/* 4007 */ "Certificate file to use\0" -/* 4031 */ "LOAD_CERTIFICATE\0" -/* 4048 */ "load-certificate\0" -/* 4065 */ "Other options:\0" -/* 4080 */ "Enable debugging\0" -/* 4097 */ "DEBUG\0" -/* 4103 */ "debug\0" -/* 4109 */ "Output file\0" -/* 4121 */ "OUTFILE\0" -/* 4129 */ "outfile\0" -/* 4137 */ "Force (user) login to token\0" -/* 4165 */ "LOGIN\0" -/* 4171 */ "no-login\0" -/* 4180 */ "Force security officer login to token\0" -/* 4218 */ "SO_LOGIN\0" -/* 4227 */ "no-so-login\0" -/* 4239 */ "an alias for the 'so-login' option\0" -/* 4274 */ "admin-login\0" -/* 4286 */ "Tests the signature operation of the provided object\0" -/* 4339 */ "TEST_SIGN\0" -/* 4349 */ "test-sign\0" -/* 4359 */ "Sign with a specific signature algorithm\0" -/* 4400 */ "SIGN_PARAMS\0" -/* 4412 */ "sign-params\0" -/* 4424 */ "Hash algorithm to use for signing\0" -/* 4458 */ "HASH\0" -/* 4463 */ "hash\0" -/* 4468 */ "Generate random data\0" -/* 4489 */ "GENERATE_RANDOM\0" -/* 4505 */ "generate-random\0" -/* 4521 */ "Use PKCS #8 format for private keys\0" -/* 4557 */ "PKCS8\0" -/* 4563 */ "pkcs8\0" -/* 4569 */ "Use DER/RAW format for input\0" -/* 4598 */ "INDER\0" -/* 4604 */ "no-inder\0" -/* 4613 */ "an alias for the 'inder' option\0" -/* 4645 */ "inraw\0" -/* 4651 */ "Use DER format for output certificates, private keys, and DH parameters\0" -/* 4723 */ "OUTDER\0" -/* 4730 */ "no-outder\0" -/* 4740 */ "an alias for the 'outder' option\0" -/* 4773 */ "outraw\0" -/* 4780 */ "Specify the PKCS #11 provider library\0" -/* 4818 */ "PROVIDER\0" -/* 4827 */ "provider\0" -/* 4836 */ "Specify parameters for the PKCS #11 provider library (deprecated)\0" -/* 4902 */ "PROVIDER_OPTS\0" -/* 4916 */ "provider-opts\0" -/* 4930 */ "Print detailed URLs\0" -/* 4950 */ "DETAILED_URL\0" -/* 4963 */ "no-detailed-url\0" -/* 4979 */ "Print a compact listing using only the URLs\0" -/* 5023 */ "ONLY_URLS\0" -/* 5033 */ "only-urls\0" -/* 5043 */ "Disable all interaction with the tool\0" -/* 5081 */ "BATCH\0" -/* 5087 */ "batch\0" -/* 5093 */ "display extended usage information and exit\0" -/* 5137 */ "help\0" -/* 5142 */ "extended usage information passed thru pager\0" -/* 5187 */ "more-help\0" -/* 5197 */ "output version information and exit\0" -/* 5233 */ "version\0" -/* 5241 */ "P11TOOL\0" -/* 5249 */ "p11tool - GnuTLS PKCS #11 tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [url]\n\0" -/* 5344 */ "bugs@gnutls.org\0" -/* 5360 */ "\n\0" -/* 5362 */ "Program that allows operations on PKCS #11 smart cards and security\n" - "modules.\n\n" - "To use PKCS #11 tokens with GnuTLS the p11-kit configuration files need to\n" - "be setup. That is create a .module file in /etc/pkcs11/modules with the\n" - "contents 'module: /path/to/pkcs11.so'. Alternatively the configuration\n" - "file /etc/gnutls/pkcs11.conf has to exist and contain a number of lines of\n" - "the form 'load=/usr/lib/opensc-pkcs11.so'.\n\n" - "You can provide the PIN to be used for the PKCS #11 operations with the\n" - "environment variables GNUTLS_PIN and GNUTLS_SO_PIN.\n\0" -/* 5904 */ "p11tool 3.6.4\0" -/* 5918 */ "p11tool [options] [url]\n" - "p11tool --help for usage instructions.\n"; - -/** - * token_related_options option description: - */ -/** token_related_options option separation text */ -#define TOKEN_RELATED_OPTIONS_DESC (p11tool_opt_strs+885) -#define TOKEN_RELATED_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * list-tokens option description: - */ -/** Descriptive text for the list-tokens option */ -#define LIST_TOKENS_DESC (p11tool_opt_strs+893) -/** Upper-cased name for the list-tokens option */ -#define LIST_TOKENS_NAME (p11tool_opt_strs+919) -/** Name string for the list-tokens option */ -#define LIST_TOKENS_name (p11tool_opt_strs+931) -/** Compiled in flag settings for the list-tokens option */ -#define LIST_TOKENS_FLAGS (OPTST_DISABLED) - -/** - * list-token-urls option description: - */ -/** Descriptive text for the list-token-urls option */ -#define LIST_TOKEN_URLS_DESC (p11tool_opt_strs+943) -/** Upper-cased name for the list-token-urls option */ -#define LIST_TOKEN_URLS_NAME (p11tool_opt_strs+974) -/** Name string for the list-token-urls option */ -#define LIST_TOKEN_URLS_name (p11tool_opt_strs+990) -/** Compiled in flag settings for the list-token-urls option */ -#define LIST_TOKEN_URLS_FLAGS (OPTST_DISABLED) - -/** - * list-mechanisms option description: - */ -/** Descriptive text for the list-mechanisms option */ -#define LIST_MECHANISMS_DESC (p11tool_opt_strs+1006) -/** Upper-cased name for the list-mechanisms option */ -#define LIST_MECHANISMS_NAME (p11tool_opt_strs+1047) -/** Name string for the list-mechanisms option */ -#define LIST_MECHANISMS_name (p11tool_opt_strs+1063) -/** Compiled in flag settings for the list-mechanisms option */ -#define LIST_MECHANISMS_FLAGS (OPTST_DISABLED) - -/** - * initialize option description: - */ -/** Descriptive text for the initialize option */ -#define INITIALIZE_DESC (p11tool_opt_strs+1079) -/** Upper-cased name for the initialize option */ -#define INITIALIZE_NAME (p11tool_opt_strs+1108) -/** Name string for the initialize option */ -#define INITIALIZE_name (p11tool_opt_strs+1119) -/** Compiled in flag settings for the initialize option */ -#define INITIALIZE_FLAGS (OPTST_DISABLED) - -/** - * initialize-pin option description: - */ -/** Descriptive text for the initialize-pin option */ -#define INITIALIZE_PIN_DESC (p11tool_opt_strs+1130) -/** Upper-cased name for the initialize-pin option */ -#define INITIALIZE_PIN_NAME (p11tool_opt_strs+1175) -/** Name string for the initialize-pin option */ -#define INITIALIZE_PIN_name (p11tool_opt_strs+1190) -/** Compiled in flag settings for the initialize-pin option */ -#define INITIALIZE_PIN_FLAGS (OPTST_DISABLED) - -/** - * initialize-so-pin option description: - */ -/** Descriptive text for the initialize-so-pin option */ -#define INITIALIZE_SO_PIN_DESC (p11tool_opt_strs+1205) -/** Upper-cased name for the initialize-so-pin option */ -#define INITIALIZE_SO_PIN_NAME (p11tool_opt_strs+1263) -/** Name string for the initialize-so-pin option */ -#define INITIALIZE_SO_PIN_name (p11tool_opt_strs+1281) -/** Compiled in flag settings for the initialize-so-pin option */ -#define INITIALIZE_SO_PIN_FLAGS (OPTST_DISABLED) - -/** - * set-pin option description: - */ -/** Descriptive text for the set-pin option */ -#define SET_PIN_DESC (p11tool_opt_strs+1299) -/** Upper-cased name for the set-pin option */ -#define SET_PIN_NAME (p11tool_opt_strs+1342) -/** Name string for the set-pin option */ -#define SET_PIN_name (p11tool_opt_strs+1350) -/** Compiled in flag settings for the set-pin option */ -#define SET_PIN_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * set-so-pin option description: - */ -/** Descriptive text for the set-so-pin option */ -#define SET_SO_PIN_DESC (p11tool_opt_strs+1358) -/** Upper-cased name for the set-so-pin option */ -#define SET_SO_PIN_NAME (p11tool_opt_strs+1424) -/** Name string for the set-so-pin option */ -#define SET_SO_PIN_name (p11tool_opt_strs+1435) -/** Compiled in flag settings for the set-so-pin option */ -#define SET_SO_PIN_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * object_list_related_options option description: - */ -/** object_list_related_options option separation text */ -#define OBJECT_LIST_RELATED_OPTIONS_DESC (p11tool_opt_strs+1446) -#define OBJECT_LIST_RELATED_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * list-all option description: - */ -/** Descriptive text for the list-all option */ -#define LIST_ALL_DESC (p11tool_opt_strs+1462) -/** Upper-cased name for the list-all option */ -#define LIST_ALL_NAME (p11tool_opt_strs+1500) -/** Name string for the list-all option */ -#define LIST_ALL_name (p11tool_opt_strs+1509) -/** Compiled in flag settings for the list-all option */ -#define LIST_ALL_FLAGS (OPTST_DISABLED) - -/** - * list-all-certs option description: - */ -/** Descriptive text for the list-all-certs option */ -#define LIST_ALL_CERTS_DESC (p11tool_opt_strs+1518) -/** Upper-cased name for the list-all-certs option */ -#define LIST_ALL_CERTS_NAME (p11tool_opt_strs+1561) -/** Name string for the list-all-certs option */ -#define LIST_ALL_CERTS_name (p11tool_opt_strs+1576) -/** Compiled in flag settings for the list-all-certs option */ -#define LIST_ALL_CERTS_FLAGS (OPTST_DISABLED) - -/** - * list-certs option description: - */ -/** Descriptive text for the list-certs option */ -#define LIST_CERTS_DESC (p11tool_opt_strs+1591) -/** Upper-cased name for the list-certs option */ -#define LIST_CERTS_NAME (p11tool_opt_strs+1649) -/** Name string for the list-certs option */ -#define LIST_CERTS_name (p11tool_opt_strs+1660) -/** Compiled in flag settings for the list-certs option */ -#define LIST_CERTS_FLAGS (OPTST_DISABLED) - -/** - * list-all-privkeys option description: - */ -/** Descriptive text for the list-all-privkeys option */ -#define LIST_ALL_PRIVKEYS_DESC (p11tool_opt_strs+1671) -/** Upper-cased name for the list-all-privkeys option */ -#define LIST_ALL_PRIVKEYS_NAME (p11tool_opt_strs+1714) -/** Name string for the list-all-privkeys option */ -#define LIST_ALL_PRIVKEYS_name (p11tool_opt_strs+1732) -/** Compiled in flag settings for the list-all-privkeys option */ -#define LIST_ALL_PRIVKEYS_FLAGS (OPTST_DISABLED) - -/** - * list-privkeys option description: - */ -/** Descriptive text for the list-privkeys option */ -#define LIST_PRIVKEYS_DESC (p11tool_opt_strs+1750) -#define LIST_PRIVKEYS_NAME NULL -/** Unmodified name string for the list-privkeys option */ -#define LIST_PRIVKEYS_name (p11tool_opt_strs+1794) -/** Compiled in flag settings for the list-privkeys option */ -#define LIST_PRIVKEYS_FLAGS (LIST_ALL_PRIVKEYS_FLAGS | OPTST_ALIAS) - -/** - * list-keys option description: - */ -/** Descriptive text for the list-keys option */ -#define LIST_KEYS_DESC (p11tool_opt_strs+1750) -#define LIST_KEYS_NAME NULL -/** Unmodified name string for the list-keys option */ -#define LIST_KEYS_name (p11tool_opt_strs+1808) -/** Compiled in flag settings for the list-keys option */ -#define LIST_KEYS_FLAGS (LIST_ALL_PRIVKEYS_FLAGS | OPTST_ALIAS) - -/** - * list-all-trusted option description: - */ -/** Descriptive text for the list-all-trusted option */ -#define LIST_ALL_TRUSTED_DESC (p11tool_opt_strs+1818) -/** Upper-cased name for the list-all-trusted option */ -#define LIST_ALL_TRUSTED_NAME (p11tool_opt_strs+1868) -/** Name string for the list-all-trusted option */ -#define LIST_ALL_TRUSTED_name (p11tool_opt_strs+1885) -/** Compiled in flag settings for the list-all-trusted option */ -#define LIST_ALL_TRUSTED_FLAGS (OPTST_DISABLED) - -/** - * export option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the export option */ -#define EXPORT_DESC (p11tool_opt_strs+1902) -/** Upper-cased name for the export option */ -#define EXPORT_NAME (p11tool_opt_strs+1941) -/** Name string for the export option */ -#define EXPORT_name (p11tool_opt_strs+1948) -/** Other options that appear in conjunction with the export option */ -static int const aExportCantList[] = { - INDEX_OPT_EXPORT_STAPLED, - INDEX_OPT_EXPORT_CHAIN, - INDEX_OPT_EXPORT_PUBKEY, NO_EQUIVALENT }; -/** Compiled in flag settings for the export option */ -#define EXPORT_FLAGS (OPTST_DISABLED) - -/** - * export-stapled option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the export-stapled option */ -#define EXPORT_STAPLED_DESC (p11tool_opt_strs+1955) -/** Upper-cased name for the export-stapled option */ -#define EXPORT_STAPLED_NAME (p11tool_opt_strs+2006) -/** Name string for the export-stapled option */ -#define EXPORT_STAPLED_name (p11tool_opt_strs+2021) -/** Other options that appear in conjunction with the export-stapled option */ -static int const aExport_StapledCantList[] = { - INDEX_OPT_EXPORT, - INDEX_OPT_EXPORT_CHAIN, - INDEX_OPT_EXPORT_PUBKEY, NO_EQUIVALENT }; -/** Compiled in flag settings for the export-stapled option */ -#define EXPORT_STAPLED_FLAGS (OPTST_DISABLED) - -/** - * export-chain option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the export-chain option */ -#define EXPORT_CHAIN_DESC (p11tool_opt_strs+2036) -/** Upper-cased name for the export-chain option */ -#define EXPORT_CHAIN_NAME (p11tool_opt_strs+2103) -/** Name string for the export-chain option */ -#define EXPORT_CHAIN_name (p11tool_opt_strs+2116) -/** Other options that appear in conjunction with the export-chain option */ -static int const aExport_ChainCantList[] = { - INDEX_OPT_EXPORT_STAPLED, - INDEX_OPT_EXPORT, - INDEX_OPT_EXPORT_PUBKEY, NO_EQUIVALENT }; -/** Compiled in flag settings for the export-chain option */ -#define EXPORT_CHAIN_FLAGS (OPTST_DISABLED) - -/** - * export-pubkey option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the export-pubkey option */ -#define EXPORT_PUBKEY_DESC (p11tool_opt_strs+2129) -/** Upper-cased name for the export-pubkey option */ -#define EXPORT_PUBKEY_NAME (p11tool_opt_strs+2169) -/** Name string for the export-pubkey option */ -#define EXPORT_PUBKEY_name (p11tool_opt_strs+2183) -/** Other options that appear in conjunction with the export-pubkey option */ -static int const aExport_PubkeyCantList[] = { - INDEX_OPT_EXPORT_STAPLED, - INDEX_OPT_EXPORT, - INDEX_OPT_EXPORT_CHAIN, NO_EQUIVALENT }; -/** Compiled in flag settings for the export-pubkey option */ -#define EXPORT_PUBKEY_FLAGS (OPTST_DISABLED) - -/** - * info option description: - */ -/** Descriptive text for the info option */ -#define INFO_DESC (p11tool_opt_strs+2197) -/** Upper-cased name for the info option */ -#define INFO_NAME (p11tool_opt_strs+2248) -/** Name string for the info option */ -#define INFO_name (p11tool_opt_strs+2253) -/** Compiled in flag settings for the info option */ -#define INFO_FLAGS (OPTST_DISABLED) - -/** - * trusted option description: - */ -/** Descriptive text for the trusted option */ -#define TRUSTED_DESC (p11tool_opt_strs+2258) -#define TRUSTED_NAME NULL -/** Unmodified name string for the trusted option */ -#define TRUSTED_name (p11tool_opt_strs+2297) -/** Compiled in flag settings for the trusted option */ -#define TRUSTED_FLAGS (MARK_TRUSTED_FLAGS | OPTST_ALIAS) - -/** - * distrusted option description: - */ -/** Descriptive text for the distrusted option */ -#define DISTRUSTED_DESC (p11tool_opt_strs+2305) -#define DISTRUSTED_NAME NULL -/** Unmodified name string for the distrusted option */ -#define DISTRUSTED_name (p11tool_opt_strs+2347) -/** Compiled in flag settings for the distrusted option */ -#define DISTRUSTED_FLAGS (MARK_DISTRUSTED_FLAGS | OPTST_ALIAS) - -/** - * keygen_related_options option description: - */ -/** keygen_related_options option separation text */ -#define KEYGEN_RELATED_OPTIONS_DESC (p11tool_opt_strs+2358) -#define KEYGEN_RELATED_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * generate-privkey option description: - */ -/** Descriptive text for the generate-privkey option */ -#define GENERATE_PRIVKEY_DESC (p11tool_opt_strs+2374) -/** Upper-cased name for the generate-privkey option */ -#define GENERATE_PRIVKEY_NAME (p11tool_opt_strs+2421) -/** Name string for the generate-privkey option */ -#define GENERATE_PRIVKEY_name (p11tool_opt_strs+2438) -/** Compiled in flag settings for the generate-privkey option */ -#define GENERATE_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * generate-rsa option description: - */ -/** Descriptive text for the generate-rsa option */ -#define GENERATE_RSA_DESC (p11tool_opt_strs+2455) -/** Upper-cased name for the generate-rsa option */ -#define GENERATE_RSA_NAME (p11tool_opt_strs+2508) -/** Name string for the generate-rsa option */ -#define GENERATE_RSA_name (p11tool_opt_strs+2521) -/** Compiled in flag settings for the generate-rsa option */ -#define GENERATE_RSA_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * generate-dsa option description: - */ -/** Descriptive text for the generate-dsa option */ -#define GENERATE_DSA_DESC (p11tool_opt_strs+2534) -/** Upper-cased name for the generate-dsa option */ -#define GENERATE_DSA_NAME (p11tool_opt_strs+2586) -/** Name string for the generate-dsa option */ -#define GENERATE_DSA_name (p11tool_opt_strs+2599) -/** Compiled in flag settings for the generate-dsa option */ -#define GENERATE_DSA_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * generate-ecc option description: - */ -/** Descriptive text for the generate-ecc option */ -#define GENERATE_ECC_DESC (p11tool_opt_strs+2612) -/** Upper-cased name for the generate-ecc option */ -#define GENERATE_ECC_NAME (p11tool_opt_strs+2667) -/** Name string for the generate-ecc option */ -#define GENERATE_ECC_name (p11tool_opt_strs+2680) -/** Compiled in flag settings for the generate-ecc option */ -#define GENERATE_ECC_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED) - -/** - * bits option description: - */ -/** Descriptive text for the bits option */ -#define BITS_DESC (p11tool_opt_strs+2693) -/** Upper-cased name for the bits option */ -#define BITS_NAME (p11tool_opt_strs+2741) -/** Name string for the bits option */ -#define BITS_name (p11tool_opt_strs+2746) -/** Compiled in flag settings for the bits option */ -#define BITS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * curve option description: - */ -/** Descriptive text for the curve option */ -#define CURVE_DESC (p11tool_opt_strs+2751) -/** Upper-cased name for the curve option */ -#define CURVE_NAME (p11tool_opt_strs+2796) -/** Name string for the curve option */ -#define CURVE_name (p11tool_opt_strs+2802) -/** Compiled in flag settings for the curve option */ -#define CURVE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * sec-param option description: - */ -/** Descriptive text for the sec-param option */ -#define SEC_PARAM_DESC (p11tool_opt_strs+2808) -/** Upper-cased name for the sec-param option */ -#define SEC_PARAM_NAME (p11tool_opt_strs+2835) -/** Name string for the sec-param option */ -#define SEC_PARAM_name (p11tool_opt_strs+2845) -/** Compiled in flag settings for the sec-param option */ -#define SEC_PARAM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * write_object_related_options option description: - */ -/** write_object_related_options option separation text */ -#define WRITE_OBJECT_RELATED_OPTIONS_DESC (p11tool_opt_strs+2855) -#define WRITE_OBJECT_RELATED_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * set-id option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the set-id option */ -#define SET_ID_DESC (p11tool_opt_strs+2872) -/** Upper-cased name for the set-id option */ -#define SET_ID_NAME (p11tool_opt_strs+2932) -/** Name string for the set-id option */ -#define SET_ID_name (p11tool_opt_strs+2939) -/** Other options that appear in conjunction with the set-id option */ -static int const aSet_IdCantList[] = { - INDEX_OPT_WRITE, NO_EQUIVALENT }; -/** Compiled in flag settings for the set-id option */ -#define SET_ID_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * set-label option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the set-label option */ -#define SET_LABEL_DESC (p11tool_opt_strs+2946) -/** Upper-cased name for the set-label option */ -#define SET_LABEL_NAME (p11tool_opt_strs+3000) -/** Name string for the set-label option */ -#define SET_LABEL_name (p11tool_opt_strs+3010) -/** Other options that appear in conjunction with the set-label option */ -static int const aSet_LabelCantList[] = { - INDEX_OPT_WRITE, - INDEX_OPT_SET_ID, NO_EQUIVALENT }; -/** Compiled in flag settings for the set-label option */ -#define SET_LABEL_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * write option description: - */ -/** Descriptive text for the write option */ -#define WRITE_DESC (p11tool_opt_strs+3020) -/** Upper-cased name for the write option */ -#define WRITE_NAME (p11tool_opt_strs+3066) -/** Name string for the write option */ -#define WRITE_name (p11tool_opt_strs+3072) -/** Compiled in flag settings for the write option */ -#define WRITE_FLAGS (OPTST_DISABLED) - -/** - * delete option description: - */ -/** Descriptive text for the delete option */ -#define DELETE_DESC (p11tool_opt_strs+3078) -/** Upper-cased name for the delete option */ -#define DELETE_NAME (p11tool_opt_strs+3130) -/** Name string for the delete option */ -#define DELETE_name (p11tool_opt_strs+3137) -/** Compiled in flag settings for the delete option */ -#define DELETE_FLAGS (OPTST_DISABLED) - -/** - * label option description: - */ -/** Descriptive text for the label option */ -#define LABEL_DESC (p11tool_opt_strs+3144) -/** Upper-cased name for the label option */ -#define LABEL_NAME (p11tool_opt_strs+3181) -/** Name string for the label option */ -#define LABEL_name (p11tool_opt_strs+3187) -/** Compiled in flag settings for the label option */ -#define LABEL_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * id option description: - */ -/** Descriptive text for the id option */ -#define ID_DESC (p11tool_opt_strs+3193) -/** Upper-cased name for the id option */ -#define ID_NAME (p11tool_opt_strs+3228) -/** Name string for the id option */ -#define ID_name (p11tool_opt_strs+3231) -/** Compiled in flag settings for the id option */ -#define ID_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * mark-wrap option description: - */ -/** Descriptive text for the mark-wrap option */ -#define MARK_WRAP_DESC (p11tool_opt_strs+3234) -/** Upper-cased name for the mark-wrap option */ -#define MARK_WRAP_NAME (p11tool_opt_strs+3279) -/** disablement name for the mark-wrap option */ -#define NOT_MARK_WRAP_name (p11tool_opt_strs+3289) -/** disablement prefix for the mark-wrap option */ -#define NOT_MARK_WRAP_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-wrap option */ -#define MARK_WRAP_name (NOT_MARK_WRAP_name + 3) -/** Compiled in flag settings for the mark-wrap option */ -#define MARK_WRAP_FLAGS (OPTST_DISABLED) - -/** - * mark-trusted option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the mark-trusted option */ -#define MARK_TRUSTED_DESC (p11tool_opt_strs+3305) -/** Upper-cased name for the mark-trusted option */ -#define MARK_TRUSTED_NAME (p11tool_opt_strs+3347) -/** disablement name for the mark-trusted option */ -#define NOT_MARK_TRUSTED_name (p11tool_opt_strs+3360) -/** disablement prefix for the mark-trusted option */ -#define NOT_MARK_TRUSTED_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-trusted option */ -#define MARK_TRUSTED_name (NOT_MARK_TRUSTED_name + 3) -/** Other options that appear in conjunction with the mark-trusted option */ -static int const aMark_TrustedCantList[] = { - INDEX_OPT_MARK_DISTRUSTED, NO_EQUIVALENT }; -/** Compiled in flag settings for the mark-trusted option */ -#define MARK_TRUSTED_FLAGS (OPTST_DISABLED) - -/** - * mark-distrusted option description with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the mark-distrusted option */ -#define MARK_DISTRUSTED_DESC (p11tool_opt_strs+3376) -/** Upper-cased name for the mark-distrusted option */ -#define MARK_DISTRUSTED_NAME (p11tool_opt_strs+3456) -/** Name string for the mark-distrusted option */ -#define MARK_DISTRUSTED_name (p11tool_opt_strs+3472) -/** Other options that appear in conjunction with the mark-distrusted option */ -static int const aMark_DistrustedCantList[] = { - INDEX_OPT_MARK_TRUSTED, NO_EQUIVALENT }; -/** Compiled in flag settings for the mark-distrusted option */ -#define MARK_DISTRUSTED_FLAGS (OPTST_DISABLED) - -/** - * mark-decrypt option description: - */ -/** Descriptive text for the mark-decrypt option */ -#define MARK_DECRYPT_DESC (p11tool_opt_strs+3488) -/** Upper-cased name for the mark-decrypt option */ -#define MARK_DECRYPT_NAME (p11tool_opt_strs+3534) -/** disablement name for the mark-decrypt option */ -#define NOT_MARK_DECRYPT_name (p11tool_opt_strs+3547) -/** disablement prefix for the mark-decrypt option */ -#define NOT_MARK_DECRYPT_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-decrypt option */ -#define MARK_DECRYPT_name (NOT_MARK_DECRYPT_name + 3) -/** Compiled in flag settings for the mark-decrypt option */ -#define MARK_DECRYPT_FLAGS (OPTST_DISABLED) - -/** - * mark-sign option description: - */ -/** Descriptive text for the mark-sign option */ -#define MARK_SIGN_DESC (p11tool_opt_strs+3563) -/** Upper-cased name for the mark-sign option */ -#define MARK_SIGN_NAME (p11tool_opt_strs+3619) -/** disablement name for the mark-sign option */ -#define NOT_MARK_SIGN_name (p11tool_opt_strs+3629) -/** disablement prefix for the mark-sign option */ -#define NOT_MARK_SIGN_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-sign option */ -#define MARK_SIGN_name (NOT_MARK_SIGN_name + 3) -/** Compiled in flag settings for the mark-sign option */ -#define MARK_SIGN_FLAGS (OPTST_DISABLED) - -/** - * mark-ca option description: - */ -/** Descriptive text for the mark-ca option */ -#define MARK_CA_DESC (p11tool_opt_strs+3642) -/** Upper-cased name for the mark-ca option */ -#define MARK_CA_NAME (p11tool_opt_strs+3681) -/** disablement name for the mark-ca option */ -#define NOT_MARK_CA_name (p11tool_opt_strs+3689) -/** disablement prefix for the mark-ca option */ -#define NOT_MARK_CA_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-ca option */ -#define MARK_CA_name (NOT_MARK_CA_name + 3) -/** Compiled in flag settings for the mark-ca option */ -#define MARK_CA_FLAGS (OPTST_DISABLED) - -/** - * mark-private option description: - */ -/** Descriptive text for the mark-private option */ -#define MARK_PRIVATE_DESC (p11tool_opt_strs+3700) -/** Upper-cased name for the mark-private option */ -#define MARK_PRIVATE_NAME (p11tool_opt_strs+3742) -/** disablement name for the mark-private option */ -#define NOT_MARK_PRIVATE_name (p11tool_opt_strs+3755) -/** disablement prefix for the mark-private option */ -#define NOT_MARK_PRIVATE_PFX (p11tool_opt_strs+3302) -/** Name string for the mark-private option */ -#define MARK_PRIVATE_name (NOT_MARK_PRIVATE_name + 3) -/** Compiled in flag settings for the mark-private option */ -#define MARK_PRIVATE_FLAGS (OPTST_DISABLED) - -/** - * ca option description: - */ -/** Descriptive text for the ca option */ -#define CA_DESC (p11tool_opt_strs+3771) -#define CA_NAME NULL -/** Unmodified name string for the ca option */ -#define CA_name (p11tool_opt_strs+3805) -/** Compiled in flag settings for the ca option */ -#define CA_FLAGS (MARK_CA_FLAGS | OPTST_ALIAS) - -/** - * private option description: - */ -/** Descriptive text for the private option */ -#define PRIVATE_DESC (p11tool_opt_strs+3808) -#define PRIVATE_NAME NULL -/** Unmodified name string for the private option */ -#define PRIVATE_name (p11tool_opt_strs+3847) -/** Compiled in flag settings for the private option */ -#define PRIVATE_FLAGS (MARK_PRIVATE_FLAGS | OPTST_ALIAS) - -/** - * secret-key option description: - */ -/** Descriptive text for the secret-key option */ -#define SECRET_KEY_DESC (p11tool_opt_strs+3855) -/** Upper-cased name for the secret-key option */ -#define SECRET_KEY_NAME (p11tool_opt_strs+3888) -/** Name string for the secret-key option */ -#define SECRET_KEY_name (p11tool_opt_strs+3899) -/** Compiled in flag settings for the secret-key option */ -#define SECRET_KEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * load-privkey option description: - */ -/** Descriptive text for the load-privkey option */ -#define LOAD_PRIVKEY_DESC (p11tool_opt_strs+3910) -/** Upper-cased name for the load-privkey option */ -#define LOAD_PRIVKEY_NAME (p11tool_opt_strs+3934) -/** Name string for the load-privkey option */ -#define LOAD_PRIVKEY_name (p11tool_opt_strs+3947) -/** Compiled in flag settings for the load-privkey option */ -#define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-pubkey option description: - */ -/** Descriptive text for the load-pubkey option */ -#define LOAD_PUBKEY_DESC (p11tool_opt_strs+3960) -/** Upper-cased name for the load-pubkey option */ -#define LOAD_PUBKEY_NAME (p11tool_opt_strs+3983) -/** Name string for the load-pubkey option */ -#define LOAD_PUBKEY_name (p11tool_opt_strs+3995) -/** Compiled in flag settings for the load-pubkey option */ -#define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * load-certificate option description: - */ -/** Descriptive text for the load-certificate option */ -#define LOAD_CERTIFICATE_DESC (p11tool_opt_strs+4007) -/** Upper-cased name for the load-certificate option */ -#define LOAD_CERTIFICATE_NAME (p11tool_opt_strs+4031) -/** Name string for the load-certificate option */ -#define LOAD_CERTIFICATE_name (p11tool_opt_strs+4048) -/** Compiled in flag settings for the load-certificate option */ -#define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * other_options option description: - */ -/** other_options option separation text */ -#define OTHER_OPTIONS_DESC (p11tool_opt_strs+4065) -#define OTHER_OPTIONS_FLAGS (OPTST_DOCUMENT | OPTST_NO_INIT) - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (p11tool_opt_strs+4080) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (p11tool_opt_strs+4097) -/** Name string for the debug option */ -#define DEBUG_name (p11tool_opt_strs+4103) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * outfile option description: - */ -/** Descriptive text for the outfile option */ -#define OUTFILE_DESC (p11tool_opt_strs+4109) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (p11tool_opt_strs+4121) -/** Name string for the outfile option */ -#define OUTFILE_name (p11tool_opt_strs+4129) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * login option description: - */ -/** Descriptive text for the login option */ -#define LOGIN_DESC (p11tool_opt_strs+4137) -/** Upper-cased name for the login option */ -#define LOGIN_NAME (p11tool_opt_strs+4165) -/** disablement name for the login option */ -#define NOT_LOGIN_name (p11tool_opt_strs+4171) -/** disablement prefix for the login option */ -#define NOT_LOGIN_PFX (p11tool_opt_strs+3302) -/** Name string for the login option */ -#define LOGIN_name (NOT_LOGIN_name + 3) -/** Compiled in flag settings for the login option */ -#define LOGIN_FLAGS (OPTST_DISABLED) - -/** - * so-login option description: - */ -/** Descriptive text for the so-login option */ -#define SO_LOGIN_DESC (p11tool_opt_strs+4180) -/** Upper-cased name for the so-login option */ -#define SO_LOGIN_NAME (p11tool_opt_strs+4218) -/** disablement name for the so-login option */ -#define NOT_SO_LOGIN_name (p11tool_opt_strs+4227) -/** disablement prefix for the so-login option */ -#define NOT_SO_LOGIN_PFX (p11tool_opt_strs+3302) -/** Name string for the so-login option */ -#define SO_LOGIN_name (NOT_SO_LOGIN_name + 3) -/** Compiled in flag settings for the so-login option */ -#define SO_LOGIN_FLAGS (OPTST_DISABLED) - -/** - * admin-login option description: - */ -/** Descriptive text for the admin-login option */ -#define ADMIN_LOGIN_DESC (p11tool_opt_strs+4239) -#define ADMIN_LOGIN_NAME NULL -/** Unmodified name string for the admin-login option */ -#define ADMIN_LOGIN_name (p11tool_opt_strs+4274) -/** Compiled in flag settings for the admin-login option */ -#define ADMIN_LOGIN_FLAGS (SO_LOGIN_FLAGS | OPTST_ALIAS) - -/** - * test-sign option description: - */ -/** Descriptive text for the test-sign option */ -#define TEST_SIGN_DESC (p11tool_opt_strs+4286) -/** Upper-cased name for the test-sign option */ -#define TEST_SIGN_NAME (p11tool_opt_strs+4339) -/** Name string for the test-sign option */ -#define TEST_SIGN_name (p11tool_opt_strs+4349) -/** Compiled in flag settings for the test-sign option */ -#define TEST_SIGN_FLAGS (OPTST_DISABLED) - -/** - * sign-params option description: - */ -/** Descriptive text for the sign-params option */ -#define SIGN_PARAMS_DESC (p11tool_opt_strs+4359) -/** Upper-cased name for the sign-params option */ -#define SIGN_PARAMS_NAME (p11tool_opt_strs+4400) -/** Name string for the sign-params option */ -#define SIGN_PARAMS_name (p11tool_opt_strs+4412) -/** Compiled in flag settings for the sign-params option */ -#define SIGN_PARAMS_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * hash option description: - */ -/** Descriptive text for the hash option */ -#define HASH_DESC (p11tool_opt_strs+4424) -/** Upper-cased name for the hash option */ -#define HASH_NAME (p11tool_opt_strs+4458) -/** Name string for the hash option */ -#define HASH_name (p11tool_opt_strs+4463) -/** Compiled in flag settings for the hash option */ -#define HASH_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * generate-random option description: - */ -/** Descriptive text for the generate-random option */ -#define GENERATE_RANDOM_DESC (p11tool_opt_strs+4468) -/** Upper-cased name for the generate-random option */ -#define GENERATE_RANDOM_NAME (p11tool_opt_strs+4489) -/** Name string for the generate-random option */ -#define GENERATE_RANDOM_name (p11tool_opt_strs+4505) -/** Compiled in flag settings for the generate-random option */ -#define GENERATE_RANDOM_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * pkcs8 option description: - */ -/** Descriptive text for the pkcs8 option */ -#define PKCS8_DESC (p11tool_opt_strs+4521) -/** Upper-cased name for the pkcs8 option */ -#define PKCS8_NAME (p11tool_opt_strs+4557) -/** Name string for the pkcs8 option */ -#define PKCS8_name (p11tool_opt_strs+4563) -/** Compiled in flag settings for the pkcs8 option */ -#define PKCS8_FLAGS (OPTST_DISABLED) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (p11tool_opt_strs+4569) -/** Upper-cased name for the inder option */ -#define INDER_NAME (p11tool_opt_strs+4598) -/** disablement name for the inder option */ -#define NOT_INDER_name (p11tool_opt_strs+4604) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (p11tool_opt_strs+3302) -/** 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 (p11tool_opt_strs+4613) -#define INRAW_NAME NULL -/** Unmodified name string for the inraw option */ -#define INRAW_name (p11tool_opt_strs+4645) -/** Compiled in flag settings for the inraw option */ -#define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS) - -/** - * outder option description: - */ -/** Descriptive text for the outder option */ -#define OUTDER_DESC (p11tool_opt_strs+4651) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (p11tool_opt_strs+4723) -/** disablement name for the outder option */ -#define NOT_OUTDER_name (p11tool_opt_strs+4730) -/** disablement prefix for the outder option */ -#define NOT_OUTDER_PFX (p11tool_opt_strs+3302) -/** 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) - -/** - * outraw option description: - */ -/** Descriptive text for the outraw option */ -#define OUTRAW_DESC (p11tool_opt_strs+4740) -#define OUTRAW_NAME NULL -/** Unmodified name string for the outraw option */ -#define OUTRAW_name (p11tool_opt_strs+4773) -/** Compiled in flag settings for the outraw option */ -#define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS) - -/** - * provider option description: - */ -/** Descriptive text for the provider option */ -#define PROVIDER_DESC (p11tool_opt_strs+4780) -/** Upper-cased name for the provider option */ -#define PROVIDER_NAME (p11tool_opt_strs+4818) -/** Name string for the provider option */ -#define PROVIDER_name (p11tool_opt_strs+4827) -/** Compiled in flag settings for the provider option */ -#define PROVIDER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * provider-opts option description: - */ -/** Descriptive text for the provider-opts option */ -#define PROVIDER_OPTS_DESC (p11tool_opt_strs+4836) -/** Upper-cased name for the provider-opts option */ -#define PROVIDER_OPTS_NAME (p11tool_opt_strs+4902) -/** Name string for the provider-opts option */ -#define PROVIDER_OPTS_name (p11tool_opt_strs+4916) -/** Compiled in flag settings for the provider-opts option */ -#define PROVIDER_OPTS_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * detailed-url option description: - */ -/** Descriptive text for the detailed-url option */ -#define DETAILED_URL_DESC (p11tool_opt_strs+4930) -/** Upper-cased name for the detailed-url option */ -#define DETAILED_URL_NAME (p11tool_opt_strs+4950) -/** disablement name for the detailed-url option */ -#define NOT_DETAILED_URL_name (p11tool_opt_strs+4963) -/** disablement prefix for the detailed-url option */ -#define NOT_DETAILED_URL_PFX (p11tool_opt_strs+3302) -/** Name string for the detailed-url option */ -#define DETAILED_URL_name (NOT_DETAILED_URL_name + 3) -/** Compiled in flag settings for the detailed-url option */ -#define DETAILED_URL_FLAGS (OPTST_DISABLED) - -/** - * only-urls option description: - */ -/** Descriptive text for the only-urls option */ -#define ONLY_URLS_DESC (p11tool_opt_strs+4979) -/** Upper-cased name for the only-urls option */ -#define ONLY_URLS_NAME (p11tool_opt_strs+5023) -/** Name string for the only-urls option */ -#define ONLY_URLS_name (p11tool_opt_strs+5033) -/** Compiled in flag settings for the only-urls option */ -#define ONLY_URLS_FLAGS (OPTST_DISABLED) - -/** - * batch option description: - */ -/** Descriptive text for the batch option */ -#define BATCH_DESC (p11tool_opt_strs+5043) -/** Upper-cased name for the batch option */ -#define BATCH_NAME (p11tool_opt_strs+5081) -/** Name string for the batch option */ -#define BATCH_name (p11tool_opt_strs+5087) -/** Compiled in flag settings for the batch option */ -#define BATCH_FLAGS (OPTST_DISABLED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (p11tool_opt_strs+5093) -#define HELP_name (p11tool_opt_strs+5137) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (p11tool_opt_strs+5142) -#define MORE_HELP_name (p11tool_opt_strs+5187) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+5197) -#define VER_name (p11tool_opt_strs+5233) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptAdmin_Login, doOptCa, doOptDebug, - doOptDistrusted, doOptInraw, doOptList_Keys, - doOptList_Privkeys, doOptLoad_Certificate, doOptLoad_Privkey, - doOptLoad_Pubkey, doOptOutraw, doOptPrivate, - doOptProvider, doOptTrusted, 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, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ TOKEN_RELATED_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TOKEN_RELATED_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 1, VALUE_OPT_LIST_TOKENS, - /* equiv idx, value */ 1, 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 */ 2, VALUE_OPT_LIST_TOKEN_URLS, - /* equiv idx, value */ 2, VALUE_OPT_LIST_TOKEN_URLS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_TOKEN_URLS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-token-urls */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ LIST_TOKEN_URLS_DESC, LIST_TOKEN_URLS_NAME, LIST_TOKEN_URLS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_LIST_MECHANISMS, - /* equiv idx, value */ 3, 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 */ 4, VALUE_OPT_INITIALIZE, - /* equiv idx, value */ 4, 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 */ 5, VALUE_OPT_INITIALIZE_PIN, - /* equiv idx, value */ 5, VALUE_OPT_INITIALIZE_PIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INITIALIZE_PIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --initialize-pin */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INITIALIZE_PIN_DESC, INITIALIZE_PIN_NAME, INITIALIZE_PIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 6, VALUE_OPT_INITIALIZE_SO_PIN, - /* equiv idx, value */ 6, VALUE_OPT_INITIALIZE_SO_PIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INITIALIZE_SO_PIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --initialize-so-pin */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INITIALIZE_SO_PIN_DESC, INITIALIZE_SO_PIN_NAME, INITIALIZE_SO_PIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_SET_PIN, - /* equiv idx, value */ 7, VALUE_OPT_SET_PIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SET_PIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --set-pin */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SET_PIN_DESC, SET_PIN_NAME, SET_PIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_SET_SO_PIN, - /* equiv idx, value */ 8, VALUE_OPT_SET_SO_PIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SET_SO_PIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --set-so-pin */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SET_SO_PIN_DESC, SET_SO_PIN_NAME, SET_SO_PIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ OBJECT_LIST_RELATED_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OBJECT_LIST_RELATED_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 10, VALUE_OPT_LIST_ALL, - /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_LIST_ALL_CERTS, - /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_LIST_CERTS, - /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_LIST_ALL_PRIVKEYS, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_LIST_PRIVKEYS, - /* equiv idx, value */ 14, VALUE_OPT_LIST_PRIVKEYS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_PRIVKEYS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-privkeys */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptList_Privkeys, - /* desc, NAME, name */ LIST_PRIVKEYS_DESC, LIST_PRIVKEYS_NAME, LIST_PRIVKEYS_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 15, VALUE_OPT_LIST_KEYS, - /* equiv idx, value */ 15, VALUE_OPT_LIST_KEYS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ LIST_KEYS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --list-keys */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptList_Keys, - /* desc, NAME, name */ LIST_KEYS_DESC, LIST_KEYS_NAME, LIST_KEYS_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 16, VALUE_OPT_LIST_ALL_TRUSTED, - /* equiv idx, value */ 16, 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 */ 17, VALUE_OPT_EXPORT, - /* equiv idx, value */ 17, 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, aExportCantList, - /* option proc */ NULL, - /* desc, NAME, name */ EXPORT_DESC, EXPORT_NAME, EXPORT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 18, VALUE_OPT_EXPORT_STAPLED, - /* equiv idx, value */ 18, VALUE_OPT_EXPORT_STAPLED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EXPORT_STAPLED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --export-stapled */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aExport_StapledCantList, - /* option proc */ NULL, - /* desc, NAME, name */ EXPORT_STAPLED_DESC, EXPORT_STAPLED_NAME, EXPORT_STAPLED_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_EXPORT_CHAIN, - /* equiv idx, value */ 19, VALUE_OPT_EXPORT_CHAIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EXPORT_CHAIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --export-chain */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aExport_ChainCantList, - /* option proc */ NULL, - /* desc, NAME, name */ EXPORT_CHAIN_DESC, EXPORT_CHAIN_NAME, EXPORT_CHAIN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 20, VALUE_OPT_EXPORT_PUBKEY, - /* equiv idx, value */ 20, VALUE_OPT_EXPORT_PUBKEY, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EXPORT_PUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --export-pubkey */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aExport_PubkeyCantList, - /* option proc */ NULL, - /* desc, NAME, name */ EXPORT_PUBKEY_DESC, EXPORT_PUBKEY_NAME, EXPORT_PUBKEY_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 21, VALUE_OPT_INFO, - /* equiv idx, value */ 21, VALUE_OPT_INFO, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ INFO_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --info */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ INFO_DESC, INFO_NAME, INFO_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 22, VALUE_OPT_TRUSTED, - /* equiv idx, value */ 22, 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 */ doOptTrusted, - /* desc, NAME, name */ TRUSTED_DESC, TRUSTED_NAME, TRUSTED_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 23, VALUE_OPT_DISTRUSTED, - /* equiv idx, value */ 23, VALUE_OPT_DISTRUSTED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ DISTRUSTED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --distrusted */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptDistrusted, - /* desc, NAME, name */ DISTRUSTED_DESC, DISTRUSTED_NAME, DISTRUSTED_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ KEYGEN_RELATED_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ KEYGEN_RELATED_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 25, VALUE_OPT_GENERATE_PRIVKEY, - /* equiv idx, value */ 25, 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 */ 26, VALUE_OPT_GENERATE_RSA, - /* equiv idx, value */ 26, 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 */ 27, VALUE_OPT_GENERATE_DSA, - /* equiv idx, value */ 27, 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 */ 28, VALUE_OPT_GENERATE_ECC, - /* equiv idx, value */ 28, 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 */ 29, VALUE_OPT_BITS, - /* equiv idx, value */ 29, 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 */ 30, VALUE_OPT_CURVE, - /* equiv idx, value */ 30, VALUE_OPT_CURVE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ CURVE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --curve */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ CURVE_DESC, CURVE_NAME, CURVE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 31, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 31, 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ WRITE_OBJECT_RELATED_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ WRITE_OBJECT_RELATED_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 33, VALUE_OPT_SET_ID, - /* equiv idx, value */ 33, VALUE_OPT_SET_ID, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SET_ID_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --set-id */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aSet_IdCantList, - /* option proc */ NULL, - /* desc, NAME, name */ SET_ID_DESC, SET_ID_NAME, SET_ID_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 34, VALUE_OPT_SET_LABEL, - /* equiv idx, value */ 34, VALUE_OPT_SET_LABEL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SET_LABEL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --set-label */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aSet_LabelCantList, - /* option proc */ NULL, - /* desc, NAME, name */ SET_LABEL_DESC, SET_LABEL_NAME, SET_LABEL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 35, VALUE_OPT_WRITE, - /* equiv idx, value */ 35, 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 */ 36, VALUE_OPT_DELETE, - /* equiv idx, value */ 36, 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 */ 37, VALUE_OPT_LABEL, - /* equiv idx, value */ 37, 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 */ 38, VALUE_OPT_ID, - /* equiv idx, value */ 38, VALUE_OPT_ID, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ID_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --id */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ID_DESC, ID_NAME, ID_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 39, VALUE_OPT_MARK_WRAP, - /* equiv idx, value */ 39, VALUE_OPT_MARK_WRAP, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_WRAP_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-wrap */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_WRAP_DESC, MARK_WRAP_NAME, MARK_WRAP_name, - /* disablement strs */ NOT_MARK_WRAP_name, NOT_MARK_WRAP_PFX }, - - { /* entry idx, value */ 40, VALUE_OPT_MARK_TRUSTED, - /* equiv idx, value */ 40, VALUE_OPT_MARK_TRUSTED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_TRUSTED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-trusted */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aMark_TrustedCantList, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_TRUSTED_DESC, MARK_TRUSTED_NAME, MARK_TRUSTED_name, - /* disablement strs */ NOT_MARK_TRUSTED_name, NOT_MARK_TRUSTED_PFX }, - - { /* entry idx, value */ 41, VALUE_OPT_MARK_DISTRUSTED, - /* equiv idx, value */ 41, VALUE_OPT_MARK_DISTRUSTED, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_DISTRUSTED_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-distrusted */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, aMark_DistrustedCantList, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_DISTRUSTED_DESC, MARK_DISTRUSTED_NAME, MARK_DISTRUSTED_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 42, VALUE_OPT_MARK_DECRYPT, - /* equiv idx, value */ 42, VALUE_OPT_MARK_DECRYPT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_DECRYPT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-decrypt */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_DECRYPT_DESC, MARK_DECRYPT_NAME, MARK_DECRYPT_name, - /* disablement strs */ NOT_MARK_DECRYPT_name, NOT_MARK_DECRYPT_PFX }, - - { /* entry idx, value */ 43, VALUE_OPT_MARK_SIGN, - /* equiv idx, value */ 43, VALUE_OPT_MARK_SIGN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_SIGN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-sign */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_SIGN_DESC, MARK_SIGN_NAME, MARK_SIGN_name, - /* disablement strs */ NOT_MARK_SIGN_name, NOT_MARK_SIGN_PFX }, - - { /* entry idx, value */ 44, VALUE_OPT_MARK_CA, - /* equiv idx, value */ 44, VALUE_OPT_MARK_CA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_CA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-ca */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_CA_DESC, MARK_CA_NAME, MARK_CA_name, - /* disablement strs */ NOT_MARK_CA_name, NOT_MARK_CA_PFX }, - - { /* entry idx, value */ 45, VALUE_OPT_MARK_PRIVATE, - /* equiv idx, value */ 45, VALUE_OPT_MARK_PRIVATE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ MARK_PRIVATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --mark-private */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ MARK_PRIVATE_DESC, MARK_PRIVATE_NAME, MARK_PRIVATE_name, - /* disablement strs */ NOT_MARK_PRIVATE_name, NOT_MARK_PRIVATE_PFX }, - - { /* entry idx, value */ 46, VALUE_OPT_CA, - /* equiv idx, value */ 46, 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 */ doOptCa, - /* desc, NAME, name */ CA_DESC, CA_NAME, CA_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 47, VALUE_OPT_PRIVATE, - /* equiv idx, value */ 47, 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 */ doOptPrivate, - /* desc, NAME, name */ PRIVATE_DESC, PRIVATE_NAME, PRIVATE_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 48, VALUE_OPT_SECRET_KEY, - /* equiv idx, value */ 48, 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 */ 49, VALUE_OPT_LOAD_PRIVKEY, - /* equiv idx, value */ 49, 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 */ 50, VALUE_OPT_LOAD_PUBKEY, - /* equiv idx, value */ 50, 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 */ 51, VALUE_OPT_LOAD_CERTIFICATE, - /* equiv idx, value */ 51, 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 */ 0, 0, - /* equiv idx, value */ 0, 0, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 0, 0, - /* opt state flags */ OTHER_OPTIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ OTHER_OPTIONS_DESC, NULL, NULL, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 53, VALUE_OPT_DEBUG, - /* equiv idx, value */ 53, 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 */ 54, VALUE_OPT_OUTFILE, - /* equiv idx, value */ 54, 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 */ 55, VALUE_OPT_LOGIN, - /* equiv idx, value */ 55, 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 */ 56, VALUE_OPT_SO_LOGIN, - /* equiv idx, value */ 56, VALUE_OPT_SO_LOGIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SO_LOGIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --so-login */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SO_LOGIN_DESC, SO_LOGIN_NAME, SO_LOGIN_name, - /* disablement strs */ NOT_SO_LOGIN_name, NOT_SO_LOGIN_PFX }, - - { /* entry idx, value */ 57, VALUE_OPT_ADMIN_LOGIN, - /* equiv idx, value */ 57, VALUE_OPT_ADMIN_LOGIN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ADMIN_LOGIN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --admin-login */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptAdmin_Login, - /* desc, NAME, name */ ADMIN_LOGIN_DESC, ADMIN_LOGIN_NAME, ADMIN_LOGIN_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 58, VALUE_OPT_TEST_SIGN, - /* equiv idx, value */ 58, VALUE_OPT_TEST_SIGN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TEST_SIGN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --test-sign */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TEST_SIGN_DESC, TEST_SIGN_NAME, TEST_SIGN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 59, VALUE_OPT_SIGN_PARAMS, - /* equiv idx, value */ 59, VALUE_OPT_SIGN_PARAMS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SIGN_PARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sign-params */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SIGN_PARAMS_DESC, SIGN_PARAMS_NAME, SIGN_PARAMS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 60, VALUE_OPT_HASH, - /* equiv idx, value */ 60, 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 */ 61, VALUE_OPT_GENERATE_RANDOM, - /* equiv idx, value */ 61, 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 */ 62, VALUE_OPT_PKCS8, - /* equiv idx, value */ 62, 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 */ 63, VALUE_OPT_INDER, - /* equiv idx, value */ 63, 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 */ 64, VALUE_OPT_INRAW, - /* equiv idx, value */ 64, 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 */ 65, VALUE_OPT_OUTDER, - /* equiv idx, value */ 65, 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 */ 66, VALUE_OPT_OUTRAW, - /* equiv idx, value */ 66, 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 */ 67, VALUE_OPT_PROVIDER, - /* equiv idx, value */ 67, 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 */ 68, VALUE_OPT_PROVIDER_OPTS, - /* equiv idx, value */ 68, VALUE_OPT_PROVIDER_OPTS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PROVIDER_OPTS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --provider-opts */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PROVIDER_OPTS_DESC, PROVIDER_OPTS_NAME, PROVIDER_OPTS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 69, VALUE_OPT_DETAILED_URL, - /* equiv idx, value */ 69, 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 */ 70, VALUE_OPT_ONLY_URLS, - /* equiv idx, value */ 70, VALUE_OPT_ONLY_URLS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ONLY_URLS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --only-urls */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ONLY_URLS_DESC, ONLY_URLS_NAME, ONLY_URLS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 71, VALUE_OPT_BATCH, - /* equiv idx, value */ 71, VALUE_OPT_BATCH, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ BATCH_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --batch */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ BATCH_DESC, BATCH_NAME, BATCH_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 p11tool. */ -#define zPROGNAME (p11tool_opt_strs+5241) -/** Reference to the title line for p11tool usage. */ -#define zUsageTitle (p11tool_opt_strs+5249) -/** There is no p11tool configuration file. */ -#define zRcName NULL -/** There are no directories to search for p11tool config files. */ -#define apzHomeList NULL -/** The p11tool program bug email address. */ -#define zBugsAddr (p11tool_opt_strs+5344) -/** Clarification/explanation of what p11tool does. */ -#define zExplain (p11tool_opt_strs+5360) -/** Extra detail explaining what p11tool does. */ -#define zDetail (p11tool_opt_strs+5362) -/** The full version string for p11tool. */ -#define zFullVersion (p11tool_opt_strs+5904) -/* extracted from optcode.tlib near line 364 */ - -#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+5918) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = P11TOOL_EXIT_SUCCESS; - optionUsage(&p11toolOptions, ex_code); - /* NOTREACHED */ - exit(P11TOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the list-privkeys option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptList_Privkeys(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_LIST_ALL_PRIVKEYS); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the list-keys option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptList_Keys(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_LIST_ALL_PRIVKEYS); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the trusted option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptTrusted(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_MARK_TRUSTED); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the distrusted option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptDistrusted(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_MARK_DISTRUSTED); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the ca option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptCa(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_MARK_CA); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the private option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPrivate(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_MARK_PRIVATE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the load-privkey option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] 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[in] pOptions the p11tool options data structure - * @param[in,out] 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[in] pOptions the p11tool options data structure - * @param[in,out] 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 debug option. - * Specifies the debug level. - * @param[in] pOptions the p11tool 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the admin-login option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptAdmin_Login(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_SO_LOGIN); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the inraw option. - * - * @param[in] pOptions the p11tool 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(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the outraw option. - * - * @param[in] pOptions the p11tool options data structure - * @param[in,out] 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(P11TOOL_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the provider option. - * This will override the default options in /etc/gnutls/pkcs11.conf - * @param[in] pOptions the p11tool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptProvider(tOptions* pOptions, tOptDesc* pOptDesc) -{ - static teOptFileType const type = - FTYPE_MODE_MAY_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 1250 */ - -/** - * 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 -/** Packager information for p11tool. */ -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 */ - }, - 75 /* full option count */, 72 /* user option count */, - p11tool_full_usage, p11tool_short_usage, - NULL, NULL, - PKGDATADIR, p11tool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * p11tool program. These translations happen upon entry - * to optionProcess(). - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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. - */ - char ** ppz = (char**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 p11toolOptions structure noted in the - comments below. The literal text is defined in p11tool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - p11tool_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 p11toolOptions.pzCopyright */ - puts(_("p11tool 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n")); - - /* referenced via p11toolOptions.pzCopyNotice */ - puts(_("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")); - puts(_("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")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see <http://www.gnu.org/licenses/>.\n")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Tokens:")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available tokens")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List the URLs available tokens")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available mechanisms in a token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Initializes a PKCS #11 token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Initializes/Resets a PKCS #11 token user PIN")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Initializes/Resets a PKCS #11 token security officer PIN.")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the PIN to use on token operations")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the Security Officer's PIN to use on token initialization")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Object listing:")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available objects in a token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available certificates in a token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all certificates that have an associated private key")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available private keys in a token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'list-all-privkeys' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'list-all-privkeys' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List all available certificates marked as trusted")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Export the object specified by the URL")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Export the certificate object specified by the URL")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Export the certificate specified by the URL and its chain of trust")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Export the public key for a private key")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("List information on an available object in a token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'mark-trusted' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'mark-distrusted' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Key generation:")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Generate private-public key pair of given type")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Generate an RSA private-public key pair (deprecated)")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Generate a DSA private-public key pair (deprecated)")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Generate an ECDSA private-public key pair (deprecated)")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the number of bits for the key generate")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the curve used for EC key generation")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the security level")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Writing objects:")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Set the CKA_ID (in hex) for the specified by the URL object")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Set the CKA_LABEL for the specified by the URL object")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Writes the loaded objects to a PKCS #11 token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Deletes the objects matching the given PKCS #11 URL")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Sets a label for the write operation")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Sets an ID for the write operation")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the generated key to be a wrapping key")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the object to be written as trusted")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("When retrieving objects, it requires the objects to be distrusted\n\ -(blacklisted)")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the object to be written for decryption")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the object to be written for signature generation")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the object to be written as a CA")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Marks the object to be written as private")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'mark-ca' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'mark-private' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Provide a hex encoded secret key")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Private key file to use")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Public key file to use")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Certificate file to use")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Other options:")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Force (user) login to token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Force security officer login to token")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'so-login' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Tests the signature operation of the provided object")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Sign with a specific signature algorithm")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Hash algorithm to use for signing")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Generate random data")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Use PKCS #8 format for private keys")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Use DER/RAW format for input")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'inder' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Use DER format for output certificates, private keys, and DH parameters")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'outder' option")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify the PKCS #11 provider library")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Specify parameters for the PKCS #11 provider library (deprecated)")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Print detailed URLs")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Print a compact listing using only the URLs")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("Disable all interaction with the tool")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via p11toolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via p11toolOptions.pzUsageTitle */ - puts(_("p11tool - GnuTLS PKCS #11 tool\n\ -Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [url]\n")); - - /* referenced via p11toolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via p11toolOptions.pzDetail */ - puts(_("Program that allows operations on PKCS #11 smart cards and security\n\ -modules.\n\n")); - puts(_("To use PKCS #11 tokens with GnuTLS the p11-kit configuration files need to\n\ -be setup. That is create a .module file in /etc/pkcs11/modules with the\n\ -contents 'module: /path/to/pkcs11.so'. Alternatively the configuration\n\ -file /etc/gnutls/pkcs11.conf has to exist and contain a number of lines of\n\ -the form 'load=/usr/lib/opensc-pkcs11.so'.\n\n")); - puts(_("You can provide the PIN to be used for the PKCS #11 operations with the\n\ -environment variables GNUTLS_PIN and GNUTLS_SO_PIN.\n")); - - /* referenced via p11toolOptions.pzFullVersion */ - puts(_("p11tool 3.6.4")); - - /* referenced via p11toolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via p11toolOptions.pzShortUsage */ - puts(_("p11tool [options] [url]\n\ -p11tool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* p11tool-args.c ends here */ diff --git a/src/p11tool-args.h.bak b/src/p11tool-args.h.bak deleted file mode 100644 index 44a599324a..0000000000 --- a/src/p11tool-args.h.bak +++ /dev/null @@ -1,349 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (p11tool-args.h) - * - * It has been AutoGen-ed - * From the definitions p11tool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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 p11tool - */ -typedef enum { - INDEX_OPT_LIST_TOKENS = 1, - INDEX_OPT_LIST_TOKEN_URLS = 2, - INDEX_OPT_LIST_MECHANISMS = 3, - INDEX_OPT_INITIALIZE = 4, - INDEX_OPT_INITIALIZE_PIN = 5, - INDEX_OPT_INITIALIZE_SO_PIN = 6, - INDEX_OPT_SET_PIN = 7, - INDEX_OPT_SET_SO_PIN = 8, - INDEX_OPT_LIST_ALL = 10, - INDEX_OPT_LIST_ALL_CERTS = 11, - INDEX_OPT_LIST_CERTS = 12, - INDEX_OPT_LIST_ALL_PRIVKEYS = 13, - INDEX_OPT_LIST_PRIVKEYS = 14, - INDEX_OPT_LIST_KEYS = 15, - INDEX_OPT_LIST_ALL_TRUSTED = 16, - INDEX_OPT_EXPORT = 17, - INDEX_OPT_EXPORT_STAPLED = 18, - INDEX_OPT_EXPORT_CHAIN = 19, - INDEX_OPT_EXPORT_PUBKEY = 20, - INDEX_OPT_INFO = 21, - INDEX_OPT_TRUSTED = 22, - INDEX_OPT_DISTRUSTED = 23, - INDEX_OPT_GENERATE_PRIVKEY = 25, - INDEX_OPT_GENERATE_RSA = 26, - INDEX_OPT_GENERATE_DSA = 27, - INDEX_OPT_GENERATE_ECC = 28, - INDEX_OPT_BITS = 29, - INDEX_OPT_CURVE = 30, - INDEX_OPT_SEC_PARAM = 31, - INDEX_OPT_SET_ID = 33, - INDEX_OPT_SET_LABEL = 34, - INDEX_OPT_WRITE = 35, - INDEX_OPT_DELETE = 36, - INDEX_OPT_LABEL = 37, - INDEX_OPT_ID = 38, - INDEX_OPT_MARK_WRAP = 39, - INDEX_OPT_MARK_TRUSTED = 40, - INDEX_OPT_MARK_DISTRUSTED = 41, - INDEX_OPT_MARK_DECRYPT = 42, - INDEX_OPT_MARK_SIGN = 43, - INDEX_OPT_MARK_CA = 44, - INDEX_OPT_MARK_PRIVATE = 45, - INDEX_OPT_CA = 46, - INDEX_OPT_PRIVATE = 47, - INDEX_OPT_SECRET_KEY = 48, - INDEX_OPT_LOAD_PRIVKEY = 49, - INDEX_OPT_LOAD_PUBKEY = 50, - INDEX_OPT_LOAD_CERTIFICATE = 51, - INDEX_OPT_DEBUG = 53, - INDEX_OPT_OUTFILE = 54, - INDEX_OPT_LOGIN = 55, - INDEX_OPT_SO_LOGIN = 56, - INDEX_OPT_ADMIN_LOGIN = 57, - INDEX_OPT_TEST_SIGN = 58, - INDEX_OPT_SIGN_PARAMS = 59, - INDEX_OPT_HASH = 60, - INDEX_OPT_GENERATE_RANDOM = 61, - INDEX_OPT_PKCS8 = 62, - INDEX_OPT_INDER = 63, - INDEX_OPT_INRAW = 64, - INDEX_OPT_OUTDER = 65, - INDEX_OPT_OUTRAW = 66, - INDEX_OPT_PROVIDER = 67, - INDEX_OPT_PROVIDER_OPTS = 68, - INDEX_OPT_DETAILED_URL = 69, - INDEX_OPT_ONLY_URLS = 70, - INDEX_OPT_BATCH = 71, - INDEX_OPT_VERSION = 72, - INDEX_OPT_HELP = 73, - INDEX_OPT_MORE_HELP = 74 -} teOptIndex; -/** count of all options for p11tool */ -#define OPTION_CT 75 -/** p11tool version */ -#define P11TOOL_VERSION "3.6.4" -/** Full p11tool version text */ -#define P11TOOL_FULL_VERSION "p11tool 3.6.4" - -/** - * Interface defines for all options. Replace "n" with the UPPER_CASED - * option name (as in the teOptIndex enumeration above). - * e.g. HAVE_OPT(TOKEN_RELATED_OPTIONS) - */ -#define DESC(n) (p11toolOptions.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 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_LIST_TOKENS 0x1001 -#define VALUE_OPT_LIST_TOKEN_URLS 0x1002 -#define VALUE_OPT_LIST_MECHANISMS 0x1003 -#define VALUE_OPT_INITIALIZE 0x1004 -#define VALUE_OPT_INITIALIZE_PIN 0x1005 -#define VALUE_OPT_INITIALIZE_SO_PIN 0x1006 -#define VALUE_OPT_SET_PIN 0x1007 -#define VALUE_OPT_SET_SO_PIN 0x1008 -#define VALUE_OPT_LIST_ALL 0x1009 -#define VALUE_OPT_LIST_ALL_CERTS 0x100A -#define VALUE_OPT_LIST_CERTS 0x100B -#define VALUE_OPT_LIST_ALL_PRIVKEYS 0x100C -#define VALUE_OPT_LIST_PRIVKEYS 0x100D -#define VALUE_OPT_LIST_KEYS 0x100E -#define VALUE_OPT_LIST_ALL_TRUSTED 0x100F -#define VALUE_OPT_EXPORT 0x1010 -#define VALUE_OPT_EXPORT_STAPLED 0x1011 -#define VALUE_OPT_EXPORT_CHAIN 0x1012 -#define VALUE_OPT_EXPORT_PUBKEY 0x1013 -#define VALUE_OPT_INFO 0x1014 -#define VALUE_OPT_TRUSTED 0x1015 -#define VALUE_OPT_DISTRUSTED 0x1016 -#define VALUE_OPT_GENERATE_PRIVKEY 0x1017 -#define VALUE_OPT_GENERATE_RSA 0x1018 -#define VALUE_OPT_GENERATE_DSA 0x1019 -#define VALUE_OPT_GENERATE_ECC 0x101A -#define VALUE_OPT_BITS 0x101B - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_CURVE 0x101C -#define VALUE_OPT_SEC_PARAM 0x101D -#define VALUE_OPT_SET_ID 0x101E -#define VALUE_OPT_SET_LABEL 0x101F -#define VALUE_OPT_WRITE 0x1020 -#define VALUE_OPT_DELETE 0x1021 -#define VALUE_OPT_LABEL 0x1022 -#define VALUE_OPT_ID 0x1023 -#define VALUE_OPT_MARK_WRAP 0x1024 -#define VALUE_OPT_MARK_TRUSTED 0x1025 -#define VALUE_OPT_MARK_DISTRUSTED 0x1026 -#define VALUE_OPT_MARK_DECRYPT 0x1027 -#define VALUE_OPT_MARK_SIGN 0x1028 -#define VALUE_OPT_MARK_CA 0x1029 -#define VALUE_OPT_MARK_PRIVATE 0x102A -#define VALUE_OPT_CA 0x102B -#define VALUE_OPT_PRIVATE 0x102C -#define VALUE_OPT_SECRET_KEY 0x102D -#define VALUE_OPT_LOAD_PRIVKEY 0x102E -#define VALUE_OPT_LOAD_PUBKEY 0x102F -#define VALUE_OPT_LOAD_CERTIFICATE 0x1030 -#define VALUE_OPT_DEBUG 'd' - -#define OPT_VALUE_DEBUG (DESC(DEBUG).optArg.argInt) -#define VALUE_OPT_OUTFILE 0x1031 -#define VALUE_OPT_LOGIN 0x1032 -#define VALUE_OPT_SO_LOGIN 0x1033 -#define VALUE_OPT_ADMIN_LOGIN 0x1034 -#define VALUE_OPT_TEST_SIGN 0x1035 -#define VALUE_OPT_SIGN_PARAMS 0x1036 -#define VALUE_OPT_HASH 0x1037 -#define VALUE_OPT_GENERATE_RANDOM 0x1038 - -#define OPT_VALUE_GENERATE_RANDOM (DESC(GENERATE_RANDOM).optArg.argInt) -#define VALUE_OPT_PKCS8 '8' -#define VALUE_OPT_INDER 0x1039 -#define VALUE_OPT_INRAW 0x103A -#define VALUE_OPT_OUTDER 0x103B -#define VALUE_OPT_OUTRAW 0x103C -#define VALUE_OPT_PROVIDER 0x103D -#define VALUE_OPT_PROVIDER_OPTS 0x103E -#define VALUE_OPT_DETAILED_URL 0x103F -#define VALUE_OPT_ONLY_URLS 0x1040 -#define VALUE_OPT_BATCH 0x1041 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value option */ -#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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the p11tool option descriptor. - */ -extern tOptions p11toolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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/psktool-args.c.bak b/src/psktool-args.c.bak deleted file mode 100644 index 8dde572da8..0000000000 --- a/src/psktool-args.c.bak +++ /dev/null @@ -1,1013 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (psktool-args.c) - * - * It has been AutoGen-ed - * From the definitions psktool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "psktool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (psktool_opt_strs+0) -#define zLicenseDescrip (psktool_opt_strs+282) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for psktool options - */ -static char const psktool_opt_strs[1586] = -/* 0 */ "psktool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 282 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 885 */ "Enable debugging\0" -/* 902 */ "DEBUG\0" -/* 908 */ "debug\0" -/* 914 */ "Specify the key size in bytes (default is 32-bytes or 256-bits)\0" -/* 978 */ "KEYSIZE\0" -/* 986 */ "keysize\0" -/* 994 */ "Specify the username to use\0" -/* 1022 */ "USERNAME\0" -/* 1031 */ "username\0" -/* 1040 */ "Specify a pre-shared key file\0" -/* 1070 */ "PSKFILE\0" -/* 1078 */ "pskfile\0" -/* 1086 */ "an alias for the 'pskfile' option (deprecated)\0" -/* 1133 */ "passwd\0" -/* 1140 */ "display extended usage information and exit\0" -/* 1184 */ "help\0" -/* 1189 */ "extended usage information passed thru pager\0" -/* 1234 */ "more-help\0" -/* 1244 */ "output version information and exit\0" -/* 1280 */ "version\0" -/* 1288 */ "PSKTOOL\0" -/* 1296 */ "psktool - GnuTLS PSK tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 1380 */ "bugs@gnutls.org\0" -/* 1396 */ "\n\0" -/* 1398 */ "Program that generates random keys for use with TLS-PSK. The keys are\n" - "stored in hexadecimal format in a key file.\n\0" -/* 1514 */ "psktool 3.6.4\0" -/* 1528 */ "psktool [options]\n" - "psktool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (psktool_opt_strs+885) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (psktool_opt_strs+902) -/** Name string for the debug option */ -#define DEBUG_name (psktool_opt_strs+908) -/** 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+914) -/** Upper-cased name for the keysize option */ -#define KEYSIZE_NAME (psktool_opt_strs+978) -/** Name string for the keysize option */ -#define KEYSIZE_name (psktool_opt_strs+986) -/** 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+994) -/** Upper-cased name for the username option */ -#define USERNAME_NAME (psktool_opt_strs+1022) -/** Name string for the username option */ -#define USERNAME_name (psktool_opt_strs+1031) -/** Compiled in flag settings for the username option */ -#define USERNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * pskfile option description: - */ -/** Descriptive text for the pskfile option */ -#define PSKFILE_DESC (psktool_opt_strs+1040) -/** Upper-cased name for the pskfile option */ -#define PSKFILE_NAME (psktool_opt_strs+1070) -/** Name string for the pskfile option */ -#define PSKFILE_name (psktool_opt_strs+1078) -/** Compiled in flag settings for the pskfile option */ -#define PSKFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * passwd option description: - */ -/** Descriptive text for the passwd option */ -#define PASSWD_DESC (psktool_opt_strs+1086) -#define PASSWD_NAME NULL -/** Unmodified name string for the passwd option */ -#define PASSWD_name (psktool_opt_strs+1133) -/** Compiled in flag settings for the passwd option */ -#define PASSWD_FLAGS (PSKFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (psktool_opt_strs+1140) -#define HELP_name (psktool_opt_strs+1184) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (psktool_opt_strs+1189) -#define MORE_HELP_name (psktool_opt_strs+1234) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+1244) -#define VER_name (psktool_opt_strs+1280) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptKeysize, doOptPasswd, 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_PSKFILE, - /* equiv idx, value */ 3, VALUE_OPT_PSKFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ PSKFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --pskfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ PSKFILE_DESC, PSKFILE_NAME, PSKFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 4, VALUE_OPT_PASSWD, - /* equiv idx, value */ 4, 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 */ doOptPasswd, - /* desc, NAME, name */ PASSWD_DESC, PASSWD_NAME, PASSWD_name, - /* disablement strs */ 0, 0 }, - - { /* 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+1288) -/** Reference to the title line for psktool usage. */ -#define zUsageTitle (psktool_opt_strs+1296) -/** 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+1380) -/** Clarification/explanation of what psktool does. */ -#define zExplain (psktool_opt_strs+1396) -/** Extra detail explaining what psktool does. */ -#define zDetail (psktool_opt_strs+1398) -/** The full version string for psktool. */ -#define zFullVersion (psktool_opt_strs+1514) -/* extracted from optcode.tlib near line 364 */ - -#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+1528) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = PSKTOOL_EXIT_SUCCESS; - optionUsage(&psktoolOptions, ex_code); - /* NOTREACHED */ - exit(PSKTOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the passwd option. - * - * @param[in] pOptions the psktool options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptPasswd(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_PSKFILE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(PSKTOOL_EXIT_USAGE_ERROR); - -} -/* extracted from optmain.tlib near line 1250 */ - -/** - * 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 */ - }, - 8 /* full option count */, 5 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\n")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("Specify the key size in bytes (default is 32-bytes or 256-bits)")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("Specify the username to use")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("Specify a pre-shared key file")); - - /* referenced via psktoolOptions.pOptDesc->pzText */ - puts(_("an alias for the 'pskfile' option (deprecated)")); - - /* 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\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 3.6.4")); - - /* referenced via psktoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via psktoolOptions.pzShortUsage */ - puts(_("psktool [options]\n\ -psktool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* psktool-args.c ends here */ diff --git a/src/psktool-args.h.bak b/src/psktool-args.h.bak deleted file mode 100644 index bc54dee0a6..0000000000 --- a/src/psktool-args.h.bak +++ /dev/null @@ -1,223 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (psktool-args.h) - * - * It has been AutoGen-ed - * From the definitions psktool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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_PSKTOOL_ARGS_H_GUARD -#define AUTOOPTS_PSKTOOL_ARGS_H_GUARD 1 -#include "config.h" -#include <autoopts/options.h> - -/** - * 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 167937 -#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_PSKFILE = 3, - INDEX_OPT_PASSWD = 4, - INDEX_OPT_VERSION = 5, - INDEX_OPT_HELP = 6, - INDEX_OPT_MORE_HELP = 7 -} teOptIndex; -/** count of all options for psktool */ -#define OPTION_CT 8 -/** psktool version */ -#define PSKTOOL_VERSION "3.6.4" -/** Full psktool version text */ -#define PSKTOOL_FULL_VERSION "psktool 3.6.4" - -/** - * 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_PSKFILE 'p' -#define VALUE_OPT_PASSWD 0x1001 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the psktool option descriptor. - */ -extern tOptions psktoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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_PSKTOOL_ARGS_H_GUARD */ - -/* psktool-args.h ends here */ diff --git a/src/serv-args.c.bak b/src/serv-args.c.bak deleted file mode 100644 index 2cd2173e8a..0000000000 --- a/src/serv-args.c.bak +++ /dev/null @@ -1,2322 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (serv-args.c) - * - * It has been AutoGen-ed - * From the definitions serv-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "serv-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (gnutls_serv_opt_strs+0) -#define zLicenseDescrip (gnutls_serv_opt_strs+286) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for gnutls-serv options - */ -static char const gnutls_serv_opt_strs[3466] = -/* 0 */ "gnutls-serv 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 286 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 897 */ "Enable debugging\0" -/* 914 */ "DEBUG\0" -/* 920 */ "debug\0" -/* 926 */ "Server's hostname for server name extension\0" -/* 970 */ "SNI_HOSTNAME\0" -/* 983 */ "sni-hostname\0" -/* 996 */ "Send fatal alert on sni-hostname mismatch\0" -/* 1038 */ "SNI_HOSTNAME_FATAL\0" -/* 1057 */ "sni-hostname-fatal\0" -/* 1076 */ "Specify ALPN protocol to be enabled by the server\0" -/* 1126 */ "ALPN\0" -/* 1131 */ "alpn\0" -/* 1136 */ "Send fatal alert on non-matching ALPN name\0" -/* 1179 */ "ALPN_FATAL\0" -/* 1190 */ "alpn-fatal\0" -/* 1201 */ "Don't accept session tickets\0" -/* 1230 */ "NOTICKET\0" -/* 1239 */ "noticket\0" -/* 1248 */ "Accept early data\0" -/* 1266 */ "EARLYDATA\0" -/* 1276 */ "earlydata\0" -/* 1286 */ "Don't require cookie on DTLS sessions\0" -/* 1324 */ "NOCOOKIE\0" -/* 1333 */ "nocookie\0" -/* 1342 */ "Generate Diffie-Hellman parameters\0" -/* 1377 */ "GENERATE\0" -/* 1386 */ "generate\0" -/* 1395 */ "Suppress some messages\0" -/* 1418 */ "QUIET\0" -/* 1424 */ "quiet\0" -/* 1430 */ "Do not use a resumption database\0" -/* 1463 */ "NODB\0" -/* 1468 */ "nodb\0" -/* 1473 */ "Act as an HTTP server\0" -/* 1495 */ "HTTP\0" -/* 1500 */ "http\0" -/* 1505 */ "Act as an Echo server\0" -/* 1527 */ "ECHO\0" -/* 1532 */ "echo\0" -/* 1537 */ "Use DTLS (datagram TLS) over UDP\0" -/* 1570 */ "UDP\0" -/* 1574 */ "udp\0" -/* 1578 */ "Set MTU for datagram TLS\0" -/* 1603 */ "MTU\0" -/* 1607 */ "mtu\0" -/* 1611 */ "Offer SRTP profiles\0" -/* 1631 */ "SRTP_PROFILES\0" -/* 1645 */ "srtp-profiles\0" -/* 1659 */ "Do not request a client certificate\0" -/* 1695 */ "DISABLE_CLIENT_CERT\0" -/* 1715 */ "disable-client-cert\0" -/* 1735 */ "Require a client certificate\0" -/* 1764 */ "REQUIRE_CLIENT_CERT\0" -/* 1784 */ "require-client-cert\0" -/* 1804 */ "If a client certificate is sent then verify it.\0" -/* 1852 */ "VERIFY_CLIENT_CERT\0" -/* 1871 */ "verify-client-cert\0" -/* 1890 */ "Activate heartbeat support\0" -/* 1917 */ "HEARTBEAT\0" -/* 1927 */ "heartbeat\0" -/* 1937 */ "Use DER format for certificates to read from\0" -/* 1982 */ "X509FMTDER\0" -/* 1993 */ "x509fmtder\0" -/* 2004 */ "Priorities string\0" -/* 2022 */ "PRIORITY\0" -/* 2031 */ "priority\0" -/* 2040 */ "DH params file to use\0" -/* 2062 */ "DHPARAMS\0" -/* 2071 */ "dhparams\0" -/* 2080 */ "Certificate file or PKCS #11 URL to use\0" -/* 2120 */ "X509CAFILE\0" -/* 2131 */ "x509cafile\0" -/* 2142 */ "CRL file to use\0" -/* 2158 */ "X509CRLFILE\0" -/* 2170 */ "x509crlfile\0" -/* 2182 */ "PGP Key file to use (deprecated)\0" -/* 2215 */ "PGPKEYFILE\0" -/* 2226 */ "pgpkeyfile\0" -/* 2237 */ "X.509 key file or PKCS #11 URL to use\0" -/* 2275 */ "X509KEYFILE\0" -/* 2287 */ "x509keyfile\0" -/* 2299 */ "X.509 Certificate file or PKCS #11 URL to use\0" -/* 2345 */ "X509CERTFILE\0" -/* 2358 */ "x509certfile\0" -/* 2371 */ "an alias for the 'x509keyfile' option (deprecated)\0" -/* 2422 */ "x509dsakeyfile\0" -/* 2437 */ "an alias for the 'x509certfile' option (deprecated)\0" -/* 2489 */ "x509dsacertfile\0" -/* 2505 */ "x509ecckeyfile\0" -/* 2520 */ "x509ecccertfile\0" -/* 2536 */ "SRP password file to use\0" -/* 2561 */ "SRPPASSWD\0" -/* 2571 */ "srppasswd\0" -/* 2581 */ "SRP password configuration file to use\0" -/* 2620 */ "SRPPASSWDCONF\0" -/* 2634 */ "srppasswdconf\0" -/* 2648 */ "PSK password file to use\0" -/* 2673 */ "PSKPASSWD\0" -/* 2683 */ "pskpasswd\0" -/* 2693 */ "PSK identity hint to use\0" -/* 2718 */ "PSKHINT\0" -/* 2726 */ "pskhint\0" -/* 2734 */ "The OCSP response to send to client\0" -/* 2770 */ "OCSP_RESPONSE\0" -/* 2784 */ "ocsp-response\0" -/* 2798 */ "Ignore any errors when setting the OCSP response\0" -/* 2847 */ "IGNORE_OCSP_RESPONSE_ERRORS\0" -/* 2875 */ "ignore-ocsp-response-errors\0" -/* 2903 */ "The port to connect to\0" -/* 2926 */ "PORT\0" -/* 2931 */ "port\0" -/* 2936 */ "Print a list of the supported algorithms and modes\0" -/* 2987 */ "LIST\0" -/* 2992 */ "list\0" -/* 2997 */ "Specify the PKCS #11 provider library\0" -/* 3035 */ "PROVIDER\0" -/* 3044 */ "provider\0" -/* 3053 */ "display extended usage information and exit\0" -/* 3097 */ "help\0" -/* 3102 */ "extended usage information passed thru pager\0" -/* 3147 */ "more-help\0" -/* 3157 */ "output version information and exit\0" -/* 3193 */ "version\0" -/* 3201 */ "GNUTLS_SERV\0" -/* 3213 */ "gnutls-serv - GnuTLS server\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 3299 */ "bugs@gnutls.org\0" -/* 3315 */ "\n\0" -/* 3317 */ "Server program that listens to incoming TLS connections.\n\0" -/* 3375 */ "gnutls-serv 3.6.4\0" -/* 3393 */ "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+897) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (gnutls_serv_opt_strs+914) -/** Name string for the debug option */ -#define DEBUG_name (gnutls_serv_opt_strs+920) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * sni-hostname option description: - */ -/** Descriptive text for the sni-hostname option */ -#define SNI_HOSTNAME_DESC (gnutls_serv_opt_strs+926) -/** Upper-cased name for the sni-hostname option */ -#define SNI_HOSTNAME_NAME (gnutls_serv_opt_strs+970) -/** Name string for the sni-hostname option */ -#define SNI_HOSTNAME_name (gnutls_serv_opt_strs+983) -/** Compiled in flag settings for the sni-hostname option */ -#define SNI_HOSTNAME_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * sni-hostname-fatal option description: - */ -/** Descriptive text for the sni-hostname-fatal option */ -#define SNI_HOSTNAME_FATAL_DESC (gnutls_serv_opt_strs+996) -/** Upper-cased name for the sni-hostname-fatal option */ -#define SNI_HOSTNAME_FATAL_NAME (gnutls_serv_opt_strs+1038) -/** Name string for the sni-hostname-fatal option */ -#define SNI_HOSTNAME_FATAL_name (gnutls_serv_opt_strs+1057) -/** Compiled in flag settings for the sni-hostname-fatal option */ -#define SNI_HOSTNAME_FATAL_FLAGS (OPTST_DISABLED) - -/** - * alpn option description: - */ -/** Descriptive text for the alpn option */ -#define ALPN_DESC (gnutls_serv_opt_strs+1076) -/** Upper-cased name for the alpn option */ -#define ALPN_NAME (gnutls_serv_opt_strs+1126) -/** Name string for the alpn option */ -#define ALPN_name (gnutls_serv_opt_strs+1131) -/** Compiled in flag settings for the alpn option */ -#define ALPN_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * alpn-fatal option description: - */ -/** Descriptive text for the alpn-fatal option */ -#define ALPN_FATAL_DESC (gnutls_serv_opt_strs+1136) -/** Upper-cased name for the alpn-fatal option */ -#define ALPN_FATAL_NAME (gnutls_serv_opt_strs+1179) -/** Name string for the alpn-fatal option */ -#define ALPN_FATAL_name (gnutls_serv_opt_strs+1190) -/** Compiled in flag settings for the alpn-fatal option */ -#define ALPN_FATAL_FLAGS (OPTST_DISABLED) - -/** - * noticket option description: - */ -/** Descriptive text for the noticket option */ -#define NOTICKET_DESC (gnutls_serv_opt_strs+1201) -/** Upper-cased name for the noticket option */ -#define NOTICKET_NAME (gnutls_serv_opt_strs+1230) -/** Name string for the noticket option */ -#define NOTICKET_name (gnutls_serv_opt_strs+1239) -/** Compiled in flag settings for the noticket option */ -#define NOTICKET_FLAGS (OPTST_DISABLED) - -/** - * earlydata option description: - */ -/** Descriptive text for the earlydata option */ -#define EARLYDATA_DESC (gnutls_serv_opt_strs+1248) -/** Upper-cased name for the earlydata option */ -#define EARLYDATA_NAME (gnutls_serv_opt_strs+1266) -/** Name string for the earlydata option */ -#define EARLYDATA_name (gnutls_serv_opt_strs+1276) -/** Compiled in flag settings for the earlydata option */ -#define EARLYDATA_FLAGS (OPTST_DISABLED) - -/** - * nocookie option description: - */ -/** Descriptive text for the nocookie option */ -#define NOCOOKIE_DESC (gnutls_serv_opt_strs+1286) -/** Upper-cased name for the nocookie option */ -#define NOCOOKIE_NAME (gnutls_serv_opt_strs+1324) -/** Name string for the nocookie option */ -#define NOCOOKIE_name (gnutls_serv_opt_strs+1333) -/** Compiled in flag settings for the nocookie option */ -#define NOCOOKIE_FLAGS (OPTST_DISABLED) - -/** - * generate option description: - */ -/** Descriptive text for the generate option */ -#define GENERATE_DESC (gnutls_serv_opt_strs+1342) -/** Upper-cased name for the generate option */ -#define GENERATE_NAME (gnutls_serv_opt_strs+1377) -/** Name string for the generate option */ -#define GENERATE_name (gnutls_serv_opt_strs+1386) -/** 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+1395) -/** Upper-cased name for the quiet option */ -#define QUIET_NAME (gnutls_serv_opt_strs+1418) -/** Name string for the quiet option */ -#define QUIET_name (gnutls_serv_opt_strs+1424) -/** 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+1430) -/** Upper-cased name for the nodb option */ -#define NODB_NAME (gnutls_serv_opt_strs+1463) -/** Name string for the nodb option */ -#define NODB_name (gnutls_serv_opt_strs+1468) -/** 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+1473) -/** Upper-cased name for the http option */ -#define HTTP_NAME (gnutls_serv_opt_strs+1495) -/** Name string for the http option */ -#define HTTP_name (gnutls_serv_opt_strs+1500) -/** 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+1505) -/** Upper-cased name for the echo option */ -#define ECHO_NAME (gnutls_serv_opt_strs+1527) -/** Name string for the echo option */ -#define ECHO_name (gnutls_serv_opt_strs+1532) -/** 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+1537) -/** Upper-cased name for the udp option */ -#define UDP_NAME (gnutls_serv_opt_strs+1570) -/** Name string for the udp option */ -#define UDP_name (gnutls_serv_opt_strs+1574) -/** 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+1578) -/** Upper-cased name for the mtu option */ -#define MTU_NAME (gnutls_serv_opt_strs+1603) -/** Name string for the mtu option */ -#define MTU_name (gnutls_serv_opt_strs+1607) -/** 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+1611) -/** Upper-cased name for the srtp_profiles option */ -#define SRTP_PROFILES_NAME (gnutls_serv_opt_strs+1631) -/** Name string for the srtp_profiles option */ -#define SRTP_PROFILES_name (gnutls_serv_opt_strs+1645) -/** 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 with - * "Must also have options" and "Incompatible options": - */ -/** Descriptive text for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1659) -/** Upper-cased name for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1695) -/** Name string for the disable-client-cert option */ -#define DISABLE_CLIENT_CERT_name (gnutls_serv_opt_strs+1715) -/** Other options that appear in conjunction with the disable-client-cert option */ -static int const aDisable_Client_CertCantList[] = { - INDEX_OPT_REQUIRE_CLIENT_CERT, NO_EQUIVALENT }; -/** 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+1735) -/** Upper-cased name for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1764) -/** Name string for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_name (gnutls_serv_opt_strs+1784) -/** Compiled in flag settings for the require-client-cert option */ -#define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) - -/** - * verify-client-cert option description: - */ -/** Descriptive text for the verify-client-cert option */ -#define VERIFY_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1804) -/** Upper-cased name for the verify-client-cert option */ -#define VERIFY_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1852) -/** Name string for the verify-client-cert option */ -#define VERIFY_CLIENT_CERT_name (gnutls_serv_opt_strs+1871) -/** Compiled in flag settings for the verify-client-cert option */ -#define VERIFY_CLIENT_CERT_FLAGS (OPTST_DISABLED) - -/** - * heartbeat option description: - */ -/** Descriptive text for the heartbeat option */ -#define HEARTBEAT_DESC (gnutls_serv_opt_strs+1890) -/** Upper-cased name for the heartbeat option */ -#define HEARTBEAT_NAME (gnutls_serv_opt_strs+1917) -/** Name string for the heartbeat option */ -#define HEARTBEAT_name (gnutls_serv_opt_strs+1927) -/** 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+1937) -/** Upper-cased name for the x509fmtder option */ -#define X509FMTDER_NAME (gnutls_serv_opt_strs+1982) -/** Name string for the x509fmtder option */ -#define X509FMTDER_name (gnutls_serv_opt_strs+1993) -/** 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+2004) -/** Upper-cased name for the priority option */ -#define PRIORITY_NAME (gnutls_serv_opt_strs+2022) -/** Name string for the priority option */ -#define PRIORITY_name (gnutls_serv_opt_strs+2031) -/** 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+2040) -/** Upper-cased name for the dhparams option */ -#define DHPARAMS_NAME (gnutls_serv_opt_strs+2062) -/** Name string for the dhparams option */ -#define DHPARAMS_name (gnutls_serv_opt_strs+2071) -/** 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+2080) -/** Upper-cased name for the x509cafile option */ -#define X509CAFILE_NAME (gnutls_serv_opt_strs+2120) -/** Name string for the x509cafile option */ -#define X509CAFILE_name (gnutls_serv_opt_strs+2131) -/** 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+2142) -/** Upper-cased name for the x509crlfile option */ -#define X509CRLFILE_NAME (gnutls_serv_opt_strs+2158) -/** Name string for the x509crlfile option */ -#define X509CRLFILE_name (gnutls_serv_opt_strs+2170) -/** 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+2182) -/** Upper-cased name for the pgpkeyfile option */ -#define PGPKEYFILE_NAME (gnutls_serv_opt_strs+2215) -/** Name string for the pgpkeyfile option */ -#define PGPKEYFILE_name (gnutls_serv_opt_strs+2226) -/** Compiled in flag settings for the pgpkeyfile option */ -#define PGPKEYFILE_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/** - * x509keyfile option description: - */ -/** Descriptive text for the x509keyfile option */ -#define X509KEYFILE_DESC (gnutls_serv_opt_strs+2237) -/** Upper-cased name for the x509keyfile option */ -#define X509KEYFILE_NAME (gnutls_serv_opt_strs+2275) -/** Name string for the x509keyfile option */ -#define X509KEYFILE_name (gnutls_serv_opt_strs+2287) -/** Compiled in flag settings for the x509keyfile option */ -#define X509KEYFILE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509certfile option description: - */ -/** Descriptive text for the x509certfile option */ -#define X509CERTFILE_DESC (gnutls_serv_opt_strs+2299) -/** Upper-cased name for the x509certfile option */ -#define X509CERTFILE_NAME (gnutls_serv_opt_strs+2345) -/** Name string for the x509certfile option */ -#define X509CERTFILE_name (gnutls_serv_opt_strs+2358) -/** Compiled in flag settings for the x509certfile option */ -#define X509CERTFILE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * x509dsakeyfile option description: - */ -/** Descriptive text for the x509dsakeyfile option */ -#define X509DSAKEYFILE_DESC (gnutls_serv_opt_strs+2371) -#define X509DSAKEYFILE_NAME NULL -/** Unmodified name string for the x509dsakeyfile option */ -#define X509DSAKEYFILE_name (gnutls_serv_opt_strs+2422) -/** Compiled in flag settings for the x509dsakeyfile option */ -#define X509DSAKEYFILE_FLAGS (X509KEYFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/** - * x509dsacertfile option description: - */ -/** Descriptive text for the x509dsacertfile option */ -#define X509DSACERTFILE_DESC (gnutls_serv_opt_strs+2437) -#define X509DSACERTFILE_NAME NULL -/** Unmodified name string for the x509dsacertfile option */ -#define X509DSACERTFILE_name (gnutls_serv_opt_strs+2489) -/** Compiled in flag settings for the x509dsacertfile option */ -#define X509DSACERTFILE_FLAGS (X509CERTFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/** - * x509ecckeyfile option description: - */ -/** Descriptive text for the x509ecckeyfile option */ -#define X509ECCKEYFILE_DESC (gnutls_serv_opt_strs+2371) -#define X509ECCKEYFILE_NAME NULL -/** Unmodified name string for the x509ecckeyfile option */ -#define X509ECCKEYFILE_name (gnutls_serv_opt_strs+2505) -/** Compiled in flag settings for the x509ecckeyfile option */ -#define X509ECCKEYFILE_FLAGS (X509KEYFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/** - * x509ecccertfile option description: - */ -/** Descriptive text for the x509ecccertfile option */ -#define X509ECCCERTFILE_DESC (gnutls_serv_opt_strs+2437) -#define X509ECCCERTFILE_NAME NULL -/** Unmodified name string for the x509ecccertfile option */ -#define X509ECCCERTFILE_name (gnutls_serv_opt_strs+2520) -/** Compiled in flag settings for the x509ecccertfile option */ -#define X509ECCCERTFILE_FLAGS (X509CERTFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) - -/** - * srppasswd option description: - */ -/** Descriptive text for the srppasswd option */ -#define SRPPASSWD_DESC (gnutls_serv_opt_strs+2536) -/** Upper-cased name for the srppasswd option */ -#define SRPPASSWD_NAME (gnutls_serv_opt_strs+2561) -/** Name string for the srppasswd option */ -#define SRPPASSWD_name (gnutls_serv_opt_strs+2571) -/** 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+2581) -/** Upper-cased name for the srppasswdconf option */ -#define SRPPASSWDCONF_NAME (gnutls_serv_opt_strs+2620) -/** Name string for the srppasswdconf option */ -#define SRPPASSWDCONF_name (gnutls_serv_opt_strs+2634) -/** 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+2648) -/** Upper-cased name for the pskpasswd option */ -#define PSKPASSWD_NAME (gnutls_serv_opt_strs+2673) -/** Name string for the pskpasswd option */ -#define PSKPASSWD_name (gnutls_serv_opt_strs+2683) -/** 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+2693) -/** Upper-cased name for the pskhint option */ -#define PSKHINT_NAME (gnutls_serv_opt_strs+2718) -/** Name string for the pskhint option */ -#define PSKHINT_name (gnutls_serv_opt_strs+2726) -/** 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+2734) -/** Upper-cased name for the ocsp-response option */ -#define OCSP_RESPONSE_NAME (gnutls_serv_opt_strs+2770) -/** Name string for the ocsp-response option */ -#define OCSP_RESPONSE_name (gnutls_serv_opt_strs+2784) -/** Compiled in flag settings for the ocsp-response option */ -#define OCSP_RESPONSE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * ignore-ocsp-response-errors option description: - */ -/** Descriptive text for the ignore-ocsp-response-errors option */ -#define IGNORE_OCSP_RESPONSE_ERRORS_DESC (gnutls_serv_opt_strs+2798) -/** Upper-cased name for the ignore-ocsp-response-errors option */ -#define IGNORE_OCSP_RESPONSE_ERRORS_NAME (gnutls_serv_opt_strs+2847) -/** Name string for the ignore-ocsp-response-errors option */ -#define IGNORE_OCSP_RESPONSE_ERRORS_name (gnutls_serv_opt_strs+2875) -/** Compiled in flag settings for the ignore-ocsp-response-errors option */ -#define IGNORE_OCSP_RESPONSE_ERRORS_FLAGS (OPTST_DISABLED) - -/** - * port option description: - */ -/** Descriptive text for the port option */ -#define PORT_DESC (gnutls_serv_opt_strs+2903) -/** Upper-cased name for the port option */ -#define PORT_NAME (gnutls_serv_opt_strs+2926) -/** Name string for the port option */ -#define PORT_name (gnutls_serv_opt_strs+2931) -/** 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+2936) -/** Upper-cased name for the list option */ -#define LIST_NAME (gnutls_serv_opt_strs+2987) -/** Name string for the list option */ -#define LIST_name (gnutls_serv_opt_strs+2992) -/** Compiled in flag settings for the list option */ -#define LIST_FLAGS (OPTST_DISABLED) - -/** - * provider option description: - */ -/** Descriptive text for the provider option */ -#define PROVIDER_DESC (gnutls_serv_opt_strs+2997) -/** Upper-cased name for the provider option */ -#define PROVIDER_NAME (gnutls_serv_opt_strs+3035) -/** Name string for the provider option */ -#define PROVIDER_name (gnutls_serv_opt_strs+3044) -/** Compiled in flag settings for the provider option */ -#define PROVIDER_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) - -/* - * Help/More_Help/Version option descriptions: - */ -#define HELP_DESC (gnutls_serv_opt_strs+3053) -#define HELP_name (gnutls_serv_opt_strs+3097) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (gnutls_serv_opt_strs+3102) -#define MORE_HELP_name (gnutls_serv_opt_strs+3147) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+3157) -#define VER_name (gnutls_serv_opt_strs+3193) -/** - * Declare option callback procedures - */ -extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption; -static tOptProc - doOptDebug, doOptDhparams, doOptMtu, - doOptPgpkeyfile, doOptProvider, doOptPskpasswd, - doOptSrppasswd, doOptSrppasswdconf, doOptX509crlfile, - doOptX509dsacertfile, doOptX509dsakeyfile, doOptX509ecccertfile, - doOptX509ecckeyfile, 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_SNI_HOSTNAME, - /* equiv idx, value */ 1, VALUE_OPT_SNI_HOSTNAME, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SNI_HOSTNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sni-hostname */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SNI_HOSTNAME_DESC, SNI_HOSTNAME_NAME, SNI_HOSTNAME_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 2, VALUE_OPT_SNI_HOSTNAME_FATAL, - /* equiv idx, value */ 2, VALUE_OPT_SNI_HOSTNAME_FATAL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ SNI_HOSTNAME_FATAL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --sni-hostname-fatal */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ SNI_HOSTNAME_FATAL_DESC, SNI_HOSTNAME_FATAL_NAME, SNI_HOSTNAME_FATAL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 3, VALUE_OPT_ALPN, - /* equiv idx, value */ 3, 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 */ 4, VALUE_OPT_ALPN_FATAL, - /* equiv idx, value */ 4, VALUE_OPT_ALPN_FATAL, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ ALPN_FATAL_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --alpn-fatal */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ ALPN_FATAL_DESC, ALPN_FATAL_NAME, ALPN_FATAL_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 5, VALUE_OPT_NOTICKET, - /* equiv idx, value */ 5, 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 */ 6, VALUE_OPT_EARLYDATA, - /* equiv idx, value */ 6, VALUE_OPT_EARLYDATA, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ EARLYDATA_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --earlydata */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ EARLYDATA_DESC, EARLYDATA_NAME, EARLYDATA_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 7, VALUE_OPT_NOCOOKIE, - /* equiv idx, value */ 7, VALUE_OPT_NOCOOKIE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ NOCOOKIE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --nocookie */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ NOCOOKIE_DESC, NOCOOKIE_NAME, NOCOOKIE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 8, VALUE_OPT_GENERATE, - /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_QUIET, - /* equiv idx, value */ 9, 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 */ 10, VALUE_OPT_NODB, - /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_HTTP, - /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_ECHO, - /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_UDP, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_MTU, - /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_SRTP_PROFILES, - /* equiv idx, value */ 15, 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 */ 16, VALUE_OPT_DISABLE_CLIENT_CERT, - /* equiv idx, value */ 16, 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, aDisable_Client_CertCantList, - /* 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 */ 17, VALUE_OPT_REQUIRE_CLIENT_CERT, - /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_VERIFY_CLIENT_CERT, - /* equiv idx, value */ 18, VALUE_OPT_VERIFY_CLIENT_CERT, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ VERIFY_CLIENT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --verify-client-cert */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ VERIFY_CLIENT_CERT_DESC, VERIFY_CLIENT_CERT_NAME, VERIFY_CLIENT_CERT_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 19, VALUE_OPT_HEARTBEAT, - /* equiv idx, value */ 19, 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 */ 20, VALUE_OPT_X509FMTDER, - /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_PRIORITY, - /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_DHPARAMS, - /* equiv idx, value */ 22, 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 */ 23, VALUE_OPT_X509CAFILE, - /* equiv idx, value */ 23, 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 */ 24, VALUE_OPT_X509CRLFILE, - /* equiv idx, value */ 24, 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 */ 25, VALUE_OPT_PGPKEYFILE, - /* equiv idx, value */ 25, 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 */ 26, VALUE_OPT_X509KEYFILE, - /* equiv idx, value */ 26, VALUE_OPT_X509KEYFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ X509KEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509keyfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionStackArg, - /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 27, VALUE_OPT_X509CERTFILE, - /* equiv idx, value */ 27, VALUE_OPT_X509CERTFILE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, - /* opt state flags */ X509CERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --x509certfile */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ optionStackArg, - /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 28, VALUE_OPT_X509DSAKEYFILE, - /* equiv idx, value */ 28, 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 */ doOptX509dsakeyfile, - /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, X509DSAKEYFILE_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 29, VALUE_OPT_X509DSACERTFILE, - /* equiv idx, value */ 29, 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 */ doOptX509dsacertfile, - /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, X509DSACERTFILE_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 30, VALUE_OPT_X509ECCKEYFILE, - /* equiv idx, value */ 30, 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 */ doOptX509ecckeyfile, - /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, X509ECCKEYFILE_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 31, VALUE_OPT_X509ECCCERTFILE, - /* equiv idx, value */ 31, 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 */ doOptX509ecccertfile, - /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, X509ECCCERTFILE_name, - /* disablement strs */ 0, 0 }, - - { /* entry idx, value */ 32, VALUE_OPT_SRPPASSWD, - /* equiv idx, value */ 32, 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 */ 33, VALUE_OPT_SRPPASSWDCONF, - /* equiv idx, value */ 33, 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 */ 34, VALUE_OPT_PSKPASSWD, - /* equiv idx, value */ 34, 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 */ 35, VALUE_OPT_PSKHINT, - /* equiv idx, value */ 35, 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 */ 36, VALUE_OPT_OCSP_RESPONSE, - /* equiv idx, value */ 36, VALUE_OPT_OCSP_RESPONSE, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 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 */ optionStackArg, - /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, OCSP_RESPONSE_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 37, VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS, - /* equiv idx, value */ 37, VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ IGNORE_OCSP_RESPONSE_ERRORS_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --ignore-ocsp-response-errors */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ IGNORE_OCSP_RESPONSE_ERRORS_DESC, IGNORE_OCSP_RESPONSE_ERRORS_NAME, IGNORE_OCSP_RESPONSE_ERRORS_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 38, VALUE_OPT_PORT, - /* equiv idx, value */ 38, 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 */ 39, VALUE_OPT_LIST, - /* equiv idx, value */ 39, 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 */ 40, VALUE_OPT_PROVIDER, - /* equiv idx, value */ 40, 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, 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+3201) -/** Reference to the title line for gnutls-serv usage. */ -#define zUsageTitle (gnutls_serv_opt_strs+3213) -/** 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+3299) -/** Clarification/explanation of what gnutls-serv does. */ -#define zExplain (gnutls_serv_opt_strs+3315) -/** Extra detail explaining what gnutls-serv does. */ -#define zDetail (gnutls_serv_opt_strs+3317) -/** The full version string for gnutls-serv. */ -#define zFullVersion (gnutls_serv_opt_strs+3375) -/* extracted from optcode.tlib near line 364 */ - -#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+3393) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = GNUTLS_SERV_EXIT_SUCCESS; - optionUsage(&gnutls_servOptions, ex_code); - /* NOTREACHED */ - exit(GNUTLS_SERV_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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, VOIDP(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 x509dsakeyfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptX509dsakeyfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509KEYFILE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509dsacertfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptX509dsacertfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509CERTFILE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509ecckeyfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptX509ecckeyfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509KEYFILE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the x509ecccertfile option. - * - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] pOptDesc the option descriptor for this option. - */ -static void -doOptX509ecccertfile(tOptions* pOptions, tOptDesc* pOptDesc) -{ - int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509CERTFILE); - if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) - USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); - -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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 provider option. - * This will override the default options in /etc/gnutls/pkcs11.conf - * @param[in] pOptions the gnutls-serv options data structure - * @param[in,out] 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 1250 */ - -/** - * 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 */ - }, - 44 /* full option count */, 41 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\n")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Server's hostname for server name extension")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Send fatal alert on sni-hostname mismatch")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Specify ALPN protocol to be enabled by the server")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Send fatal alert on non-matching ALPN name")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Don't accept session tickets")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Accept early data")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Don't require cookie on DTLS sessions")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("Generate Diffie-Hellman 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(_("If a client certificate is sent then verify it.")); - - /* 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 (deprecated)")); - - /* 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(_("an alias for the 'x509keyfile' option (deprecated)")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("an alias for the 'x509certfile' option (deprecated)")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("an alias for the 'x509keyfile' option (deprecated)")); - - /* referenced via gnutls_servOptions.pOptDesc->pzText */ - puts(_("an alias for the 'x509certfile' option (deprecated)")); - - /* 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(_("Ignore any errors when setting the OCSP response")); - - /* 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(_("Specify the PKCS #11 provider library")); - - /* 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\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 3.6.4")); - - /* referenced via gnutls_servOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via gnutls_servOptions.pzShortUsage */ - puts(_("Usage: gnutls-serv [options]\n\ -gnutls-serv --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../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.bak b/src/serv-args.h.bak deleted file mode 100644 index 2a8d7d0c89..0000000000 --- a/src/serv-args.h.bak +++ /dev/null @@ -1,297 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (serv-args.h) - * - * It has been AutoGen-ed - * From the definitions serv-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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_SNI_HOSTNAME = 1, - INDEX_OPT_SNI_HOSTNAME_FATAL = 2, - INDEX_OPT_ALPN = 3, - INDEX_OPT_ALPN_FATAL = 4, - INDEX_OPT_NOTICKET = 5, - INDEX_OPT_EARLYDATA = 6, - INDEX_OPT_NOCOOKIE = 7, - INDEX_OPT_GENERATE = 8, - INDEX_OPT_QUIET = 9, - INDEX_OPT_NODB = 10, - INDEX_OPT_HTTP = 11, - INDEX_OPT_ECHO = 12, - INDEX_OPT_UDP = 13, - INDEX_OPT_MTU = 14, - INDEX_OPT_SRTP_PROFILES = 15, - INDEX_OPT_DISABLE_CLIENT_CERT = 16, - INDEX_OPT_REQUIRE_CLIENT_CERT = 17, - INDEX_OPT_VERIFY_CLIENT_CERT = 18, - INDEX_OPT_HEARTBEAT = 19, - INDEX_OPT_X509FMTDER = 20, - INDEX_OPT_PRIORITY = 21, - INDEX_OPT_DHPARAMS = 22, - INDEX_OPT_X509CAFILE = 23, - INDEX_OPT_X509CRLFILE = 24, - INDEX_OPT_PGPKEYFILE = 25, - INDEX_OPT_X509KEYFILE = 26, - INDEX_OPT_X509CERTFILE = 27, - INDEX_OPT_X509DSAKEYFILE = 28, - INDEX_OPT_X509DSACERTFILE = 29, - INDEX_OPT_X509ECCKEYFILE = 30, - INDEX_OPT_X509ECCCERTFILE = 31, - INDEX_OPT_SRPPASSWD = 32, - INDEX_OPT_SRPPASSWDCONF = 33, - INDEX_OPT_PSKPASSWD = 34, - INDEX_OPT_PSKHINT = 35, - INDEX_OPT_OCSP_RESPONSE = 36, - INDEX_OPT_IGNORE_OCSP_RESPONSE_ERRORS = 37, - INDEX_OPT_PORT = 38, - INDEX_OPT_LIST = 39, - INDEX_OPT_PROVIDER = 40, - INDEX_OPT_VERSION = 41, - INDEX_OPT_HELP = 42, - INDEX_OPT_MORE_HELP = 43 -} teOptIndex; -/** count of all options for gnutls-serv */ -#define OPTION_CT 44 -/** gnutls-serv version */ -#define GNUTLS_SERV_VERSION "3.6.4" -/** Full gnutls-serv version text */ -#define GNUTLS_SERV_FULL_VERSION "gnutls-serv 3.6.4" - -/** - * 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_SNI_HOSTNAME 0x1001 -#define VALUE_OPT_SNI_HOSTNAME_FATAL 0x1002 -#define VALUE_OPT_ALPN 0x1003 -#define VALUE_OPT_ALPN_FATAL 0x1004 -#define VALUE_OPT_NOTICKET 0x1005 -#define VALUE_OPT_EARLYDATA 0x1006 -#define VALUE_OPT_NOCOOKIE 0x1007 -#define VALUE_OPT_GENERATE 'g' -#define VALUE_OPT_QUIET 'q' -#define VALUE_OPT_NODB 0x1008 -#define VALUE_OPT_HTTP 0x1009 -#define VALUE_OPT_ECHO 0x100A -#define VALUE_OPT_UDP 'u' -#define VALUE_OPT_MTU 0x100B - -#define OPT_VALUE_MTU (DESC(MTU).optArg.argInt) -#define VALUE_OPT_SRTP_PROFILES 0x100C -#define VALUE_OPT_DISABLE_CLIENT_CERT 'a' -#define VALUE_OPT_REQUIRE_CLIENT_CERT 'r' -#define VALUE_OPT_VERIFY_CLIENT_CERT 0x100D -#define VALUE_OPT_HEARTBEAT 'b' -#define VALUE_OPT_X509FMTDER 0x100E -#define VALUE_OPT_PRIORITY 0x100F -#define VALUE_OPT_DHPARAMS 0x1010 -#define VALUE_OPT_X509CAFILE 0x1011 -#define VALUE_OPT_X509CRLFILE 0x1012 -#define VALUE_OPT_PGPKEYFILE 0x1013 -#define VALUE_OPT_X509KEYFILE 0x1014 -#define VALUE_OPT_X509CERTFILE 0x1015 -#define VALUE_OPT_X509DSAKEYFILE 0x1016 -#define VALUE_OPT_X509DSACERTFILE 0x1017 -#define VALUE_OPT_X509ECCKEYFILE 0x1018 -#define VALUE_OPT_X509ECCCERTFILE 0x1019 -#define VALUE_OPT_SRPPASSWD 0x101A -#define VALUE_OPT_SRPPASSWDCONF 0x101B -#define VALUE_OPT_PSKPASSWD 0x101C -#define VALUE_OPT_PSKHINT 0x101D -#define VALUE_OPT_OCSP_RESPONSE 0x101E -#define VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS 0x101F -#define VALUE_OPT_PORT 'p' - -#define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) -#define VALUE_OPT_LIST 'l' -#define VALUE_OPT_PROVIDER 0x1020 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the gnutls-serv option descriptor. - */ -extern tOptions gnutls_servOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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.bak b/src/srptool-args.c.bak deleted file mode 100644 index ccf9686253..0000000000 --- a/src/srptool-args.c.bak +++ /dev/null @@ -1,1067 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (srptool-args.c) - * - * It has been AutoGen-ed - * From the definitions srptool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "srptool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (srptool_opt_strs+0) -#define zLicenseDescrip (srptool_opt_strs+282) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for srptool options - */ -static char const srptool_opt_strs[2023] = -/* 0 */ "srptool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 282 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 885 */ "Enable debugging\0" -/* 902 */ "DEBUG\0" -/* 908 */ "debug\0" -/* 914 */ "specify the index of the group parameters in tpasswd.conf to use\0" -/* 979 */ "INDEX\0" -/* 985 */ "index\0" -/* 991 */ "specify a username\0" -/* 1010 */ "USERNAME\0" -/* 1019 */ "username\0" -/* 1028 */ "specify a password file\0" -/* 1052 */ "PASSWD\0" -/* 1059 */ "passwd\0" -/* 1066 */ "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\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 1492 */ "bugs@gnutls.org\0" -/* 1508 */ "\n\0" -/* 1510 */ "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" -/* 1951 */ "srptool 3.6.4\0" -/* 1965 */ "srptool [options]\n" - "srptool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (srptool_opt_strs+885) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (srptool_opt_strs+902) -/** Name string for the debug option */ -#define DEBUG_name (srptool_opt_strs+908) -/** Compiled in flag settings for the debug option */ -#define DEBUG_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * index option description: - */ -/** Descriptive text for the index option */ -#define INDEX_DESC (srptool_opt_strs+914) -/** Upper-cased name for the index option */ -#define INDEX_NAME (srptool_opt_strs+979) -/** Name string for the index option */ -#define INDEX_name (srptool_opt_strs+985) -/** The compiled in default value for the index option argument */ -#define INDEX_DFT_ARG ((char const*)3) -/** Compiled in flag settings for the index option */ -#define INDEX_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * username option description: - */ -/** Descriptive text for the username option */ -#define USERNAME_DESC (srptool_opt_strs+991) -/** Upper-cased name for the username option */ -#define USERNAME_NAME (srptool_opt_strs+1010) -/** Name string for the username option */ -#define USERNAME_name (srptool_opt_strs+1019) -/** 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 (srptool_opt_strs+1028) -/** Upper-cased name for the passwd option */ -#define PASSWD_NAME (srptool_opt_strs+1052) -/** Name string for the passwd option */ -#define PASSWD_name (srptool_opt_strs+1059) -/** Compiled in flag settings for the passwd option */ -#define PASSWD_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * salt option description: - */ -/** Descriptive text for the salt option */ -#define SALT_DESC (srptool_opt_strs+1066) -/** Upper-cased name for the salt option */ -#define SALT_NAME (srptool_opt_strs+1084) -/** Name string for the salt option */ -#define SALT_name (srptool_opt_strs+1089) -/** Compiled in flag settings for the salt option */ -#define SALT_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) - -/** - * verify option description: - */ -/** Descriptive text for the verify option */ -#define VERIFY_DESC (srptool_opt_strs+1094) -/** Upper-cased name for the verify option */ -#define VERIFY_NAME (srptool_opt_strs+1120) -/** Name string for the verify option */ -#define VERIFY_name (srptool_opt_strs+1127) -/** Compiled in flag settings for the verify option */ -#define VERIFY_FLAGS (OPTST_DISABLED) - -/** - * passwd-conf option description: - */ -/** Descriptive text for the passwd-conf option */ -#define PASSWD_CONF_DESC (srptool_opt_strs+1134) -/** Upper-cased name for the passwd-conf option */ -#define PASSWD_CONF_NAME (srptool_opt_strs+1164) -/** Name string for the passwd-conf option */ -#define PASSWD_CONF_name (srptool_opt_strs+1176) -/** Compiled in flag settings for the passwd-conf option */ -#define PASSWD_CONF_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * create-conf option description: - */ -/** Descriptive text for the create-conf option */ -#define CREATE_CONF_DESC (srptool_opt_strs+1188) -/** Upper-cased name for the create-conf option */ -#define CREATE_CONF_NAME (srptool_opt_strs+1228) -/** Name string for the create-conf option */ -#define CREATE_CONF_name (srptool_opt_strs+1240) -/** Compiled in flag settings for the create-conf option */ -#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 HELP_DESC -#define MORE_HELP_name HELP_name -#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, 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 srptool. */ -#define zPROGNAME (srptool_opt_strs+1400) -/** Reference to the title line for srptool usage. */ -#define zUsageTitle (srptool_opt_strs+1408) -/** There is no srptool configuration file. */ -#define zRcName NULL -/** There are no directories to search for srptool config files. */ -#define apzHomeList NULL -/** The srptool program bug email address. */ -#define zBugsAddr (srptool_opt_strs+1492) -/** Clarification/explanation of what srptool does. */ -#define zExplain (srptool_opt_strs+1508) -/** Extra detail explaining what srptool does. */ -#define zDetail (srptool_opt_strs+1510) -/** The full version string for srptool. */ -#define zFullVersion (srptool_opt_strs+1951) -/* extracted from optcode.tlib near line 364 */ - -#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+1965) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = SRPTOOL_EXIT_SUCCESS; - optionUsage(&srptoolOptions, ex_code); - /* NOTREACHED */ - exit(SRPTOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the srptool 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, VOIDP(rng), 1); -} -/* extracted from optmain.tlib near line 1250 */ - -/** - * 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 -/** Packager information for srptool. */ -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 -/** - * This code is designed to translate translatable option text for the - * srptool program. These translations happen upon entry - * to optionProcess(). - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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. - */ - char ** ppz = (char**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 srptoolOptions structure noted in the - comments below. The literal text is defined in srptool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - srptool_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 srptoolOptions.pzCopyright */ - puts(_("srptool 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n")); - - /* referenced via srptoolOptions.pzCopyNotice */ - puts(_("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")); - puts(_("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")); - puts(_("You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see <http://www.gnu.org/licenses/>.\n")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("specify the index of the group parameters in tpasswd.conf to use")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("specify a username")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("specify a password file")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("specify salt size")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("just verify the password.")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("specify a password conf file.")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("Generate a password configuration file.")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via srptoolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via srptoolOptions.pzUsageTitle */ - puts(_("srptool - GnuTLS SRP tool\n\ -Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); - - /* referenced via srptoolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via srptoolOptions.pzDetail */ - puts(_("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")); - puts(_("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")); - - /* referenced via srptoolOptions.pzFullVersion */ - puts(_("srptool 3.6.4")); - - /* referenced via srptoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via srptoolOptions.pzShortUsage */ - puts(_("srptool [options]\n\ -srptool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* srptool-args.c ends here */ diff --git a/src/srptool-args.h.bak b/src/srptool-args.h.bak deleted file mode 100644 index 081150a615..0000000000 --- a/src/srptool-args.h.bak +++ /dev/null @@ -1,231 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (srptool-args.h) - * - * It has been AutoGen-ed - * From the definitions srptool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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 srptool - */ -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; -/** count of all options for srptool */ -#define OPTION_CT 11 -/** srptool version */ -#define SRPTOOL_VERSION "3.6.4" -/** Full srptool version text */ -#define SRPTOOL_FULL_VERSION "srptool 3.6.4" - -/** - * 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]) -/** '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 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 0x1001 -#define VALUE_OPT_PASSWD_CONF 'v' -#define VALUE_OPT_CREATE_CONF 0x1002 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value option */ -#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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the srptool option descriptor. - */ -extern tOptions srptoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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/systemkey-args.c.bak b/src/systemkey-args.c.bak deleted file mode 100644 index 784017a946..0000000000 --- a/src/systemkey-args.c.bak +++ /dev/null @@ -1,1058 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (systemkey-args.c) - * - * It has been AutoGen-ed - * From the definitions systemkey-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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 systemkey-tool 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 systemkey-tool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * systemkey-tool 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. - * - * systemkey-tool 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "systemkey-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (systemkey_tool_opt_strs+0) -#define zLicenseDescrip (systemkey_tool_opt_strs+289) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for systemkey-tool options - */ -static char const systemkey_tool_opt_strs[1628] = -/* 0 */ "systemkey-tool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 289 */ "systemkey-tool 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" - "systemkey-tool 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 <http://www.gnu.org/licenses/>.\n\0" -/* 906 */ "Enable debugging\0" -/* 923 */ "DEBUG\0" -/* 929 */ "debug\0" -/* 935 */ "Input file\0" -/* 946 */ "INFILE\0" -/* 953 */ "infile\0" -/* 960 */ "Output file\0" -/* 972 */ "OUTFILE\0" -/* 980 */ "outfile\0" -/* 988 */ "Lists all stored keys.\0" -/* 1011 */ "LIST\0" -/* 1016 */ "list\0" -/* 1021 */ "Delete the key identified by the given URL.\0" -/* 1065 */ "DELETE\0" -/* 1072 */ "delete\0" -/* 1079 */ "Use the DER format for keys.\0" -/* 1108 */ "INDER\0" -/* 1114 */ "no-inder\0" -/* 1123 */ "no\0" -/* 1126 */ "Use DER format for output keys\0" -/* 1157 */ "OUTDER\0" -/* 1164 */ "no-outder\0" -/* 1174 */ "display extended usage information and exit\0" -/* 1218 */ "help\0" -/* 1223 */ "extended usage information passed thru pager\0" -/* 1268 */ "more-help\0" -/* 1278 */ "output version information and exit\0" -/* 1314 */ "version\0" -/* 1322 */ "SYSTEMKEY_TOOL\0" -/* 1337 */ "systemkey-tool - GnuTLS system key tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 1435 */ "bugs@gnutls.org\0" -/* 1451 */ "\n\0" -/* 1453 */ "Program that allows handling user keys as stored in the system in a uniform\n" - "way.\n\0" -/* 1535 */ "systemkey-tool 3.6.4\0" -/* 1556 */ "systemkey-tool [options]\n" - "systemkey-tool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (systemkey_tool_opt_strs+906) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (systemkey_tool_opt_strs+923) -/** Name string for the debug option */ -#define DEBUG_name (systemkey_tool_opt_strs+929) -/** 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 (systemkey_tool_opt_strs+935) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (systemkey_tool_opt_strs+946) -/** Name string for the infile option */ -#define INFILE_name (systemkey_tool_opt_strs+953) -/** 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 (systemkey_tool_opt_strs+960) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (systemkey_tool_opt_strs+972) -/** Name string for the outfile option */ -#define OUTFILE_name (systemkey_tool_opt_strs+980) -/** Compiled in flag settings for the outfile option */ -#define OUTFILE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * list option description: - */ -/** Descriptive text for the list option */ -#define LIST_DESC (systemkey_tool_opt_strs+988) -/** Upper-cased name for the list option */ -#define LIST_NAME (systemkey_tool_opt_strs+1011) -/** Name string for the list option */ -#define LIST_name (systemkey_tool_opt_strs+1016) -/** 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 (systemkey_tool_opt_strs+1021) -/** Upper-cased name for the delete option */ -#define DELETE_NAME (systemkey_tool_opt_strs+1065) -/** Name string for the delete option */ -#define DELETE_name (systemkey_tool_opt_strs+1072) -/** Compiled in flag settings for the delete option */ -#define DELETE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * inder option description: - */ -/** Descriptive text for the inder option */ -#define INDER_DESC (systemkey_tool_opt_strs+1079) -/** Upper-cased name for the inder option */ -#define INDER_NAME (systemkey_tool_opt_strs+1108) -/** disablement name for the inder option */ -#define NOT_INDER_name (systemkey_tool_opt_strs+1114) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (systemkey_tool_opt_strs+1123) -/** 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 (systemkey_tool_opt_strs+1126) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (systemkey_tool_opt_strs+1157) -/** disablement name for the outder option */ -#define NOT_OUTDER_name (systemkey_tool_opt_strs+1164) -/** disablement prefix for the outder option */ -#define NOT_OUTDER_PFX (systemkey_tool_opt_strs+1123) -/** 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 (systemkey_tool_opt_strs+1174) -#define HELP_name (systemkey_tool_opt_strs+1218) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (systemkey_tool_opt_strs+1223) -#define MORE_HELP_name (systemkey_tool_opt_strs+1268) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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 (systemkey_tool_opt_strs+1278) -#define VER_name (systemkey_tool_opt_strs+1314) -/** - * 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 systemkey-tool Option Descriptions. - * This is an array of OPTION_CT entries, one for each - * option that the systemkey-tool 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_LIST, - /* equiv idx, value */ 3, 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 */ 4, VALUE_OPT_DELETE, - /* equiv idx, value */ 4, 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 */ 5, VALUE_OPT_INDER, - /* equiv idx, value */ 5, 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 */ 6, VALUE_OPT_OUTDER, - /* equiv idx, value */ 6, 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 systemkey-tool. */ -#define zPROGNAME (systemkey_tool_opt_strs+1322) -/** Reference to the title line for systemkey-tool usage. */ -#define zUsageTitle (systemkey_tool_opt_strs+1337) -/** There is no systemkey-tool configuration file. */ -#define zRcName NULL -/** There are no directories to search for systemkey-tool config files. */ -#define apzHomeList NULL -/** The systemkey-tool program bug email address. */ -#define zBugsAddr (systemkey_tool_opt_strs+1435) -/** Clarification/explanation of what systemkey-tool does. */ -#define zExplain (systemkey_tool_opt_strs+1451) -/** Extra detail explaining what systemkey-tool does. */ -#define zDetail (systemkey_tool_opt_strs+1453) -/** The full version string for systemkey-tool. */ -#define zFullVersion (systemkey_tool_opt_strs+1535) -/* extracted from optcode.tlib near line 364 */ - -#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 systemkey_tool_full_usage (NULL) -#define systemkey_tool_short_usage (systemkey_tool_opt_strs+1556) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = SYSTEMKEY_TOOL_EXIT_SUCCESS; - optionUsage(&systemkey_toolOptions, ex_code); - /* NOTREACHED */ - exit(SYSTEMKEY_TOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the debug option. - * Specifies the debug level. - * @param[in] pOptions the systemkey-tool 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, VOIDP(rng), 1); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * Code to handle the infile option. - * - * @param[in] pOptions the systemkey-tool 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 1250 */ - -/** - * The directory containing the data associated with systemkey-tool. - */ -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -/** - * Information about the person or institution that packaged systemkey-tool - * for the current distribution. - */ -#ifndef WITH_PACKAGER -# define systemkey_tool_packager_info NULL -#else -/** Packager information for systemkey-tool. */ -static char const systemkey_tool_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif - -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport systemkey_tool bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif -#ifndef __doxygen__ - -#endif /* __doxygen__ */ -/** - * The option definitions for systemkey-tool. The one structure that - * binds them all. - */ -tOptions systemkey_toolOptions = { - 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 */ - }, - 10 /* full option count */, 7 /* user option count */, - systemkey_tool_full_usage, systemkey_tool_short_usage, - NULL, NULL, - PKGDATADIR, systemkey_tool_packager_info -}; - -#if ENABLE_NLS -/** - * This code is designed to translate translatable option text for the - * systemkey-tool program. These translations happen upon entry - * to optionProcess(). - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(pz)); -#endif - if (res == pz) - return res; - res = strdup(res); - if (res == NULL) { - fputs(_("No memory for duping translated strings\n"), stderr); - exit(SYSTEMKEY_TOOL_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 systemkey_toolOptions - * structure defined above. This is done only once. - */ -static void -translate_option_strings(void) -{ - tOptions * const opts = &systemkey_toolOptions; - - /* - * 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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 systemkey_toolOptions structure noted in the - comments below. The literal text is defined in systemkey_tool_opt_strs. - - NOTE: the strings below are segmented with respect to the source string - systemkey_tool_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 systemkey_toolOptions.pzCopyright */ - puts(_("systemkey-tool 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n")); - - /* referenced via systemkey_toolOptions.pzCopyNotice */ - puts(_("systemkey-tool 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(_("systemkey-tool 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 <http://www.gnu.org/licenses/>.\n")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Enable debugging")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Input file")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Output file")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Lists all stored keys.")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Delete the key identified by the given URL.")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Use the DER format for keys.")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("Use DER format for output keys")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("display extended usage information and exit")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("extended usage information passed thru pager")); - - /* referenced via systemkey_toolOptions.pOptDesc->pzText */ - puts(_("output version information and exit")); - - /* referenced via systemkey_toolOptions.pzUsageTitle */ - puts(_("systemkey-tool - GnuTLS system key tool\n\ -Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); - - /* referenced via systemkey_toolOptions.pzExplain */ - puts(_("\n")); - - /* referenced via systemkey_toolOptions.pzDetail */ - puts(_("Program that allows handling user keys as stored in the system in a uniform\n\ -way.\n")); - - /* referenced via systemkey_toolOptions.pzFullVersion */ - puts(_("systemkey-tool 3.6.4")); - - /* referenced via systemkey_toolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via systemkey_toolOptions.pzShortUsage */ - puts(_("systemkey-tool [options]\n\ -systemkey-tool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../usage.c" - puts(_("These additional options are:")); - /* END-USAGE-TEXT */ -} -#endif /* uncompilable code */ -#ifdef __cplusplus -} -#endif -/* systemkey-args.c ends here */ diff --git a/src/systemkey-args.h.bak b/src/systemkey-args.h.bak deleted file mode 100644 index 4678fca678..0000000000 --- a/src/systemkey-args.h.bak +++ /dev/null @@ -1,225 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (systemkey-args.h) - * - * It has been AutoGen-ed - * From the definitions systemkey-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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 systemkey-tool 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 systemkey-tool program is copyrighted and licensed - * under the following terms: - * - * Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * systemkey-tool 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. - * - * systemkey-tool 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 <http://www.gnu.org/licenses/>. - */ -/** - * This file contains the programmatic interface to the Automated - * Options generated for the systemkey-tool program. - * These macros are documented in the AutoGen info file in the - * "AutoOpts" chapter. Please refer to that doc for usage help. - */ -#ifndef AUTOOPTS_SYSTEMKEY_ARGS_H_GUARD -#define AUTOOPTS_SYSTEMKEY_ARGS_H_GUARD 1 -#include "config.h" -#include <autoopts/options.h> - -/** - * 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 167937 -#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 systemkey-tool - */ -typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_INFILE = 1, - INDEX_OPT_OUTFILE = 2, - INDEX_OPT_LIST = 3, - INDEX_OPT_DELETE = 4, - INDEX_OPT_INDER = 5, - INDEX_OPT_OUTDER = 6, - INDEX_OPT_VERSION = 7, - INDEX_OPT_HELP = 8, - INDEX_OPT_MORE_HELP = 9 -} teOptIndex; -/** count of all options for systemkey-tool */ -#define OPTION_CT 10 -/** systemkey-tool version */ -#define SYSTEMKEY_TOOL_VERSION "3.6.4" -/** Full systemkey-tool version text */ -#define SYSTEMKEY_TOOL_FULL_VERSION "systemkey-tool 3.6.4" - -/** - * 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) (systemkey_toolOptions.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 systemkey-tool exit codes - */ -typedef enum { - SYSTEMKEY_TOOL_EXIT_SUCCESS = 0, - SYSTEMKEY_TOOL_EXIT_FAILURE = 1, - SYSTEMKEY_TOOL_EXIT_USAGE_ERROR = 64, - SYSTEMKEY_TOOL_EXIT_LIBOPTS_FAILURE = 70 -} systemkey_tool_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 0x1001 -#define VALUE_OPT_OUTFILE 0x1002 -#define VALUE_OPT_LIST 0x1003 -#define VALUE_OPT_DELETE 0x1004 -#define VALUE_OPT_INDER 0x1005 -#define VALUE_OPT_OUTDER 0x1006 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value option */ -#define VALUE_OPT_VERSION 'v' -/* - * Interface defines not associated with particular options - */ -#define ERRSKIP_OPTERR STMTS(systemkey_toolOptions.fOptSet &= ~OPTPROC_ERRSTOP) -#define ERRSTOP_OPTERR STMTS(systemkey_toolOptions.fOptSet |= OPTPROC_ERRSTOP) -#define RESTART_OPT(n) STMTS( \ - systemkey_toolOptions.curOptIdx = (n); \ - systemkey_toolOptions.pzCurOpt = NULL ) -#define START_OPT RESTART_OPT(1) -#define USAGE(c) (*systemkey_toolOptions.pUsageProc)(&systemkey_toolOptions, c) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the systemkey-tool option descriptor. - */ -extern tOptions systemkey_toolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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(systemkey_toolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT_CFG;) -# define OPT_NO_XLAT_OPT_NAMES STMTS(systemkey_toolOptions.fOptSet |= \ - OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) - -# define OPT_XLAT_CFG_NAMES STMTS(systemkey_toolOptions.fOptSet &= \ - ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) -# define OPT_XLAT_OPT_NAMES STMTS(systemkey_toolOptions.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_SYSTEMKEY_ARGS_H_GUARD */ - -/* systemkey-args.h ends here */ diff --git a/src/tpmtool-args.c.bak b/src/tpmtool-args.c.bak deleted file mode 100644 index 07a45acdfb..0000000000 --- a/src/tpmtool-args.c.bak +++ /dev/null @@ -1,1392 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (tpmtool-args.c) - * - * It has been AutoGen-ed - * From the definitions tpmtool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#ifndef __doxygen__ -#define OPTION_CODE_COMPILE 1 -#include "tpmtool-args.h" -#include <sys/types.h> - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#ifdef __cplusplus -extern "C" { -#endif -extern FILE * option_usage_fp; -#define zCopyright (tpmtool_opt_strs+0) -#define zLicenseDescrip (tpmtool_opt_strs+282) - - -#ifndef NULL -# define NULL 0 -#endif - -/** - * static const strings for tpmtool options - */ -static char const tpmtool_opt_strs[2177] = -/* 0 */ "tpmtool 3.6.4\n" - "Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\n\0" -/* 282 */ "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 <http://www.gnu.org/licenses/>.\n\0" -/* 885 */ "Enable debugging\0" -/* 902 */ "DEBUG\0" -/* 908 */ "debug\0" -/* 914 */ "Input file\0" -/* 925 */ "INFILE\0" -/* 932 */ "infile\0" -/* 939 */ "Output file\0" -/* 951 */ "OUTFILE\0" -/* 959 */ "outfile\0" -/* 967 */ "Generate an RSA private-public key pair\0" -/* 1007 */ "GENERATE_RSA\0" -/* 1020 */ "generate-rsa\0" -/* 1033 */ "Any generated key will be registered in the TPM\0" -/* 1081 */ "REGISTER\0" -/* 1090 */ "register\0" -/* 1099 */ "Any generated key will be a signing key\0" -/* 1139 */ "SIGNING\0" -/* 1147 */ "signing\0" -/* 1155 */ "Any generated key will be a legacy key\0" -/* 1194 */ "LEGACY\0" -/* 1201 */ "legacy\0" -/* 1208 */ "Any registered key will be a user key\0" -/* 1246 */ "USER\0" -/* 1251 */ "user\0" -/* 1256 */ "Any registered key will be a system key\0" -/* 1296 */ "SYSTEM\0" -/* 1303 */ "system\0" -/* 1310 */ "Prints the public key of the provided key\0" -/* 1352 */ "PUBKEY\0" -/* 1359 */ "pubkey\0" -/* 1366 */ "Lists all stored keys in the TPM\0" -/* 1399 */ "LIST\0" -/* 1404 */ "list\0" -/* 1409 */ "Delete the key identified by the given URL (UUID).\0" -/* 1460 */ "DELETE\0" -/* 1467 */ "delete\0" -/* 1474 */ "Tests the signature operation of the provided object\0" -/* 1527 */ "TEST_SIGN\0" -/* 1537 */ "test-sign\0" -/* 1547 */ "Specify the security level [low, legacy, medium, high, ultra].\0" -/* 1610 */ "SEC_PARAM\0" -/* 1620 */ "sec-param\0" -/* 1630 */ "Specify the number of bits for key generate\0" -/* 1674 */ "BITS\0" -/* 1679 */ "bits\0" -/* 1684 */ "Use the DER format for keys.\0" -/* 1713 */ "INDER\0" -/* 1719 */ "no-inder\0" -/* 1728 */ "no\0" -/* 1731 */ "Use DER format for output keys\0" -/* 1762 */ "OUTDER\0" -/* 1769 */ "no-outder\0" -/* 1779 */ "display extended usage information and exit\0" -/* 1823 */ "help\0" -/* 1828 */ "extended usage information passed thru pager\0" -/* 1873 */ "more-help\0" -/* 1883 */ "output version information and exit\0" -/* 1919 */ "version\0" -/* 1927 */ "TPMTOOL\0" -/* 1935 */ "tpmtool - GnuTLS TPM tool\n" - "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 2019 */ "bugs@gnutls.org\0" -/* 2035 */ "\n\0" -/* 2037 */ "Program that allows handling cryptographic data from the TPM chip.\n\0" -/* 2105 */ "tpmtool 3.6.4\0" -/* 2119 */ "tpmtool [options]\n" - "tpmtool --help for usage instructions.\n"; - -/** - * debug option description: - */ -/** Descriptive text for the debug option */ -#define DEBUG_DESC (tpmtool_opt_strs+885) -/** Upper-cased name for the debug option */ -#define DEBUG_NAME (tpmtool_opt_strs+902) -/** Name string for the debug option */ -#define DEBUG_name (tpmtool_opt_strs+908) -/** 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+914) -/** Upper-cased name for the infile option */ -#define INFILE_NAME (tpmtool_opt_strs+925) -/** Name string for the infile option */ -#define INFILE_name (tpmtool_opt_strs+932) -/** 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+939) -/** Upper-cased name for the outfile option */ -#define OUTFILE_NAME (tpmtool_opt_strs+951) -/** Name string for the outfile option */ -#define OUTFILE_name (tpmtool_opt_strs+959) -/** 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+967) -/** Upper-cased name for the generate-rsa option */ -#define GENERATE_RSA_NAME (tpmtool_opt_strs+1007) -/** Name string for the generate-rsa option */ -#define GENERATE_RSA_name (tpmtool_opt_strs+1020) -/** 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+1033) -/** Upper-cased name for the register option */ -#define REGISTER_NAME (tpmtool_opt_strs+1081) -/** Name string for the register option */ -#define REGISTER_name (tpmtool_opt_strs+1090) -/** 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+1099) -/** Upper-cased name for the signing option */ -#define SIGNING_NAME (tpmtool_opt_strs+1139) -/** Name string for the signing option */ -#define SIGNING_name (tpmtool_opt_strs+1147) -/** 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+1155) -/** Upper-cased name for the legacy option */ -#define LEGACY_NAME (tpmtool_opt_strs+1194) -/** Name string for the legacy option */ -#define LEGACY_name (tpmtool_opt_strs+1201) -/** 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+1208) -/** Upper-cased name for the user option */ -#define USER_NAME (tpmtool_opt_strs+1246) -/** Name string for the user option */ -#define USER_name (tpmtool_opt_strs+1251) -/** 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+1256) -/** Upper-cased name for the system option */ -#define SYSTEM_NAME (tpmtool_opt_strs+1296) -/** Name string for the system option */ -#define SYSTEM_name (tpmtool_opt_strs+1303) -/** 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+1310) -/** Upper-cased name for the pubkey option */ -#define PUBKEY_NAME (tpmtool_opt_strs+1352) -/** Name string for the pubkey option */ -#define PUBKEY_name (tpmtool_opt_strs+1359) -/** 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+1366) -/** Upper-cased name for the list option */ -#define LIST_NAME (tpmtool_opt_strs+1399) -/** Name string for the list option */ -#define LIST_name (tpmtool_opt_strs+1404) -/** 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+1409) -/** Upper-cased name for the delete option */ -#define DELETE_NAME (tpmtool_opt_strs+1460) -/** Name string for the delete option */ -#define DELETE_name (tpmtool_opt_strs+1467) -/** Compiled in flag settings for the delete option */ -#define DELETE_FLAGS (OPTST_DISABLED \ - | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) - -/** - * test-sign option description: - */ -/** Descriptive text for the test-sign option */ -#define TEST_SIGN_DESC (tpmtool_opt_strs+1474) -/** Upper-cased name for the test-sign option */ -#define TEST_SIGN_NAME (tpmtool_opt_strs+1527) -/** Name string for the test-sign option */ -#define TEST_SIGN_name (tpmtool_opt_strs+1537) -/** Compiled in flag settings for the test-sign option */ -#define TEST_SIGN_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+1547) -/** Upper-cased name for the sec-param option */ -#define SEC_PARAM_NAME (tpmtool_opt_strs+1610) -/** Name string for the sec-param option */ -#define SEC_PARAM_name (tpmtool_opt_strs+1620) -/** 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+1630) -/** Upper-cased name for the bits option */ -#define BITS_NAME (tpmtool_opt_strs+1674) -/** Name string for the bits option */ -#define BITS_name (tpmtool_opt_strs+1679) -/** 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+1684) -/** Upper-cased name for the inder option */ -#define INDER_NAME (tpmtool_opt_strs+1713) -/** disablement name for the inder option */ -#define NOT_INDER_name (tpmtool_opt_strs+1719) -/** disablement prefix for the inder option */ -#define NOT_INDER_PFX (tpmtool_opt_strs+1728) -/** 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+1731) -/** Upper-cased name for the outder option */ -#define OUTDER_NAME (tpmtool_opt_strs+1762) -/** disablement name for the outder option */ -#define NOT_OUTDER_name (tpmtool_opt_strs+1769) -/** disablement prefix for the outder option */ -#define NOT_OUTDER_PFX (tpmtool_opt_strs+1728) -/** 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+1779) -#define HELP_name (tpmtool_opt_strs+1823) -#ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (tpmtool_opt_strs+1828) -#define MORE_HELP_name (tpmtool_opt_strs+1873) -#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -#else -#define MORE_HELP_DESC HELP_DESC -#define MORE_HELP_name HELP_name -#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+1883) -#define VER_name (tpmtool_opt_strs+1919) -/** - * 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_TEST_SIGN, - /* equiv idx, value */ 12, VALUE_OPT_TEST_SIGN, - /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ TEST_SIGN_FLAGS, 0, - /* last opt argumnt */ { NULL }, /* --test-sign */ - /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, - /* option proc */ NULL, - /* desc, NAME, name */ TEST_SIGN_DESC, TEST_SIGN_NAME, TEST_SIGN_name, - /* disablement strs */ NULL, NULL }, - - { /* entry idx, value */ 13, VALUE_OPT_SEC_PARAM, - /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_BITS, - /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_INDER, - /* equiv idx, value */ 15, 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 */ 16, VALUE_OPT_OUTDER, - /* equiv idx, value */ 16, 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+1927) -/** Reference to the title line for tpmtool usage. */ -#define zUsageTitle (tpmtool_opt_strs+1935) -/** 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+2019) -/** Clarification/explanation of what tpmtool does. */ -#define zExplain (tpmtool_opt_strs+2035) -/** Extra detail explaining what tpmtool does. */ -#define zDetail (tpmtool_opt_strs+2037) -/** The full version string for tpmtool. */ -#define zFullVersion (tpmtool_opt_strs+2105) -/* extracted from optcode.tlib near line 364 */ - -#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+2119) - -#endif /* not defined __doxygen__ */ - -/* - * Create the static procedure(s) declared above. - */ -/** - * The callout function that invokes the optionUsage function. - * - * @param[in] opts the AutoOpts option description structure - * @param[in] od the descriptor for the "help" (usage) option. - * @noreturn - */ -static void -doUsageOpt(tOptions * opts, tOptDesc * od) -{ - int ex_code; - ex_code = TPMTOOL_EXIT_SUCCESS; - optionUsage(&tpmtoolOptions, ex_code); - /* NOTREACHED */ - exit(TPMTOOL_EXIT_FAILURE); - (void)opts; - (void)od; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** - * 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, VOIDP(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 1250 */ - -/** - * 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 */ - }, - 20 /* full option count */, 17 /* 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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#ifdef HAVE_DCGETTEXT -# include <gettext.h> -#endif -#include <autoopts/usage-txt.h> - -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 *)VOIDP(_(pz)); - } else - res = (char *)VOIDP(_(pz)); -#else - res = (char *)VOIDP(_(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**)VOIDP(&(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(VOIDP(&(opts->pzCopyright))); - coerce_it(VOIDP(&(opts->pzCopyNotice))); - coerce_it(VOIDP(&(opts->pzFullVersion))); - coerce_it(VOIDP(&(opts->pzUsageTitle))); - coerce_it(VOIDP(&(opts->pzExplain))); - coerce_it(VOIDP(&(opts->pzDetail))); - { - tOptDesc * od = opts->pOptDesc; - for (ix = opts->optCt; ix > 0; ix--, od++) - coerce_it(VOIDP(&(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 3.6.4\n\ -Copyright (C) 2000-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html>\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 <http://www.gnu.org/licenses/>.\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 registered 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(_("Tests the signature operation of the provided object")); - - /* referenced via tpmtoolOptions.pOptDesc->pzText */ - puts(_("Specify the security level [low, legacy, medium, 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 [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\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 3.6.4")); - - /* referenced via tpmtoolOptions.pzFullUsage */ - puts(_("<<<NOT-FOUND>>>")); - - /* referenced via tpmtoolOptions.pzShortUsage */ - puts(_("tpmtool [options]\n\ -tpmtool --help for usage instructions.\n")); - /* LIBOPTS-MESSAGES: */ -#line 67 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" - puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" - puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" - puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" - puts(_("Automated Options Processing Error!\n" - "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" - puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" - puts(_("\tThis is less than the minimum library version: ")); -#line 121 "../version.c" - puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" - puts(_("(AutoOpts bug): %s.\n")); -#line 90 "../reset.c" - puts(_("optionResetOpt() called, but reset-option not configured")); -#line 295 "../usage.c" - puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" - puts(_("optionProcess() was called with invalid data")); -#line 751 "../usage.c" - puts(_("invalid argument type specified")); -#line 598 "../find.c" - puts(_("defaulted to option with optional arg")); -#line 76 "../alias.c" - puts(_("aliasing option is out of range.")); -#line 235 "../enum.c" - puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" - puts(_(" The following options match:\n")); -#line 293 "../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 94 "../makeshell.c" - puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../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 217 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" - puts(_("%s: The '%s' option has been disabled.")); -#line 38 "../alias.c" - puts(_("-equivalence")); -#line 469 "../find.c" - puts(_("%s: illegal option -- %c\n")); -#line 110 "../reset.c" - puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" - puts(_("%s: illegal option -- %s\n")); -#line 118 "../reset.c" - puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" - puts(_("%s: unknown vendor extension option -- %s\n")); -#line 160 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 170 "../enum.c" - puts(_(" or an integer from %d through %d\n")); -#line 750 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 1084 "../usage.c" - puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" - puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" - puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../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 632 "../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 536 "../save.c" - puts(_("error %d (%s) creating %s\n")); -#line 235 "../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 186 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 239 "../save.c" - puts(_("error %d (%s) stat-ing %s\n")); -#line 143 "../restore.c" - puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" - puts(_("'%s' is not a command line option.\n")); -#line 113 "../time.c" - puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 131 "../save.c" - puts(_("'%s' not defined\n")); -#line 50 "../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 165 "../numeric.c" - puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 201 "../enum.c" - puts(_("%s error: %s exceeds %s keyword count\n")); -#line 333 "../usage.c" - puts(_("Try '%s %s' for more information.\n")); -#line 45 "../alias.c" - puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" - puts(_("standard output")); -#line 943 "../makeshell.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard output")); -#line 418 "../usage.c" - puts(_("standard output")); -#line 628 "../usage.c" - puts(_("standard output")); -#line 175 "../version.c" - puts(_("standard output")); -#line 277 "../usage.c" - puts(_("standard error")); -#line 418 "../usage.c" - puts(_("standard error")); -#line 628 "../usage.c" - puts(_("standard error")); -#line 175 "../version.c" - puts(_("standard error")); -#line 208 "../makeshell.c" - puts(_("write")); -#line 943 "../makeshell.c" - puts(_("write")); -#line 276 "../usage.c" - puts(_("write")); -#line 417 "../usage.c" - puts(_("write")); -#line 627 "../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 130 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 185 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 238 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 257 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 535 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); - /* END-LIBOPTS-MESSAGES */ - - /* USAGE-TEXT: */ -#line 876 "../usage.c" - puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1151 "../usage.c" - puts(_("Version, usage and configuration options:")); -#line 927 "../usage.c" - puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 840 "../usage.c" - puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1120 "../usage.c" - puts(_(" --- %-14s %s\n")); -#line 1118 "../usage.c" - puts(_("This option has been disabled")); -#line 867 "../usage.c" - puts(_("\t\t\t\t- enabled by default\n")); -#line 40 "../alias.c" - puts(_("%s error: only ")); -#line 1197 "../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 383 "../usage.c" - puts(_("Options are specified by doubled hyphens and their name or by a single\n" - "hyphen and the flag character.\n")); -#line 921 "../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 167 "../enum.c" - puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 900 "../usage.c" - puts(_("\t\t\t\t- is a set membership option\n")); -#line 921 "../usage.c" - puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 385 "../usage.c" - puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 907 "../usage.c" - puts(_("\t\t\t\t- may appear multiple times\n")); -#line 894 "../usage.c" - puts(_("\t\t\t\t- may not be preset\n")); -#line 1312 "../usage.c" - puts(_(" Arg Option-Name Description\n")); -#line 1248 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1306 "../usage.c" - puts(_(" Flg Arg Option-Name Description\n")); -#line 1307 "../usage.c" - puts(_(" %3s %s")); -#line 1313 "../usage.c" - puts(_(" %3s %s")); -#line 390 "../usage.c" - puts(_("The '-#<number>' option may omit the hash char\n")); -#line 386 "../usage.c" - puts(_("All arguments are named options.\n")); -#line 974 "../usage.c" - puts(_(" - reading file %s")); -#line 412 "../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 906 "../usage.c" - puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 947 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 1195 "../usage.c" - puts(_("\n" - "The following option preset mechanisms are supported:\n")); -#line 685 "../usage.c" - puts(_("prohibits these options:\n")); -#line 680 "../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 393 "../usage.c" - puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 655 "../usage.c" - puts(_("requires the option '%s'\n")); -#line 658 "../usage.c" - puts(_("requires these options:\n")); -#line 1324 "../usage.c" - puts(_(" Arg Option-Name Req? Description\n")); -#line 1318 "../usage.c" - puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 168 "../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 913 "../usage.c" - puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" - puts(_("The valid \"%s\" option keywords are:\n")); -#line 1155 "../usage.c" - puts(_("The next option supports vendor supported extra options:")); -#line 776 "../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.bak b/src/tpmtool-args.h.bak deleted file mode 100644 index 4b52836527..0000000000 --- a/src/tpmtool-args.h.bak +++ /dev/null @@ -1,247 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (tpmtool-args.h) - * - * It has been AutoGen-ed - * From the definitions tpmtool-args.def - * and the template file options - * - * Generated from AutoOpts 41:1:16 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-2018 Free Software Foundation, and others, 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 <http://gnu.org/licenses/gpl.html> - * - * 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 <http://www.gnu.org/licenses/>. - */ -/** - * 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 <autoopts/options.h> - -/** - * 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 167937 -#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_TEST_SIGN = 12, - INDEX_OPT_SEC_PARAM = 13, - INDEX_OPT_BITS = 14, - INDEX_OPT_INDER = 15, - INDEX_OPT_OUTDER = 16, - INDEX_OPT_VERSION = 17, - INDEX_OPT_HELP = 18, - INDEX_OPT_MORE_HELP = 19 -} teOptIndex; -/** count of all options for tpmtool */ -#define OPTION_CT 20 -/** tpmtool version */ -#define TPMTOOL_VERSION "3.6.4" -/** Full tpmtool version text */ -#define TPMTOOL_FULL_VERSION "tpmtool 3.6.4" - -/** - * 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 0x1001 -#define VALUE_OPT_OUTFILE 0x1002 -#define VALUE_OPT_GENERATE_RSA 0x1003 -#define VALUE_OPT_REGISTER 0x1004 -#define VALUE_OPT_SIGNING 0x1005 -#define VALUE_OPT_LEGACY 0x1006 -#define VALUE_OPT_USER 0x1007 -#define VALUE_OPT_SYSTEM 0x1008 -#define VALUE_OPT_PUBKEY 0x1009 -#define VALUE_OPT_LIST 0x100A -#define VALUE_OPT_DELETE 0x100B -#define VALUE_OPT_TEST_SIGN 0x100C -#define VALUE_OPT_SEC_PARAM 0x100D -#define VALUE_OPT_BITS 0x100E - -#define OPT_VALUE_BITS (DESC(BITS).optArg.argInt) -#define VALUE_OPT_INDER 0x100F -#define VALUE_OPT_OUTDER 0x1010 -/** option flag (value) for help-value option */ -#define VALUE_OPT_HELP 'h' -/** option flag (value) for more-help-value option */ -#define VALUE_OPT_MORE_HELP '!' -/** option flag (value) for version-value 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) - -#ifdef __cplusplus -extern "C" { -#endif -/* - * global exported definitions - */ -#include <gettext.h> - - -/* * * * * * - * - * Declare the tpmtool option descriptor. - */ -extern tOptions tpmtoolOptions; - -#if defined(ENABLE_NLS) -# ifndef _ -# include <stdio.h> -# ifndef HAVE_GETTEXT - extern char * gettext(char const *); -# else -# include <libintl.h> -# endif - -# ifndef ATTRIBUTE_FORMAT_ARG -# define ATTRIBUTE_FORMAT_ARG(_a) -# endif - -static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); -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 */ |