/* -*- buffer-read-only: t -*- vi: set ro: * * DO NOT EDIT THIS FILE (cli-args.c) * * It has been AutoGen-ed October 23, 2013 at 12:39:20 PM by AutoGen 5.17 * From the definitions cli-args.def * and the template file options * * Generated from AutoOpts 37:0:12 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen * by the gnutls-cli author or copyright holder. AutoOpts is * licensed under the terms of the LGPL. The redistributable library * (``libopts'') is licensed under the terms of either the LGPL or, at the * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * * The gnutls-cli program is copyrighted and licensed * under the following terms: * * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the * GNU General Public License, version 3 or later * * * gnutls-cli is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * gnutls-cli is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef __doxygen__ #define OPTION_CODE_COMPILE 1 #include "cli-args.h" #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ #define zCopyright (gnutls_cli_opt_strs+0) #define zLicenseDescrip (gnutls_cli_opt_strs+281) #ifndef NULL # define NULL 0 #endif /* * gnutls-cli option static const strings */ static char const gnutls_cli_opt_strs[4195] = /* 0 */ "gnutls-cli @VERSION@\n" "Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the\n" "GNU General Public License, version 3 or later\n" " \n\0" /* 281 */ "gnutls-cli is free software: you can redistribute it and/or modify it under\n" "the terms of the GNU General Public License as published by the Free\n" "Software Foundation, either version 3 of the License, or (at your option)\n" "any later version.\n\n" "gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n" "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" "more details.\n\n" "You should have received a copy of the GNU General Public License along\n" "with this program. If not, see .\n\0" /* 890 */ "Enable debugging.\0" /* 908 */ "DEBUG\0" /* 914 */ "debug\0" /* 920 */ "More verbose output\0" /* 940 */ "VERBOSE\0" /* 948 */ "verbose\0" /* 956 */ "Enable trust on first use authentication\0" /* 997 */ "TOFU\0" /* 1002 */ "no-tofu\0" /* 1010 */ "no\0" /* 1013 */ "Enable DANE certificate verification (DNSSEC)\0" /* 1059 */ "DANE\0" /* 1064 */ "no-dane\0" /* 1072 */ "Use the local DNS server for DNSSEC resolving.\0" /* 1119 */ "LOCAL_DNS\0" /* 1129 */ "no-local-dns\0" /* 1142 */ "Disable CA certificate verification\0" /* 1178 */ "CA_VERIFICATION\0" /* 1194 */ "no-ca-verification\0" /* 1213 */ "Enable OCSP certificate verification\0" /* 1250 */ "OCSP\0" /* 1255 */ "no-ocsp\0" /* 1263 */ "Establish a session and resume\0" /* 1294 */ "RESUME\0" /* 1301 */ "resume\0" /* 1308 */ "Establish a session and rehandshake\0" /* 1344 */ "REHANDSHAKE\0" /* 1356 */ "rehandshake\0" /* 1368 */ "Connect, establish a plain session and start TLS.\0" /* 1418 */ "STARTTLS\0" /* 1427 */ "starttls\0" /* 1436 */ "Use DTLS (datagram TLS) over UDP\0" /* 1469 */ "UDP\0" /* 1473 */ "udp\0" /* 1477 */ "Set MTU for datagram TLS\0" /* 1502 */ "MTU\0" /* 1506 */ "mtu\0" /* 1510 */ "Send CR LF instead of LF\0" /* 1535 */ "CRLF\0" /* 1540 */ "crlf\0" /* 1545 */ "Use DER format for certificates to read from\0" /* 1590 */ "X509FMTDER\0" /* 1601 */ "x509fmtder\0" /* 1612 */ "Send the openpgp fingerprint, instead of the key\0" /* 1661 */ "FINGERPRINT\0" /* 1673 */ "fingerprint\0" /* 1685 */ "Print peer's certificate in PEM format\0" /* 1724 */ "PRINT_CERT\0" /* 1735 */ "print-cert\0" /* 1746 */ "The minimum number of bits allowed for DH\0" /* 1788 */ "DH_BITS\0" /* 1796 */ "dh-bits\0" /* 1804 */ "Priorities string\0" /* 1822 */ "PRIORITY\0" /* 1831 */ "priority\0" /* 1840 */ "Certificate file or PKCS #11 URL to use\0" /* 1880 */ "X509CAFILE\0" /* 1891 */ "x509cafile\0" /* 1902 */ "CRL file to use\0" /* 1918 */ "X509CRLFILE\0" /* 1930 */ "x509crlfile\0" /* 1942 */ "PGP Key file to use\0" /* 1962 */ "PGPKEYFILE\0" /* 1973 */ "pgpkeyfile\0" /* 1984 */ "PGP Key ring file to use\0" /* 2009 */ "PGPKEYRING\0" /* 2020 */ "pgpkeyring\0" /* 2031 */ "PGP Public Key (certificate) file to use\0" /* 2072 */ "PGPCERTFILE\0" /* 2084 */ "pgpcertfile\0" /* 2096 */ "X.509 key file or PKCS #11 URL to use\0" /* 2134 */ "X509KEYFILE\0" /* 2146 */ "x509keyfile\0" /* 2158 */ "X.509 Certificate file or PKCS #11 URL to use\0" /* 2204 */ "X509CERTFILE\0" /* 2217 */ "x509certfile\0" /* 2230 */ "PGP subkey to use (hex or auto)\0" /* 2262 */ "PGPSUBKEY\0" /* 2272 */ "pgpsubkey\0" /* 2282 */ "SRP username to use\0" /* 2302 */ "SRPUSERNAME\0" /* 2314 */ "srpusername\0" /* 2326 */ "SRP password to use\0" /* 2346 */ "SRPPASSWD\0" /* 2356 */ "srppasswd\0" /* 2366 */ "PSK username to use\0" /* 2386 */ "PSKUSERNAME\0" /* 2398 */ "pskusername\0" /* 2410 */ "PSK key (in hex) to use\0" /* 2434 */ "PSKKEY\0" /* 2441 */ "pskkey\0" /* 2448 */ "The port or service to connect to\0" /* 2482 */ "PORT\0" /* 2487 */ "port\0" /* 2492 */ "Don't abort program if server certificate can't be validated\0" /* 2553 */ "INSECURE\0" /* 2562 */ "insecure\0" /* 2571 */ "Use length-hiding padding to prevent traffic analysis\0" /* 2625 */ "RANGES\0" /* 2632 */ "ranges\0" /* 2639 */ "Benchmark individual ciphers\0" /* 2668 */ "BENCHMARK_CIPHERS\0" /* 2686 */ "benchmark-ciphers\0" /* 2704 */ "Benchmark individual software ciphers (no hw acceleration)\0" /* 2763 */ "BENCHMARK_SOFT_CIPHERS\0" /* 2786 */ "benchmark-soft-ciphers\0" /* 2809 */ "Benchmark TLS key exchange methods\0" /* 2844 */ "BENCHMARK_TLS_KX\0" /* 2861 */ "benchmark-tls-kx\0" /* 2878 */ "Benchmark TLS ciphers\0" /* 2900 */ "BENCHMARK_TLS_CIPHERS\0" /* 2922 */ "benchmark-tls-ciphers\0" /* 2944 */ "Print a list of the supported algorithms and modes\0" /* 2995 */ "LIST\0" /* 3000 */ "list\0" /* 3005 */ "Don't allow session tickets\0" /* 3033 */ "NOTICKET\0" /* 3042 */ "noticket\0" /* 3051 */ "Offer SRTP profiles\0" /* 3071 */ "SRTP_PROFILES\0" /* 3085 */ "srtp-profiles\0" /* 3099 */ "Application layer protocol\0" /* 3126 */ "ALPN\0" /* 3131 */ "alpn\0" /* 3136 */ "Activate heartbeat support\0" /* 3163 */ "HEARTBEAT\0" /* 3173 */ "heartbeat\0" /* 3183 */ "The maximum record size to advertize\0" /* 3220 */ "RECORDSIZE\0" /* 3231 */ "recordsize\0" /* 3242 */ "Do not send a Server Name Indication (SNI)\0" /* 3285 */ "DISABLE_SNI\0" /* 3297 */ "disable-sni\0" /* 3309 */ "Disable all the TLS extensions\0" /* 3340 */ "DISABLE_EXTENSIONS\0" /* 3359 */ "disable-extensions\0" /* 3378 */ "Inline commands of the form ^^\0" /* 3414 */ "INLINE_COMMANDS\0" /* 3430 */ "inline-commands\0" /* 3446 */ "Change the default (^) used as a delimiter for inline commands. The\n" "value is a single US-ASCII character (octets 0 - 127).\0" /* 3570 */ "INLINE_COMMANDS_PREFIX\0" /* 3593 */ "inline-commands-prefix\0" /* 3616 */ "Display extended usage information and exit\0" /* 3660 */ "help\0" /* 3665 */ "Extended usage information passed thru pager\0" /* 3710 */ "more-help\0" /* 3720 */ "Output version information and exit\0" /* 3756 */ "version\0" /* 3764 */ "GNUTLS_CLI\0" /* 3775 */ "gnutls-cli - GnuTLS client - Ver. @VERSION@\n" "USAGE: %s [ - [] | --[{=| }] ]... [hostname]\n\0" /* 3888 */ "bug-gnutls@gnu.org\0" /* 3907 */ "\n\n\0" /* 3910 */ "\n" "Simple client program to set up a TLS connection to some other computer. It\n" "sets up a TLS connection and forwards data from the standard input to the\n" "secured socket and vice versa.\n\0" /* 4094 */ "gnutls-cli @VERSION@\0" /* 4115 */ "Usage: gnutls-cli [options] hostname\n" "gnutls-cli --help for usage instructions.\n"; /* * debug option description: */ #define DEBUG_DESC (gnutls_cli_opt_strs+890) #define DEBUG_NAME (gnutls_cli_opt_strs+908) #define DEBUG_name (gnutls_cli_opt_strs+914) #define DEBUG_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * verbose option description: */ #define VERBOSE_DESC (gnutls_cli_opt_strs+920) #define VERBOSE_NAME (gnutls_cli_opt_strs+940) #define VERBOSE_name (gnutls_cli_opt_strs+948) #define VERBOSE_FLAGS (OPTST_DISABLED) /* * tofu option description: */ #define TOFU_DESC (gnutls_cli_opt_strs+956) #define TOFU_NAME (gnutls_cli_opt_strs+997) #define NOT_TOFU_name (gnutls_cli_opt_strs+1002) #define NOT_TOFU_PFX (gnutls_cli_opt_strs+1010) #define TOFU_name (NOT_TOFU_name + 3) #define TOFU_FLAGS (OPTST_DISABLED) /* * dane option description: */ #define DANE_DESC (gnutls_cli_opt_strs+1013) #define DANE_NAME (gnutls_cli_opt_strs+1059) #define NOT_DANE_name (gnutls_cli_opt_strs+1064) #define NOT_DANE_PFX (gnutls_cli_opt_strs+1010) #define DANE_name (NOT_DANE_name + 3) #define DANE_FLAGS (OPTST_DISABLED) /* * local-dns option description: */ #define LOCAL_DNS_DESC (gnutls_cli_opt_strs+1072) #define LOCAL_DNS_NAME (gnutls_cli_opt_strs+1119) #define NOT_LOCAL_DNS_name (gnutls_cli_opt_strs+1129) #define NOT_LOCAL_DNS_PFX (gnutls_cli_opt_strs+1010) #define LOCAL_DNS_name (NOT_LOCAL_DNS_name + 3) #define LOCAL_DNS_FLAGS (OPTST_DISABLED) /* * ca-verification option description: */ #define CA_VERIFICATION_DESC (gnutls_cli_opt_strs+1142) #define CA_VERIFICATION_NAME (gnutls_cli_opt_strs+1178) #define NOT_CA_VERIFICATION_name (gnutls_cli_opt_strs+1194) #define NOT_CA_VERIFICATION_PFX (gnutls_cli_opt_strs+1010) #define CA_VERIFICATION_name (NOT_CA_VERIFICATION_name + 3) #define CA_VERIFICATION_FLAGS (OPTST_INITENABLED) /* * ocsp option description: */ #define OCSP_DESC (gnutls_cli_opt_strs+1213) #define OCSP_NAME (gnutls_cli_opt_strs+1250) #define NOT_OCSP_name (gnutls_cli_opt_strs+1255) #define NOT_OCSP_PFX (gnutls_cli_opt_strs+1010) #define OCSP_name (NOT_OCSP_name + 3) #define OCSP_FLAGS (OPTST_DISABLED) /* * resume option description: */ #define RESUME_DESC (gnutls_cli_opt_strs+1263) #define RESUME_NAME (gnutls_cli_opt_strs+1294) #define RESUME_name (gnutls_cli_opt_strs+1301) #define RESUME_FLAGS (OPTST_DISABLED) /* * rehandshake option description: */ #define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1308) #define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1344) #define REHANDSHAKE_name (gnutls_cli_opt_strs+1356) #define REHANDSHAKE_FLAGS (OPTST_DISABLED) /* * starttls option description: */ #define STARTTLS_DESC (gnutls_cli_opt_strs+1368) #define STARTTLS_NAME (gnutls_cli_opt_strs+1418) #define STARTTLS_name (gnutls_cli_opt_strs+1427) #define STARTTLS_FLAGS (OPTST_DISABLED) /* * udp option description: */ #define UDP_DESC (gnutls_cli_opt_strs+1436) #define UDP_NAME (gnutls_cli_opt_strs+1469) #define UDP_name (gnutls_cli_opt_strs+1473) #define UDP_FLAGS (OPTST_DISABLED) /* * mtu option description: */ #define MTU_DESC (gnutls_cli_opt_strs+1477) #define MTU_NAME (gnutls_cli_opt_strs+1502) #define MTU_name (gnutls_cli_opt_strs+1506) #define MTU_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * crlf option description: */ #define CRLF_DESC (gnutls_cli_opt_strs+1510) #define CRLF_NAME (gnutls_cli_opt_strs+1535) #define CRLF_name (gnutls_cli_opt_strs+1540) #define CRLF_FLAGS (OPTST_DISABLED) /* * x509fmtder option description: */ #define X509FMTDER_DESC (gnutls_cli_opt_strs+1545) #define X509FMTDER_NAME (gnutls_cli_opt_strs+1590) #define X509FMTDER_name (gnutls_cli_opt_strs+1601) #define X509FMTDER_FLAGS (OPTST_DISABLED) /* * fingerprint option description: */ #define FINGERPRINT_DESC (gnutls_cli_opt_strs+1612) #define FINGERPRINT_NAME (gnutls_cli_opt_strs+1661) #define FINGERPRINT_name (gnutls_cli_opt_strs+1673) #define FINGERPRINT_FLAGS (OPTST_DISABLED) /* * print-cert option description: */ #define PRINT_CERT_DESC (gnutls_cli_opt_strs+1685) #define PRINT_CERT_NAME (gnutls_cli_opt_strs+1724) #define PRINT_CERT_name (gnutls_cli_opt_strs+1735) #define PRINT_CERT_FLAGS (OPTST_DISABLED) /* * dh-bits option description: */ #define DH_BITS_DESC (gnutls_cli_opt_strs+1746) #define DH_BITS_NAME (gnutls_cli_opt_strs+1788) #define DH_BITS_name (gnutls_cli_opt_strs+1796) #define DH_BITS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * priority option description: */ #define PRIORITY_DESC (gnutls_cli_opt_strs+1804) #define PRIORITY_NAME (gnutls_cli_opt_strs+1822) #define PRIORITY_name (gnutls_cli_opt_strs+1831) #define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509cafile option description: */ #define X509CAFILE_DESC (gnutls_cli_opt_strs+1840) #define X509CAFILE_NAME (gnutls_cli_opt_strs+1880) #define X509CAFILE_name (gnutls_cli_opt_strs+1891) #define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509crlfile option description: */ #define X509CRLFILE_DESC (gnutls_cli_opt_strs+1902) #define X509CRLFILE_NAME (gnutls_cli_opt_strs+1918) #define X509CRLFILE_name (gnutls_cli_opt_strs+1930) #define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyfile option description: */ #define PGPKEYFILE_DESC (gnutls_cli_opt_strs+1942) #define PGPKEYFILE_NAME (gnutls_cli_opt_strs+1962) #define PGPKEYFILE_name (gnutls_cli_opt_strs+1973) #define PGPKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyring option description: */ #define PGPKEYRING_DESC (gnutls_cli_opt_strs+1984) #define PGPKEYRING_NAME (gnutls_cli_opt_strs+2009) #define PGPKEYRING_name (gnutls_cli_opt_strs+2020) #define PGPKEYRING_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpcertfile option description: */ #define PGPCERTFILE_DESC (gnutls_cli_opt_strs+2031) #define PGPCERTFILE_NAME (gnutls_cli_opt_strs+2072) #define PGPCERTFILE_name (gnutls_cli_opt_strs+2084) #define PGPCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * x509keyfile option description: */ #define X509KEYFILE_DESC (gnutls_cli_opt_strs+2096) #define X509KEYFILE_NAME (gnutls_cli_opt_strs+2134) #define X509KEYFILE_name (gnutls_cli_opt_strs+2146) #define X509KEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509certfile option description: */ #define X509CERTFILE_DESC (gnutls_cli_opt_strs+2158) #define X509CERTFILE_NAME (gnutls_cli_opt_strs+2204) #define X509CERTFILE_name (gnutls_cli_opt_strs+2217) #define X509CERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pgpsubkey option description: */ #define PGPSUBKEY_DESC (gnutls_cli_opt_strs+2230) #define PGPSUBKEY_NAME (gnutls_cli_opt_strs+2262) #define PGPSUBKEY_name (gnutls_cli_opt_strs+2272) #define PGPSUBKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * srpusername option description: */ #define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2282) #define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2302) #define SRPUSERNAME_name (gnutls_cli_opt_strs+2314) #define SRPUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * srppasswd option description: */ #define SRPPASSWD_DESC (gnutls_cli_opt_strs+2326) #define SRPPASSWD_NAME (gnutls_cli_opt_strs+2346) #define SRPPASSWD_name (gnutls_cli_opt_strs+2356) #define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pskusername option description: */ #define PSKUSERNAME_DESC (gnutls_cli_opt_strs+2366) #define PSKUSERNAME_NAME (gnutls_cli_opt_strs+2386) #define PSKUSERNAME_name (gnutls_cli_opt_strs+2398) #define PSKUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pskkey option description: */ #define PSKKEY_DESC (gnutls_cli_opt_strs+2410) #define PSKKEY_NAME (gnutls_cli_opt_strs+2434) #define PSKKEY_name (gnutls_cli_opt_strs+2441) #define PSKKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * port option description: */ #define PORT_DESC (gnutls_cli_opt_strs+2448) #define PORT_NAME (gnutls_cli_opt_strs+2482) #define PORT_name (gnutls_cli_opt_strs+2487) #define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * insecure option description: */ #define INSECURE_DESC (gnutls_cli_opt_strs+2492) #define INSECURE_NAME (gnutls_cli_opt_strs+2553) #define INSECURE_name (gnutls_cli_opt_strs+2562) #define INSECURE_FLAGS (OPTST_DISABLED) /* * ranges option description: */ #define RANGES_DESC (gnutls_cli_opt_strs+2571) #define RANGES_NAME (gnutls_cli_opt_strs+2625) #define RANGES_name (gnutls_cli_opt_strs+2632) #define RANGES_FLAGS (OPTST_DISABLED) /* * benchmark-ciphers option description: */ #define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+2639) #define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+2668) #define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+2686) #define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) /* * benchmark-soft-ciphers option description: */ #define BENCHMARK_SOFT_CIPHERS_DESC (gnutls_cli_opt_strs+2704) #define BENCHMARK_SOFT_CIPHERS_NAME (gnutls_cli_opt_strs+2763) #define BENCHMARK_SOFT_CIPHERS_name (gnutls_cli_opt_strs+2786) #define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED) /* * benchmark-tls-kx option description: */ #define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+2809) #define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+2844) #define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+2861) #define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) /* * benchmark-tls-ciphers option description: */ #define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+2878) #define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+2900) #define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+2922) #define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) /* * list option description: */ #define LIST_DESC (gnutls_cli_opt_strs+2944) #define LIST_NAME (gnutls_cli_opt_strs+2995) #define LIST_name (gnutls_cli_opt_strs+3000) #define LIST_FLAGS (OPTST_DISABLED) /* * noticket option description: */ #define NOTICKET_DESC (gnutls_cli_opt_strs+3005) #define NOTICKET_NAME (gnutls_cli_opt_strs+3033) #define NOTICKET_name (gnutls_cli_opt_strs+3042) #define NOTICKET_FLAGS (OPTST_DISABLED) /* * srtp_profiles option description: */ #define SRTP_PROFILES_DESC (gnutls_cli_opt_strs+3051) #define SRTP_PROFILES_NAME (gnutls_cli_opt_strs+3071) #define SRTP_PROFILES_name (gnutls_cli_opt_strs+3085) #define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * alpn option description: */ #define ALPN_DESC (gnutls_cli_opt_strs+3099) #define ALPN_NAME (gnutls_cli_opt_strs+3126) #define ALPN_name (gnutls_cli_opt_strs+3131) #define ALPN_FLAGS (OPTST_DISABLED | OPTST_STACKED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * heartbeat option description: */ #define HEARTBEAT_DESC (gnutls_cli_opt_strs+3136) #define HEARTBEAT_NAME (gnutls_cli_opt_strs+3163) #define HEARTBEAT_name (gnutls_cli_opt_strs+3173) #define HEARTBEAT_FLAGS (OPTST_DISABLED) /* * recordsize option description: */ #define RECORDSIZE_DESC (gnutls_cli_opt_strs+3183) #define RECORDSIZE_NAME (gnutls_cli_opt_strs+3220) #define RECORDSIZE_name (gnutls_cli_opt_strs+3231) #define RECORDSIZE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * disable-sni option description: */ #define DISABLE_SNI_DESC (gnutls_cli_opt_strs+3242) #define DISABLE_SNI_NAME (gnutls_cli_opt_strs+3285) #define DISABLE_SNI_name (gnutls_cli_opt_strs+3297) #define DISABLE_SNI_FLAGS (OPTST_DISABLED) /* * disable-extensions option description: */ #define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+3309) #define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+3340) #define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+3359) #define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED) /* * inline-commands option description: */ #define INLINE_COMMANDS_DESC (gnutls_cli_opt_strs+3378) #define INLINE_COMMANDS_NAME (gnutls_cli_opt_strs+3414) #define INLINE_COMMANDS_name (gnutls_cli_opt_strs+3430) #define INLINE_COMMANDS_FLAGS (OPTST_DISABLED) /* * inline-commands-prefix option description: */ #define INLINE_COMMANDS_PREFIX_DESC (gnutls_cli_opt_strs+3446) #define INLINE_COMMANDS_PREFIX_NAME (gnutls_cli_opt_strs+3570) #define INLINE_COMMANDS_PREFIX_name (gnutls_cli_opt_strs+3593) #define INLINE_COMMANDS_PREFIX_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * Help/More_Help/Version option descriptions: */ #define HELP_DESC (gnutls_cli_opt_strs+3616) #define HELP_name (gnutls_cli_opt_strs+3660) #ifdef HAVE_WORKING_FORK #define MORE_HELP_DESC (gnutls_cli_opt_strs+3665) #define MORE_HELP_name (gnutls_cli_opt_strs+3710) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC NULL #define MORE_HELP_name NULL #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) #endif #ifdef NO_OPTIONAL_OPT_ARGS # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif #define VER_DESC (gnutls_cli_opt_strs+3720) #define VER_name (gnutls_cli_opt_strs+3756) /* * Declare option callback procedures */ extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, optionUnstackArg, optionVendorOption; static tOptProc doOptDebug, doOptMtu, doOptPgpcertfile, doOptPgpkeyfile, doOptPgpkeyring, doOptRecordsize, doOptX509crlfile, doUsageOpt; #define VER_PROC optionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Define the gnutls-cli Option Descriptions. * This is an array of OPTION_CT entries, one for each * option that the gnutls-cli program responds to. */ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_DEBUG, /* equiv idx, value */ 0, VALUE_OPT_DEBUG, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, /* equiv idx, value */ 1, VALUE_OPT_VERBOSE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ VERBOSE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --verbose */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_TOFU, /* equiv idx, value */ 2, VALUE_OPT_TOFU, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ TOFU_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --tofu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name, /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX }, { /* entry idx, value */ 3, VALUE_OPT_DANE, /* equiv idx, value */ 3, VALUE_OPT_DANE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DANE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --dane */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DANE_DESC, DANE_NAME, DANE_name, /* disablement strs */ NOT_DANE_name, NOT_DANE_PFX }, { /* entry idx, value */ 4, VALUE_OPT_LOCAL_DNS, /* equiv idx, value */ 4, VALUE_OPT_LOCAL_DNS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LOCAL_DNS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --local-dns */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ LOCAL_DNS_DESC, LOCAL_DNS_NAME, LOCAL_DNS_name, /* disablement strs */ NOT_LOCAL_DNS_name, NOT_LOCAL_DNS_PFX }, { /* entry idx, value */ 5, VALUE_OPT_CA_VERIFICATION, /* equiv idx, value */ 5, VALUE_OPT_CA_VERIFICATION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ CA_VERIFICATION_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ca-verification */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ CA_VERIFICATION_DESC, CA_VERIFICATION_NAME, CA_VERIFICATION_name, /* disablement strs */ NOT_CA_VERIFICATION_name, NOT_CA_VERIFICATION_PFX }, { /* entry idx, value */ 6, VALUE_OPT_OCSP, /* equiv idx, value */ 6, VALUE_OPT_OCSP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OCSP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ocsp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name, /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX }, { /* entry idx, value */ 7, VALUE_OPT_RESUME, /* equiv idx, value */ 7, VALUE_OPT_RESUME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RESUME_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --resume */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 8, VALUE_OPT_REHANDSHAKE, /* equiv idx, value */ 8, VALUE_OPT_REHANDSHAKE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ REHANDSHAKE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --rehandshake */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ REHANDSHAKE_DESC, REHANDSHAKE_NAME, REHANDSHAKE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 9, VALUE_OPT_STARTTLS, /* equiv idx, value */ 9, VALUE_OPT_STARTTLS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ STARTTLS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --starttls */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ STARTTLS_DESC, STARTTLS_NAME, STARTTLS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 10, VALUE_OPT_UDP, /* equiv idx, value */ 10, VALUE_OPT_UDP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ UDP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --udp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 11, VALUE_OPT_MTU, /* equiv idx, value */ 11, VALUE_OPT_MTU, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MTU_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --mtu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptMtu, /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 12, VALUE_OPT_CRLF, /* equiv idx, value */ 12, VALUE_OPT_CRLF, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ CRLF_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --crlf */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 13, VALUE_OPT_X509FMTDER, /* equiv idx, value */ 13, VALUE_OPT_X509FMTDER, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509FMTDER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509fmtder */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 14, VALUE_OPT_FINGERPRINT, /* equiv idx, value */ 14, VALUE_OPT_FINGERPRINT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ FINGERPRINT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --fingerprint */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, FINGERPRINT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 15, VALUE_OPT_PRINT_CERT, /* equiv idx, value */ 15, VALUE_OPT_PRINT_CERT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRINT_CERT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --print-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 16, VALUE_OPT_DH_BITS, /* equiv idx, value */ 16, VALUE_OPT_DH_BITS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DH_BITS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --dh-bits */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionNumericVal, /* desc, NAME, name */ DH_BITS_DESC, DH_BITS_NAME, DH_BITS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 17, VALUE_OPT_PRIORITY, /* equiv idx, value */ 17, VALUE_OPT_PRIORITY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRIORITY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --priority */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 18, VALUE_OPT_X509CAFILE, /* equiv idx, value */ 18, VALUE_OPT_X509CAFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CAFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509cafile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 19, VALUE_OPT_X509CRLFILE, /* equiv idx, value */ 19, VALUE_OPT_X509CRLFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CRLFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509crlfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509crlfile, /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 20, VALUE_OPT_PGPKEYFILE, /* equiv idx, value */ 20, VALUE_OPT_PGPKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyfile, /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 21, VALUE_OPT_PGPKEYRING, /* equiv idx, value */ 21, VALUE_OPT_PGPKEYRING, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYRING_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpkeyring */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyring, /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 22, VALUE_OPT_PGPCERTFILE, /* equiv idx, value */ 22, VALUE_OPT_PGPCERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPCERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpcertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpcertfile, /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 23, VALUE_OPT_X509KEYFILE, /* equiv idx, value */ 23, VALUE_OPT_X509KEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509KEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509keyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 24, VALUE_OPT_X509CERTFILE, /* equiv idx, value */ 24, VALUE_OPT_X509CERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 25, VALUE_OPT_PGPSUBKEY, /* equiv idx, value */ 25, VALUE_OPT_PGPSUBKEY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPSUBKEY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpsubkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 26, VALUE_OPT_SRPUSERNAME, /* equiv idx, value */ 26, VALUE_OPT_SRPUSERNAME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPUSERNAME_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srpusername */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, SRPUSERNAME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_SRPPASSWD, /* equiv idx, value */ 27, VALUE_OPT_SRPPASSWD, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWD_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srppasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 28, VALUE_OPT_PSKUSERNAME, /* equiv idx, value */ 28, VALUE_OPT_PSKUSERNAME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKUSERNAME_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pskusername */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, PSKUSERNAME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 29, VALUE_OPT_PSKKEY, /* equiv idx, value */ 29, VALUE_OPT_PSKKEY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKKEY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pskkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 30, VALUE_OPT_PORT, /* equiv idx, value */ 30, VALUE_OPT_PORT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PORT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --port */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 31, VALUE_OPT_INSECURE, /* equiv idx, value */ 31, VALUE_OPT_INSECURE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ INSECURE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --insecure */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 32, VALUE_OPT_RANGES, /* equiv idx, value */ 32, VALUE_OPT_RANGES, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RANGES_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ranges */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ RANGES_DESC, RANGES_NAME, RANGES_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 33, VALUE_OPT_BENCHMARK_CIPHERS, /* equiv idx, value */ 33, VALUE_OPT_BENCHMARK_CIPHERS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_CIPHERS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --benchmark-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, BENCHMARK_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 34, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, /* equiv idx, value */ 34, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 35, VALUE_OPT_BENCHMARK_TLS_KX, /* equiv idx, value */ 35, VALUE_OPT_BENCHMARK_TLS_KX, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_TLS_KX_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --benchmark-tls-kx */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ BENCHMARK_TLS_KX_DESC, BENCHMARK_TLS_KX_NAME, BENCHMARK_TLS_KX_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 36, VALUE_OPT_BENCHMARK_TLS_CIPHERS, /* equiv idx, value */ 36, VALUE_OPT_BENCHMARK_TLS_CIPHERS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_TLS_CIPHERS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --benchmark-tls-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ BENCHMARK_TLS_CIPHERS_DESC, BENCHMARK_TLS_CIPHERS_NAME, BENCHMARK_TLS_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 37, VALUE_OPT_LIST, /* equiv idx, value */ 37, VALUE_OPT_LIST, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LIST_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --list */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 38, VALUE_OPT_NOTICKET, /* equiv idx, value */ 38, VALUE_OPT_NOTICKET, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOTICKET_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --noticket */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 39, VALUE_OPT_SRTP_PROFILES, /* equiv idx, value */ 39, VALUE_OPT_SRTP_PROFILES, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRTP_PROFILES_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srtp_profiles */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, SRTP_PROFILES_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 40, VALUE_OPT_ALPN, /* equiv idx, value */ 40, VALUE_OPT_ALPN, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ ALPN_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --alpn */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionStackArg, /* desc, NAME, name */ ALPN_DESC, ALPN_NAME, ALPN_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 41, VALUE_OPT_HEARTBEAT, /* equiv idx, value */ 41, VALUE_OPT_HEARTBEAT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HEARTBEAT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --heartbeat */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 42, VALUE_OPT_RECORDSIZE, /* equiv idx, value */ 42, VALUE_OPT_RECORDSIZE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RECORDSIZE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --recordsize */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptRecordsize, /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 43, VALUE_OPT_DISABLE_SNI, /* equiv idx, value */ 43, VALUE_OPT_DISABLE_SNI, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_SNI_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --disable-sni */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DISABLE_SNI_DESC, DISABLE_SNI_NAME, DISABLE_SNI_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 44, VALUE_OPT_DISABLE_EXTENSIONS, /* equiv idx, value */ 44, VALUE_OPT_DISABLE_EXTENSIONS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_EXTENSIONS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --disable-extensions */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, DISABLE_EXTENSIONS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 45, VALUE_OPT_INLINE_COMMANDS, /* equiv idx, value */ 45, VALUE_OPT_INLINE_COMMANDS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ INLINE_COMMANDS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --inline-commands */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ INLINE_COMMANDS_DESC, INLINE_COMMANDS_NAME, INLINE_COMMANDS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 46, VALUE_OPT_INLINE_COMMANDS_PREFIX, /* equiv idx, value */ 46, VALUE_OPT_INLINE_COMMANDS_PREFIX, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ INLINE_COMMANDS_PREFIX_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --inline-commands-prefix */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ INLINE_COMMANDS_PREFIX_DESC, INLINE_COMMANDS_PREFIX_NAME, INLINE_COMMANDS_PREFIX_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ VER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ VER_PROC, /* desc, NAME, name */ VER_DESC, NULL, VER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doUsageOpt, /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MORE_HELP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionPagedUsage, /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, /* disablement strs */ NULL, NULL } }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Define the gnutls-cli Option Environment */ #define zPROGNAME (gnutls_cli_opt_strs+3764) #define zUsageTitle (gnutls_cli_opt_strs+3775) #define zRcName NULL #define apzHomeList NULL #define zBugsAddr (gnutls_cli_opt_strs+3888) #define zExplain (gnutls_cli_opt_strs+3907) #define zDetail (gnutls_cli_opt_strs+3910) #define zFullVersion (gnutls_cli_opt_strs+4094) /* extracted from optcode.tlib near line 353 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT static tOptionXlateProc translate_option_strings; #else # define OPTPROC_BASE OPTPROC_NONE # define translate_option_strings NULL #endif /* ENABLE_NLS */ #define gnutls_cli_full_usage (NULL) #define gnutls_cli_short_usage (gnutls_cli_opt_strs+4115) #endif /* not defined __doxygen__ */ /* * Create the static procedure(s) declared above. */ /** * The callout function that invokes the optionUsage function. * * @param pOptions the AutoOpts option description structure * @param pOptDesc the descriptor for the "help" (usage) option. * @noreturn */ static void doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS); /* NOTREACHED */ (void)pOptDesc; (void)pOptions; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0 , 9999 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the mtu option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0, 17000 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509crlfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpkeyfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpkeyring option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpcertfile option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the recordsize option. * * @param pOptions the gnutls-cli options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0, 4096 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } /* extracted from optmain.tlib near line 1188 */ /** * The directory containing the data associated with gnutls-cli. */ #ifndef PKGDATADIR # define PKGDATADIR "" #endif /** * Information about the person or institution that packaged gnutls-cli * for the current distribution. */ #ifndef WITH_PACKAGER # define gnutls_cli_packager_info NULL #else static char const gnutls_cli_packager_info[] = "Packaged by " WITH_PACKAGER # ifdef WITH_PACKAGER_VERSION " ("WITH_PACKAGER_VERSION")" # endif # ifdef WITH_PACKAGER_BUG_REPORTS "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS # endif "\n"; #endif #ifndef __doxygen__ #endif /* __doxygen__ */ /** * The option definitions for gnutls-cli. The one structure that * binds them all. */ tOptions gnutls_cliOptions = { OPTIONS_STRUCT_VERSION, 0, NULL, /* original argc + argv */ ( OPTPROC_BASE + OPTPROC_ERRSTOP + OPTPROC_SHORTOPT + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_NEGATIONS + OPTPROC_REORDER + OPTPROC_GNUUSAGE + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ NULL, NULL, /* extensions/saved state */ optionUsage, /* usage procedure */ translate_option_strings, /* translation procedure */ /* * Indexes to special options */ { INDEX_OPT_MORE_HELP, /* more-help option index */ NO_EQUIVALENT, /* save option index */ NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, 50 /* full option count */, 47 /* user option count */, gnutls_cli_full_usage, gnutls_cli_short_usage, NULL, NULL, PKGDATADIR, gnutls_cli_packager_info }; #if ENABLE_NLS #include #include #include #include #ifdef HAVE_DCGETTEXT # include #endif #include static char * AO_gettext(char const * pz); static void coerce_it(void ** s); /** * AutoGen specific wrapper function for gettext. It relies on the macro _() * to convert from English to the target language, then strdup-duplicates the * result string. It tries the "libopts" domain first, then whatever has been * set via the \a textdomain(3) call. * * @param[in] pz the input text used as a lookup key. * @returns the translated text (if there is one), * or the original text (if not). */ static char * AO_gettext(char const * pz) { char * res; if (pz == NULL) return NULL; #ifdef HAVE_DCGETTEXT /* * While processing the option_xlateable_txt data, try to use the * "libopts" domain. Once we switch to the option descriptor data, * do *not* use that domain. */ if (option_xlateable_txt.field_ct != 0) { res = dgettext("libopts", pz); if (res == pz) res = (char *)(void *)_(pz); } else res = (char *)(void *)_(pz); #else res = (char *)(void *)_(pz); #endif if (res == pz) return res; res = strdup(res); if (res == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); exit(GNUTLS_CLI_EXIT_FAILURE); } return res; } /** * All the pointers we use are marked "* const", but they are stored in * writable memory. Coerce the mutability and set the pointer. */ static void coerce_it(void ** s) { *s = AO_gettext(*s); } /** * Translate all the translatable strings in the gnutls_cliOptions * structure defined above. This is done only once. */ static void translate_option_strings(void) { tOptions * const opts = &gnutls_cliOptions; /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. */ if (option_xlateable_txt.field_ct != 0) { /* * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ tOptDesc * od = opts->pOptDesc; char ** ppz = (char**)(void*)&(option_xlateable_txt); int ix = option_xlateable_txt.field_ct; do { ppz++; /* skip over field_ct */ *ppz = AO_gettext(*ppz); } while (--ix > 0); /* prevent re-translation and disable "libopts" domain lookup */ option_xlateable_txt.field_ct = 0; coerce_it((void*)&(opts->pzCopyright)); coerce_it((void*)&(opts->pzCopyNotice)); coerce_it((void*)&(opts->pzFullVersion)); coerce_it((void*)&(opts->pzUsageTitle)); coerce_it((void*)&(opts->pzExplain)); coerce_it((void*)&(opts->pzDetail)); coerce_it((void*)&(opts->pzPackager)); coerce_it((void*)&(opts->pzShortUsage)); for (ix = opts->optCt; ix > 0; ix--, od++) coerce_it((void*)&(od->pzText)); } if ((opts->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { tOptDesc * od = opts->pOptDesc; int ix; for (ix = opts->optCt; ix > 0; ix--, od++) { coerce_it((void*)&(od->pz_Name)); coerce_it((void*)&(od->pz_DisableName)); coerce_it((void*)&(od->pz_DisablePfx)); } gnutls_cliOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; } } #endif /* ENABLE_NLS */ #ifdef __cplusplus } #endif /* cli-args.c ends here */