/* -*- buffer-read-only: t -*- vi: set ro: * * DO NOT EDIT THIS FILE (cli-args.c) * * It has been AutoGen-ed February 1, 2013 at 08:10:51 PM by AutoGen 5.16 * From the definitions cli-args.def * and the template file options * * Generated from AutoOpts 36:4:11 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen * by the gnutls-cli author or copyright holder. AutoOpts is * licensed under the terms of the LGPL. The redistributable library * (``libopts'') is licensed under the terms of either the LGPL or, at the * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * * The gnutls-cli program is copyrighted and licensed * under the following terms: * * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the * GNU General Public License, version 3 or later * * * gnutls-cli is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * gnutls-cli is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef __doxygen__ #define OPTION_CODE_COMPILE 1 #include "cli-args.h" #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ #define zCopyright (gnutls_cli_opt_strs+0) #define zLicenseDescrip (gnutls_cli_opt_strs+281) #ifndef NULL # define NULL 0 #endif /* * gnutls-cli option static const strings */ static char const gnutls_cli_opt_strs[3921] = /* 0 */ "gnutls-cli @VERSION@\n" "Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the\n" "GNU General Public License, version 3 or later\n" " \n\0" /* 281 */ "gnutls-cli is free software: you can redistribute it and/or modify it under\n" "the terms of the GNU General Public License as published by the Free\n" "Software Foundation, either version 3 of the License, or (at your option)\n" "any later version.\n\n" "gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n" "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" "more details.\n\n" "You should have received a copy of the GNU General Public License along\n" "with this program. If not, see .\n\0" /* 890 */ "Enable debugging.\0" /* 908 */ "DEBUG\0" /* 914 */ "debug\0" /* 920 */ "More verbose output\0" /* 940 */ "VERBOSE\0" /* 948 */ "verbose\0" /* 956 */ "Enable trust on first use authentication\0" /* 997 */ "TOFU\0" /* 1002 */ "no-tofu\0" /* 1010 */ "no\0" /* 1013 */ "Enable DANE certificate verification (DNSSEC)\0" /* 1059 */ "DANE\0" /* 1064 */ "no-dane\0" /* 1072 */ "Use the local DNS server for DNSSEC resolving.\0" /* 1119 */ "LOCAL_DNS\0" /* 1129 */ "no-local-dns\0" /* 1142 */ "Disable CA certificate verification\0" /* 1178 */ "CA_VERIFICATION\0" /* 1194 */ "no-ca-verification\0" /* 1213 */ "Enable OCSP certificate verification\0" /* 1250 */ "OCSP\0" /* 1255 */ "no-ocsp\0" /* 1263 */ "Establish a session and resume\0" /* 1294 */ "RESUME\0" /* 1301 */ "resume\0" /* 1308 */ "Activate heartbeat support\0" /* 1335 */ "HEARTBEAT\0" /* 1345 */ "heartbeat\0" /* 1355 */ "Establish a session and rehandshake\0" /* 1391 */ "REHANDSHAKE\0" /* 1403 */ "rehandshake\0" /* 1415 */ "Don't accept session tickets\0" /* 1444 */ "NOTICKET\0" /* 1453 */ "noticket\0" /* 1462 */ "Connect, establish a plain session and start TLS.\0" /* 1512 */ "STARTTLS\0" /* 1521 */ "starttls\0" /* 1530 */ "Use DTLS (datagram TLS) over UDP\0" /* 1563 */ "UDP\0" /* 1567 */ "udp\0" /* 1571 */ "Set MTU for datagram TLS\0" /* 1596 */ "MTU\0" /* 1600 */ "mtu\0" /* 1604 */ "Offer SRTP profiles\0" /* 1624 */ "SRTP_PROFILES\0" /* 1638 */ "srtp-profiles\0" /* 1652 */ "Send CR LF instead of LF\0" /* 1677 */ "CRLF\0" /* 1682 */ "crlf\0" /* 1687 */ "Use DER format for certificates to read from\0" /* 1732 */ "X509FMTDER\0" /* 1743 */ "x509fmtder\0" /* 1754 */ "Send the openpgp fingerprint, instead of the key\0" /* 1803 */ "FINGERPRINT\0" /* 1815 */ "fingerprint\0" /* 1827 */ "Disable all the TLS extensions\0" /* 1858 */ "DISABLE_EXTENSIONS\0" /* 1877 */ "disable-extensions\0" /* 1896 */ "Print peer's certificate in PEM format\0" /* 1935 */ "PRINT_CERT\0" /* 1946 */ "print-cert\0" /* 1957 */ "The maximum record size to advertize\0" /* 1994 */ "RECORDSIZE\0" /* 2005 */ "recordsize\0" /* 2016 */ "The minimum number of bits allowed for DH\0" /* 2058 */ "DH_BITS\0" /* 2066 */ "dh-bits\0" /* 2074 */ "Priorities string\0" /* 2092 */ "PRIORITY\0" /* 2101 */ "priority\0" /* 2110 */ "Certificate file or PKCS #11 URL to use\0" /* 2150 */ "X509CAFILE\0" /* 2161 */ "x509cafile\0" /* 2172 */ "CRL file to use\0" /* 2188 */ "X509CRLFILE\0" /* 2200 */ "x509crlfile\0" /* 2212 */ "PGP Key file to use\0" /* 2232 */ "PGPKEYFILE\0" /* 2243 */ "pgpkeyfile\0" /* 2254 */ "PGP Key ring file to use\0" /* 2279 */ "PGPKEYRING\0" /* 2290 */ "pgpkeyring\0" /* 2301 */ "PGP Public Key (certificate) file to use\0" /* 2342 */ "PGPCERTFILE\0" /* 2354 */ "pgpcertfile\0" /* 2366 */ "X.509 key file or PKCS #11 URL to use\0" /* 2404 */ "X509KEYFILE\0" /* 2416 */ "x509keyfile\0" /* 2428 */ "X.509 Certificate file or PKCS #11 URL to use\0" /* 2474 */ "X509CERTFILE\0" /* 2487 */ "x509certfile\0" /* 2500 */ "PGP subkey to use (hex or auto)\0" /* 2532 */ "PGPSUBKEY\0" /* 2542 */ "pgpsubkey\0" /* 2552 */ "SRP username to use\0" /* 2572 */ "SRPUSERNAME\0" /* 2584 */ "srpusername\0" /* 2596 */ "SRP password to use\0" /* 2616 */ "SRPPASSWD\0" /* 2626 */ "srppasswd\0" /* 2636 */ "PSK username to use\0" /* 2656 */ "PSKUSERNAME\0" /* 2668 */ "pskusername\0" /* 2680 */ "PSK key (in hex) to use\0" /* 2704 */ "PSKKEY\0" /* 2711 */ "pskkey\0" /* 2718 */ "The port or service to connect to\0" /* 2752 */ "PORT\0" /* 2757 */ "port\0" /* 2762 */ "Don't abort program if server certificate can't be validated\0" /* 2823 */ "INSECURE\0" /* 2832 */ "insecure\0" /* 2841 */ "Use length-hiding padding to prevent traffic analysis\0" /* 2895 */ "RANGES\0" /* 2902 */ "ranges\0" /* 2909 */ "Benchmark individual ciphers\0" /* 2938 */ "BENCHMARK_CIPHERS\0" /* 2956 */ "benchmark-ciphers\0" /* 2974 */ "Benchmark individual software ciphers (no hw acceleration)\0" /* 3033 */ "BENCHMARK_SOFT_CIPHERS\0" /* 3056 */ "benchmark-soft-ciphers\0" /* 3079 */ "Benchmark TLS key exchange methods\0" /* 3114 */ "BENCHMARK_TLS_KX\0" /* 3131 */ "benchmark-tls-kx\0" /* 3148 */ "Benchmark TLS ciphers\0" /* 3170 */ "BENCHMARK_TLS_CIPHERS\0" /* 3192 */ "benchmark-tls-ciphers\0" /* 3214 */ "Print a list of the supported algorithms and modes\0" /* 3265 */ "LIST\0" /* 3270 */ "list\0" /* 3275 */ "Do not send a Server Name Indication (SNI)\0" /* 3318 */ "DISABLE_SNI\0" /* 3330 */ "disable-sni\0" /* 3342 */ "Display extended usage information and exit\0" /* 3386 */ "help\0" /* 3391 */ "Extended usage information passed thru pager\0" /* 3436 */ "more-help\0" /* 3446 */ "Output version information and exit\0" /* 3482 */ "version\0" /* 3490 */ "GNUTLS_CLI\0" /* 3501 */ "gnutls-cli - GnuTLS client - Ver. @VERSION@\n" "USAGE: %s [ - [] | --[{=| }] ]... [hostname]\n\0" /* 3614 */ "bug-gnutls@gnu.org\0" /* 3633 */ "\n\n\0" /* 3636 */ "\n" "Simple client program to set up a TLS connection to some other computer. It\n" "sets up a TLS connection and forwards data from the standard input to the\n" "secured socket and vice versa.\n\0" /* 3820 */ "gnutls-cli @VERSION@\0" /* 3841 */ "Usage: gnutls-cli [options] hostname\n" "gnutls-cli --help for usage instructions.\n"; /* * debug option description: */ #define DEBUG_DESC (gnutls_cli_opt_strs+890) #define DEBUG_NAME (gnutls_cli_opt_strs+908) #define DEBUG_name (gnutls_cli_opt_strs+914) #define DEBUG_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * verbose option description: */ #define VERBOSE_DESC (gnutls_cli_opt_strs+920) #define VERBOSE_NAME (gnutls_cli_opt_strs+940) #define VERBOSE_name (gnutls_cli_opt_strs+948) #define VERBOSE_FLAGS (OPTST_DISABLED) /* * tofu option description: */ #define TOFU_DESC (gnutls_cli_opt_strs+956) #define TOFU_NAME (gnutls_cli_opt_strs+997) #define NOT_TOFU_name (gnutls_cli_opt_strs+1002) #define NOT_TOFU_PFX (gnutls_cli_opt_strs+1010) #define TOFU_name (NOT_TOFU_name + 3) #define TOFU_FLAGS (OPTST_DISABLED) /* * dane option description: */ #define DANE_DESC (gnutls_cli_opt_strs+1013) #define DANE_NAME (gnutls_cli_opt_strs+1059) #define NOT_DANE_name (gnutls_cli_opt_strs+1064) #define NOT_DANE_PFX (gnutls_cli_opt_strs+1010) #define DANE_name (NOT_DANE_name + 3) #define DANE_FLAGS (OPTST_DISABLED) /* * local-dns option description: */ #define LOCAL_DNS_DESC (gnutls_cli_opt_strs+1072) #define LOCAL_DNS_NAME (gnutls_cli_opt_strs+1119) #define NOT_LOCAL_DNS_name (gnutls_cli_opt_strs+1129) #define NOT_LOCAL_DNS_PFX (gnutls_cli_opt_strs+1010) #define LOCAL_DNS_name (NOT_LOCAL_DNS_name + 3) #define LOCAL_DNS_FLAGS (OPTST_DISABLED) /* * ca-verification option description: */ #define CA_VERIFICATION_DESC (gnutls_cli_opt_strs+1142) #define CA_VERIFICATION_NAME (gnutls_cli_opt_strs+1178) #define NOT_CA_VERIFICATION_name (gnutls_cli_opt_strs+1194) #define NOT_CA_VERIFICATION_PFX (gnutls_cli_opt_strs+1010) #define CA_VERIFICATION_name (NOT_CA_VERIFICATION_name + 3) #define CA_VERIFICATION_FLAGS (OPTST_INITENABLED) /* * ocsp option description: */ #define OCSP_DESC (gnutls_cli_opt_strs+1213) #define OCSP_NAME (gnutls_cli_opt_strs+1250) #define NOT_OCSP_name (gnutls_cli_opt_strs+1255) #define NOT_OCSP_PFX (gnutls_cli_opt_strs+1010) #define OCSP_name (NOT_OCSP_name + 3) #define OCSP_FLAGS (OPTST_DISABLED) /* * resume option description: */ #define RESUME_DESC (gnutls_cli_opt_strs+1263) #define RESUME_NAME (gnutls_cli_opt_strs+1294) #define RESUME_name (gnutls_cli_opt_strs+1301) #define RESUME_FLAGS (OPTST_DISABLED) /* * heartbeat option description: */ #define HEARTBEAT_DESC (gnutls_cli_opt_strs+1308) #define HEARTBEAT_NAME (gnutls_cli_opt_strs+1335) #define HEARTBEAT_name (gnutls_cli_opt_strs+1345) #define HEARTBEAT_FLAGS (OPTST_DISABLED) /* * rehandshake option description: */ #define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1355) #define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1391) #define REHANDSHAKE_name (gnutls_cli_opt_strs+1403) #define REHANDSHAKE_FLAGS (OPTST_DISABLED) /* * noticket option description: */ #define NOTICKET_DESC (gnutls_cli_opt_strs+1415) #define NOTICKET_NAME (gnutls_cli_opt_strs+1444) #define NOTICKET_name (gnutls_cli_opt_strs+1453) #define NOTICKET_FLAGS (OPTST_DISABLED) /* * starttls option description: */ #define STARTTLS_DESC (gnutls_cli_opt_strs+1462) #define STARTTLS_NAME (gnutls_cli_opt_strs+1512) #define STARTTLS_name (gnutls_cli_opt_strs+1521) #define STARTTLS_FLAGS (OPTST_DISABLED) /* * udp option description: */ #define UDP_DESC (gnutls_cli_opt_strs+1530) #define UDP_NAME (gnutls_cli_opt_strs+1563) #define UDP_name (gnutls_cli_opt_strs+1567) #define UDP_FLAGS (OPTST_DISABLED) /* * mtu option description: */ #define MTU_DESC (gnutls_cli_opt_strs+1571) #define MTU_NAME (gnutls_cli_opt_strs+1596) #define MTU_name (gnutls_cli_opt_strs+1600) #define MTU_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * srtp_profiles option description: */ #define SRTP_PROFILES_DESC (gnutls_cli_opt_strs+1604) #define SRTP_PROFILES_NAME (gnutls_cli_opt_strs+1624) #define SRTP_PROFILES_name (gnutls_cli_opt_strs+1638) #define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * crlf option description: */ #define CRLF_DESC (gnutls_cli_opt_strs+1652) #define CRLF_NAME (gnutls_cli_opt_strs+1677) #define CRLF_name (gnutls_cli_opt_strs+1682) #define CRLF_FLAGS (OPTST_DISABLED) /* * x509fmtder option description: */ #define X509FMTDER_DESC (gnutls_cli_opt_strs+1687) #define X509FMTDER_NAME (gnutls_cli_opt_strs+1732) #define X509FMTDER_name (gnutls_cli_opt_strs+1743) #define X509FMTDER_FLAGS (OPTST_DISABLED) /* * fingerprint option description: */ #define FINGERPRINT_DESC (gnutls_cli_opt_strs+1754) #define FINGERPRINT_NAME (gnutls_cli_opt_strs+1803) #define FINGERPRINT_name (gnutls_cli_opt_strs+1815) #define FINGERPRINT_FLAGS (OPTST_DISABLED) /* * disable-extensions option description: */ #define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+1827) #define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+1858) #define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+1877) #define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED) /* * print-cert option description: */ #define PRINT_CERT_DESC (gnutls_cli_opt_strs+1896) #define PRINT_CERT_NAME (gnutls_cli_opt_strs+1935) #define PRINT_CERT_name (gnutls_cli_opt_strs+1946) #define PRINT_CERT_FLAGS (OPTST_DISABLED) /* * recordsize option description: */ #define RECORDSIZE_DESC (gnutls_cli_opt_strs+1957) #define RECORDSIZE_NAME (gnutls_cli_opt_strs+1994) #define RECORDSIZE_name (gnutls_cli_opt_strs+2005) #define RECORDSIZE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * dh-bits option description: */ #define DH_BITS_DESC (gnutls_cli_opt_strs+2016) #define DH_BITS_NAME (gnutls_cli_opt_strs+2058) #define DH_BITS_name (gnutls_cli_opt_strs+2066) #define DH_BITS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * priority option description: */ #define PRIORITY_DESC (gnutls_cli_opt_strs+2074) #define PRIORITY_NAME (gnutls_cli_opt_strs+2092) #define PRIORITY_name (gnutls_cli_opt_strs+2101) #define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509cafile option description: */ #define X509CAFILE_DESC (gnutls_cli_opt_strs+2110) #define X509CAFILE_NAME (gnutls_cli_opt_strs+2150) #define X509CAFILE_name (gnutls_cli_opt_strs+2161) #define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509crlfile option description: */ #define X509CRLFILE_DESC (gnutls_cli_opt_strs+2172) #define X509CRLFILE_NAME (gnutls_cli_opt_strs+2188) #define X509CRLFILE_name (gnutls_cli_opt_strs+2200) #define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyfile option description: */ #define PGPKEYFILE_DESC (gnutls_cli_opt_strs+2212) #define PGPKEYFILE_NAME (gnutls_cli_opt_strs+2232) #define PGPKEYFILE_name (gnutls_cli_opt_strs+2243) #define PGPKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyring option description: */ #define PGPKEYRING_DESC (gnutls_cli_opt_strs+2254) #define PGPKEYRING_NAME (gnutls_cli_opt_strs+2279) #define PGPKEYRING_name (gnutls_cli_opt_strs+2290) #define PGPKEYRING_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpcertfile option description: */ #define PGPCERTFILE_DESC (gnutls_cli_opt_strs+2301) #define PGPCERTFILE_NAME (gnutls_cli_opt_strs+2342) #define PGPCERTFILE_name (gnutls_cli_opt_strs+2354) #define PGPCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * x509keyfile option description: */ #define X509KEYFILE_DESC (gnutls_cli_opt_strs+2366) #define X509KEYFILE_NAME (gnutls_cli_opt_strs+2404) #define X509KEYFILE_name (gnutls_cli_opt_strs+2416) #define X509KEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509certfile option description: */ #define X509CERTFILE_DESC (gnutls_cli_opt_strs+2428) #define X509CERTFILE_NAME (gnutls_cli_opt_strs+2474) #define X509CERTFILE_name (gnutls_cli_opt_strs+2487) #define X509CERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pgpsubkey option description: */ #define PGPSUBKEY_DESC (gnutls_cli_opt_strs+2500) #define PGPSUBKEY_NAME (gnutls_cli_opt_strs+2532) #define PGPSUBKEY_name (gnutls_cli_opt_strs+2542) #define PGPSUBKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * srpusername option description: */ #define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2552) #define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2572) #define SRPUSERNAME_name (gnutls_cli_opt_strs+2584) #define SRPUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * srppasswd option description: */ #define SRPPASSWD_DESC (gnutls_cli_opt_strs+2596) #define SRPPASSWD_NAME (gnutls_cli_opt_strs+2616) #define SRPPASSWD_name (gnutls_cli_opt_strs+2626) #define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pskusername option description: */ #define PSKUSERNAME_DESC (gnutls_cli_opt_strs+2636) #define PSKUSERNAME_NAME (gnutls_cli_opt_strs+2656) #define PSKUSERNAME_name (gnutls_cli_opt_strs+2668) #define PSKUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pskkey option description: */ #define PSKKEY_DESC (gnutls_cli_opt_strs+2680) #define PSKKEY_NAME (gnutls_cli_opt_strs+2704) #define PSKKEY_name (gnutls_cli_opt_strs+2711) #define PSKKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * port option description: */ #define PORT_DESC (gnutls_cli_opt_strs+2718) #define PORT_NAME (gnutls_cli_opt_strs+2752) #define PORT_name (gnutls_cli_opt_strs+2757) #define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * insecure option description: */ #define INSECURE_DESC (gnutls_cli_opt_strs+2762) #define INSECURE_NAME (gnutls_cli_opt_strs+2823) #define INSECURE_name (gnutls_cli_opt_strs+2832) #define INSECURE_FLAGS (OPTST_DISABLED) /* * ranges option description: */ #define RANGES_DESC (gnutls_cli_opt_strs+2841) #define RANGES_NAME (gnutls_cli_opt_strs+2895) #define RANGES_name (gnutls_cli_opt_strs+2902) #define RANGES_FLAGS (OPTST_DISABLED) /* * benchmark-ciphers option description: */ #define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+2909) #define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+2938) #define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+2956) #define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) /* * benchmark-soft-ciphers option description: */ #define BENCHMARK_SOFT_CIPHERS_DESC (gnutls_cli_opt_strs+2974) #define BENCHMARK_SOFT_CIPHERS_NAME (gnutls_cli_opt_strs+3033) #define BENCHMARK_SOFT_CIPHERS_name (gnutls_cli_opt_strs+3056) #define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED) /* * benchmark-tls-kx option description: */ #define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+3079) #define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+3114) #define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+3131) #define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) /* * benchmark-tls-ciphers option description: */ #define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+3148) #define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+3170) #define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+3192) #define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) /* * list option description: */ #define LIST_DESC (gnutls_cli_opt_strs+3214) #define LIST_NAME (gnutls_cli_opt_strs+3265) #define LIST_name (gnutls_cli_opt_strs+3270) #define LIST_FLAGS (OPTST_DISABLED) /* * disable-sni option description: */ #define DISABLE_SNI_DESC (gnutls_cli_opt_strs+3275) #define DISABLE_SNI_NAME (gnutls_cli_opt_strs+3318) #define DISABLE_SNI_name (gnutls_cli_opt_strs+3330) #define DISABLE_SNI_FLAGS (OPTST_DISABLED) /* * Help/More_Help/Version option descriptions: */ #define HELP_DESC (gnutls_cli_opt_strs+3342) #define HELP_name (gnutls_cli_opt_strs+3386) #ifdef HAVE_WORKING_FORK #define MORE_HELP_DESC (gnutls_cli_opt_strs+3391) #define MORE_HELP_name (gnutls_cli_opt_strs+3436) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC NULL #define MORE_HELP_name NULL #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) #endif #ifdef NO_OPTIONAL_OPT_ARGS # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif #define VER_DESC (gnutls_cli_opt_strs+3446) #define VER_name (gnutls_cli_opt_strs+3482) /* * Declare option callback procedures */ extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, optionUnstackArg, optionVendorOption; static tOptProc doOptDebug, doOptMtu, doOptPgpcertfile, doOptPgpkeyfile, doOptPgpkeyring, doOptRecordsize, doOptX509crlfile, doUsageOpt; #define VER_PROC optionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Define the gnutls-cli Option Descriptions. * This is an array of OPTION_CT entries, one for each * option that the gnutls-cli program responds to. */ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_DEBUG, /* equiv idx, value */ 0, VALUE_OPT_DEBUG, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ VERBOSE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --verbose */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_TOFU, /* equiv idx, value */ 2, VALUE_OPT_TOFU, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ TOFU_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --tofu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name, /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX }, { /* entry idx, value */ 3, VALUE_OPT_DANE, /* equiv idx, value */ 3, VALUE_OPT_DANE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DANE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --dane */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DANE_DESC, DANE_NAME, DANE_name, /* disablement strs */ NOT_DANE_name, NOT_DANE_PFX }, { /* entry idx, value */ 4, VALUE_OPT_LOCAL_DNS, /* equiv idx, value */ 4, VALUE_OPT_LOCAL_DNS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LOCAL_DNS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --local-dns */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ LOCAL_DNS_DESC, LOCAL_DNS_NAME, LOCAL_DNS_name, /* disablement strs */ NOT_LOCAL_DNS_name, NOT_LOCAL_DNS_PFX }, { /* entry idx, value */ 5, VALUE_OPT_CA_VERIFICATION, /* equiv idx, value */ 5, VALUE_OPT_CA_VERIFICATION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ CA_VERIFICATION_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ca-verification */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ CA_VERIFICATION_DESC, CA_VERIFICATION_NAME, CA_VERIFICATION_name, /* disablement strs */ NOT_CA_VERIFICATION_name, NOT_CA_VERIFICATION_PFX }, { /* entry idx, value */ 6, VALUE_OPT_OCSP, /* equiv idx, value */ 6, VALUE_OPT_OCSP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OCSP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ocsp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name, /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX }, { /* entry idx, value */ 7, VALUE_OPT_RESUME, /* equiv idx, value */ 7, VALUE_OPT_RESUME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RESUME_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --resume */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 8, VALUE_OPT_HEARTBEAT, /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_REHANDSHAKE, /* equiv idx, value */ 9, 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 */ 10, VALUE_OPT_NOTICKET, /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_STARTTLS, /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_UDP, /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_MTU, /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_SRTP_PROFILES, /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_CRLF, /* equiv idx, value */ 15, 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 */ 16, VALUE_OPT_X509FMTDER, /* equiv idx, value */ 16, 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 */ 17, VALUE_OPT_FINGERPRINT, /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_DISABLE_EXTENSIONS, /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_PRINT_CERT, /* equiv idx, value */ 19, 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 */ 20, VALUE_OPT_RECORDSIZE, /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_DH_BITS, /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_PRIORITY, /* equiv idx, value */ 22, 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 */ 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_PGPKEYRING, /* equiv idx, value */ 26, VALUE_OPT_PGPKEYRING, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYRING_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpkeyring */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyring, /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_PGPCERTFILE, /* equiv idx, value */ 27, VALUE_OPT_PGPCERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPCERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpcertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpcertfile, /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 28, VALUE_OPT_X509KEYFILE, /* equiv idx, value */ 28, 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 */ 29, VALUE_OPT_X509CERTFILE, /* equiv idx, value */ 29, VALUE_OPT_X509CERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 30, VALUE_OPT_PGPSUBKEY, /* equiv idx, value */ 30, VALUE_OPT_PGPSUBKEY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPSUBKEY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpsubkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 31, VALUE_OPT_SRPUSERNAME, /* equiv idx, value */ 31, 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 */ 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 */ NULL, /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 33, VALUE_OPT_PSKUSERNAME, /* equiv idx, value */ 33, 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 */ 34, VALUE_OPT_PSKKEY, /* equiv idx, value */ 34, 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 */ 35, VALUE_OPT_PORT, /* equiv idx, value */ 35, 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 */ 36, VALUE_OPT_INSECURE, /* equiv idx, value */ 36, 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 */ 37, VALUE_OPT_RANGES, /* equiv idx, value */ 37, 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 */ 38, VALUE_OPT_BENCHMARK_CIPHERS, /* equiv idx, value */ 38, 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 */ 39, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, /* equiv idx, value */ 39, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 40, VALUE_OPT_BENCHMARK_TLS_KX, /* equiv idx, value */ 40, 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 */ 41, VALUE_OPT_BENCHMARK_TLS_CIPHERS, /* equiv idx, value */ 41, 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 */ 42, VALUE_OPT_LIST, /* equiv idx, value */ 42, 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 */ 43, VALUE_OPT_DISABLE_SNI, /* equiv idx, value */ 43, VALUE_OPT_DISABLE_SNI, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_SNI_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --disable-sni */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DISABLE_SNI_DESC, DISABLE_SNI_NAME, DISABLE_SNI_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ VER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ VER_PROC, /* desc, NAME, name */ VER_DESC, NULL, VER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doUsageOpt, /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MORE_HELP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionPagedUsage, /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, /* disablement strs */ NULL, NULL } }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Define the gnutls-cli Option Environment */ #define zPROGNAME (gnutls_cli_opt_strs+3490) #define zUsageTitle (gnutls_cli_opt_strs+3501) #define zRcName NULL #define apzHomeList NULL #define zBugsAddr (gnutls_cli_opt_strs+3614) #define zExplain (gnutls_cli_opt_strs+3633) #define zDetail (gnutls_cli_opt_strs+3636) #define zFullVersion (gnutls_cli_opt_strs+3820) /* extracted from optcode.tlib near line 350 */ #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+3841) #endif /* not defined __doxygen__ */ /* * Create the static procedure(s) declared above. */ /** * The callout function that invokes the optionUsage function. * * @param pOptions the AutoOpts option description structure * @param pOptDesc the descriptor for the "help" (usage) option. * @noreturn */ static void doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS); /* NOTREACHED */ (void)pOptDesc; (void)pOptions; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0 , 9999 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the mtu option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0, 17000 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the recordsize option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0, 4096 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509crlfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpkeyfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpkeyring option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpcertfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* extracted from optmain.tlib near line 1113 */ /** * The directory containing the data associated with gnutls-cli. */ #ifndef PKGDATADIR # define PKGDATADIR "" #endif /** * Information about the person or institution that packaged gnutls-cli * for the current distribution. */ #ifndef WITH_PACKAGER # define gnutls_cli_packager_info NULL #else static char const gnutls_cli_packager_info[] = "Packaged by " WITH_PACKAGER # ifdef WITH_PACKAGER_VERSION " ("WITH_PACKAGER_VERSION")" # endif # ifdef WITH_PACKAGER_BUG_REPORTS "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS # endif "\n"; #endif #ifndef __doxygen__ #endif /* __doxygen__ */ /** * The option definitions for gnutls-cli. The one structure that * binds them all. */ tOptions gnutls_cliOptions = { OPTIONS_STRUCT_VERSION, 0, NULL, /* original argc + argv */ ( OPTPROC_BASE + OPTPROC_ERRSTOP + OPTPROC_SHORTOPT + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_NEGATIONS + OPTPROC_REORDER + OPTPROC_GNUUSAGE + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ NULL, NULL, /* extensions/saved state */ optionUsage, /* usage procedure */ translate_option_strings, /* translation procedure */ /* * Indexes to special options */ { INDEX_OPT_MORE_HELP, /* more-help option index */ NO_EQUIVALENT, /* save option index */ NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, 47 /* full option count */, 44 /* user option count */, gnutls_cli_full_usage, gnutls_cli_short_usage, NULL, NULL, PKGDATADIR, gnutls_cli_packager_info }; #if ENABLE_NLS #include #include #include #include #include static char* AO_gettext(char const* pz); static void coerce_it(void** s); /** * AutoGen specific wrapper function for gettext. * It relies on the macro _() to convert from English to the target * language, then strdup-duplicates the result string. * * @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* pzRes; if (pz == NULL) return NULL; pzRes = _(pz); if (pzRes == pz) return pzRes; pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); exit(GNUTLS_CLI_EXIT_FAILURE); } return pzRes; } 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 pOpt = &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_usage_text.field_ct != 0) { /* * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ tOptDesc * pOD = pOpt->pOptDesc; char ** ppz = (char**)(void*)&(option_usage_text); int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); coerce_it((void*)&(pOpt->pzCopyright)); coerce_it((void*)&(pOpt->pzCopyNotice)); coerce_it((void*)&(pOpt->pzFullVersion)); coerce_it((void*)&(pOpt->pzUsageTitle)); coerce_it((void*)&(pOpt->pzExplain)); coerce_it((void*)&(pOpt->pzDetail)); coerce_it((void*)&(pOpt->pzPackager)); coerce_it((void*)&(pOpt->pzShortUsage)); option_usage_text.field_ct = 0; for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { tOptDesc * pOD = pOpt->pOptDesc; int ix; for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); } /* prevent re-translation */ gnutls_cliOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; } } #endif /* ENABLE_NLS */ #ifdef __cplusplus } #endif /* cli-args.c ends here */