/* -*- buffer-read-only: t -*- vi: set ro: * * DO NOT EDIT THIS FILE (serv-args.c) * * It has been AutoGen-ed November 8, 2012 at 11:35:50 PM by AutoGen 5.16 * From the definitions serv-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-serv author or copyright holder. AutoOpts is * licensed under the terms of the LGPL. The redistributable library * (``libopts'') is licensed under the terms of either the LGPL or, at the * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * * The gnutls-serv program is copyrighted and licensed * under the following terms: * * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the * GNU General Public License, version 3 or later * * * gnutls-serv is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * gnutls-serv is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef __doxygen__ #define OPTION_CODE_COMPILE 1 #include "serv-args.h" #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ #define zCopyright (gnutls_serv_opt_strs+0) #define zLicenseDescrip (gnutls_serv_opt_strs+282) #ifndef NULL # define NULL 0 #endif /* * gnutls-serv option static const strings */ static char const gnutls_serv_opt_strs[3106] = /* 0 */ "gnutls-serv @VERSION@\n" "Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the\n" "GNU General Public License, version 3 or later\n" " \n\0" /* 282 */ "gnutls-serv is free software: you can redistribute it and/or modify it\n" "under the terms of the GNU General Public License as published by the Free\n" "Software Foundation, either version 3 of the License, or (at your option)\n" "any later version.\n\n" "gnutls-serv is distributed in the hope that it will be useful, but WITHOUT\n" "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" "more details.\n\n" "You should have received a copy of the GNU General Public License along\n" "with this program. If not, see .\n\0" /* 893 */ "Enable debugging.\0" /* 911 */ "DEBUG\0" /* 917 */ "debug\0" /* 923 */ "Don't accept session tickets\0" /* 952 */ "NOTICKET\0" /* 961 */ "noticket\0" /* 970 */ "Generate Diffie-Hellman and RSA-export parameters\0" /* 1020 */ "GENERATE\0" /* 1029 */ "generate\0" /* 1038 */ "Suppress some messages\0" /* 1061 */ "QUIET\0" /* 1067 */ "quiet\0" /* 1073 */ "Do not use a resumption database\0" /* 1106 */ "NODB\0" /* 1111 */ "nodb\0" /* 1116 */ "Act as an HTTP server\0" /* 1138 */ "HTTP\0" /* 1143 */ "http\0" /* 1148 */ "Act as an Echo server\0" /* 1170 */ "ECHO\0" /* 1175 */ "echo\0" /* 1180 */ "Use DTLS (datagram TLS) over UDP\0" /* 1213 */ "UDP\0" /* 1217 */ "udp\0" /* 1221 */ "Set MTU for datagram TLS\0" /* 1246 */ "MTU\0" /* 1250 */ "mtu\0" /* 1254 */ "Offer SRTP profiles\0" /* 1274 */ "SRTP_PROFILES\0" /* 1288 */ "srtp-profiles\0" /* 1302 */ "Do not request a client certificate\0" /* 1338 */ "DISABLE_CLIENT_CERT\0" /* 1358 */ "disable-client-cert\0" /* 1378 */ "Require a client certificate\0" /* 1407 */ "REQUIRE_CLIENT_CERT\0" /* 1427 */ "require-client-cert\0" /* 1447 */ "Activate heartbeat support\0" /* 1474 */ "HEARTBEAT\0" /* 1484 */ "heartbeat\0" /* 1494 */ "Use DER format for certificates to read from\0" /* 1539 */ "X509FMTDER\0" /* 1550 */ "x509fmtder\0" /* 1561 */ "Priorities string\0" /* 1579 */ "PRIORITY\0" /* 1588 */ "priority\0" /* 1597 */ "DH params file to use\0" /* 1619 */ "DHPARAMS\0" /* 1628 */ "dhparams\0" /* 1637 */ "Certificate file or PKCS #11 URL to use\0" /* 1677 */ "X509CAFILE\0" /* 1688 */ "x509cafile\0" /* 1699 */ "CRL file to use\0" /* 1715 */ "X509CRLFILE\0" /* 1727 */ "x509crlfile\0" /* 1739 */ "PGP Key file to use\0" /* 1759 */ "PGPKEYFILE\0" /* 1770 */ "pgpkeyfile\0" /* 1781 */ "PGP Key ring file to use\0" /* 1806 */ "PGPKEYRING\0" /* 1817 */ "pgpkeyring\0" /* 1828 */ "PGP Public Key (certificate) file to use\0" /* 1869 */ "PGPCERTFILE\0" /* 1881 */ "pgpcertfile\0" /* 1893 */ "X.509 key file or PKCS #11 URL to use\0" /* 1931 */ "X509KEYFILE\0" /* 1943 */ "x509keyfile\0" /* 1955 */ "X.509 Certificate file or PKCS #11 URL to use\0" /* 2001 */ "X509CERTFILE\0" /* 2014 */ "x509certfile\0" /* 2027 */ "Alternative X.509 key file or PKCS #11 URL to use\0" /* 2077 */ "X509DSAKEYFILE\0" /* 2092 */ "x509dsakeyfile\0" /* 2107 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0" /* 2165 */ "X509DSACERTFILE\0" /* 2181 */ "x509dsacertfile\0" /* 2197 */ "X509ECCKEYFILE\0" /* 2212 */ "x509ecckeyfile\0" /* 2227 */ "X509ECCCERTFILE\0" /* 2243 */ "x509ecccertfile\0" /* 2259 */ "PGP subkey to use (hex or auto)\0" /* 2291 */ "PGPSUBKEY\0" /* 2301 */ "pgpsubkey\0" /* 2311 */ "SRP password file to use\0" /* 2336 */ "SRPPASSWD\0" /* 2346 */ "srppasswd\0" /* 2356 */ "SRP password configuration file to use\0" /* 2395 */ "SRPPASSWDCONF\0" /* 2409 */ "srppasswdconf\0" /* 2423 */ "PSK password file to use\0" /* 2448 */ "PSKPASSWD\0" /* 2458 */ "pskpasswd\0" /* 2468 */ "PSK identity hint to use\0" /* 2493 */ "PSKHINT\0" /* 2501 */ "pskhint\0" /* 2509 */ "The OCSP response to send to client\0" /* 2545 */ "OCSP_RESPONSE\0" /* 2559 */ "ocsp-response\0" /* 2573 */ "The port to connect to\0" /* 2596 */ "PORT\0" /* 2601 */ "port\0" /* 2606 */ "Print a list of the supported algorithms and modes\0" /* 2657 */ "LIST\0" /* 2662 */ "list\0" /* 2667 */ "Display extended usage information and exit\0" /* 2711 */ "help\0" /* 2716 */ "Extended usage information passed thru pager\0" /* 2761 */ "more-help\0" /* 2771 */ "Output version information and exit\0" /* 2807 */ "version\0" /* 2815 */ "GNUTLS_SERV\0" /* 2827 */ "gnutls-serv - GnuTLS server - Ver. @VERSION@\n" "USAGE: %s [ - [] | --[{=| }] ]...\n\0" /* 2930 */ "bug-gnutls@gnu.org\0" /* 2949 */ "\n\n\0" /* 2952 */ "\n" "Server program that listens to incoming TLS connections.\n\0" /* 3011 */ "gnutls-serv @VERSION@\0" /* 3033 */ "Usage: gnutls-serv [options]\n" "gnutls-serv --help for usage instructions.\n"; /* * debug option description: */ #define DEBUG_DESC (gnutls_serv_opt_strs+893) #define DEBUG_NAME (gnutls_serv_opt_strs+911) #define DEBUG_name (gnutls_serv_opt_strs+917) #define DEBUG_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * noticket option description: */ #define NOTICKET_DESC (gnutls_serv_opt_strs+923) #define NOTICKET_NAME (gnutls_serv_opt_strs+952) #define NOTICKET_name (gnutls_serv_opt_strs+961) #define NOTICKET_FLAGS (OPTST_DISABLED) /* * generate option description: */ #define GENERATE_DESC (gnutls_serv_opt_strs+970) #define GENERATE_NAME (gnutls_serv_opt_strs+1020) #define GENERATE_name (gnutls_serv_opt_strs+1029) #define GENERATE_FLAGS (OPTST_DISABLED) /* * quiet option description: */ #define QUIET_DESC (gnutls_serv_opt_strs+1038) #define QUIET_NAME (gnutls_serv_opt_strs+1061) #define QUIET_name (gnutls_serv_opt_strs+1067) #define QUIET_FLAGS (OPTST_DISABLED) /* * nodb option description: */ #define NODB_DESC (gnutls_serv_opt_strs+1073) #define NODB_NAME (gnutls_serv_opt_strs+1106) #define NODB_name (gnutls_serv_opt_strs+1111) #define NODB_FLAGS (OPTST_DISABLED) /* * http option description: */ #define HTTP_DESC (gnutls_serv_opt_strs+1116) #define HTTP_NAME (gnutls_serv_opt_strs+1138) #define HTTP_name (gnutls_serv_opt_strs+1143) #define HTTP_FLAGS (OPTST_DISABLED) /* * echo option description: */ #define ECHO_DESC (gnutls_serv_opt_strs+1148) #define ECHO_NAME (gnutls_serv_opt_strs+1170) #define ECHO_name (gnutls_serv_opt_strs+1175) #define ECHO_FLAGS (OPTST_DISABLED) /* * udp option description: */ #define UDP_DESC (gnutls_serv_opt_strs+1180) #define UDP_NAME (gnutls_serv_opt_strs+1213) #define UDP_name (gnutls_serv_opt_strs+1217) #define UDP_FLAGS (OPTST_DISABLED) /* * mtu option description: */ #define MTU_DESC (gnutls_serv_opt_strs+1221) #define MTU_NAME (gnutls_serv_opt_strs+1246) #define MTU_name (gnutls_serv_opt_strs+1250) #define MTU_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * srtp_profiles option description: */ #define SRTP_PROFILES_DESC (gnutls_serv_opt_strs+1254) #define SRTP_PROFILES_NAME (gnutls_serv_opt_strs+1274) #define SRTP_PROFILES_name (gnutls_serv_opt_strs+1288) #define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * disable-client-cert option description: */ #define DISABLE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1302) #define DISABLE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1338) #define DISABLE_CLIENT_CERT_name (gnutls_serv_opt_strs+1358) #define DISABLE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /* * require-client-cert option description: */ #define REQUIRE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1378) #define REQUIRE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1407) #define REQUIRE_CLIENT_CERT_name (gnutls_serv_opt_strs+1427) #define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /* * heartbeat option description: */ #define HEARTBEAT_DESC (gnutls_serv_opt_strs+1447) #define HEARTBEAT_NAME (gnutls_serv_opt_strs+1474) #define HEARTBEAT_name (gnutls_serv_opt_strs+1484) #define HEARTBEAT_FLAGS (OPTST_DISABLED) /* * x509fmtder option description: */ #define X509FMTDER_DESC (gnutls_serv_opt_strs+1494) #define X509FMTDER_NAME (gnutls_serv_opt_strs+1539) #define X509FMTDER_name (gnutls_serv_opt_strs+1550) #define X509FMTDER_FLAGS (OPTST_DISABLED) /* * priority option description: */ #define PRIORITY_DESC (gnutls_serv_opt_strs+1561) #define PRIORITY_NAME (gnutls_serv_opt_strs+1579) #define PRIORITY_name (gnutls_serv_opt_strs+1588) #define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * dhparams option description: */ #define DHPARAMS_DESC (gnutls_serv_opt_strs+1597) #define DHPARAMS_NAME (gnutls_serv_opt_strs+1619) #define DHPARAMS_name (gnutls_serv_opt_strs+1628) #define DHPARAMS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * x509cafile option description: */ #define X509CAFILE_DESC (gnutls_serv_opt_strs+1637) #define X509CAFILE_NAME (gnutls_serv_opt_strs+1677) #define X509CAFILE_name (gnutls_serv_opt_strs+1688) #define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509crlfile option description: */ #define X509CRLFILE_DESC (gnutls_serv_opt_strs+1699) #define X509CRLFILE_NAME (gnutls_serv_opt_strs+1715) #define X509CRLFILE_name (gnutls_serv_opt_strs+1727) #define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyfile option description: */ #define PGPKEYFILE_DESC (gnutls_serv_opt_strs+1739) #define PGPKEYFILE_NAME (gnutls_serv_opt_strs+1759) #define PGPKEYFILE_name (gnutls_serv_opt_strs+1770) #define PGPKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpkeyring option description: */ #define PGPKEYRING_DESC (gnutls_serv_opt_strs+1781) #define PGPKEYRING_NAME (gnutls_serv_opt_strs+1806) #define PGPKEYRING_name (gnutls_serv_opt_strs+1817) #define PGPKEYRING_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pgpcertfile option description: */ #define PGPCERTFILE_DESC (gnutls_serv_opt_strs+1828) #define PGPCERTFILE_NAME (gnutls_serv_opt_strs+1869) #define PGPCERTFILE_name (gnutls_serv_opt_strs+1881) #define PGPCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * x509keyfile option description: */ #define X509KEYFILE_DESC (gnutls_serv_opt_strs+1893) #define X509KEYFILE_NAME (gnutls_serv_opt_strs+1931) #define X509KEYFILE_name (gnutls_serv_opt_strs+1943) #define X509KEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509certfile option description: */ #define X509CERTFILE_DESC (gnutls_serv_opt_strs+1955) #define X509CERTFILE_NAME (gnutls_serv_opt_strs+2001) #define X509CERTFILE_name (gnutls_serv_opt_strs+2014) #define X509CERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509dsakeyfile option description: */ #define X509DSAKEYFILE_DESC (gnutls_serv_opt_strs+2027) #define X509DSAKEYFILE_NAME (gnutls_serv_opt_strs+2077) #define X509DSAKEYFILE_name (gnutls_serv_opt_strs+2092) #define X509DSAKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509dsacertfile option description: */ #define X509DSACERTFILE_DESC (gnutls_serv_opt_strs+2107) #define X509DSACERTFILE_NAME (gnutls_serv_opt_strs+2165) #define X509DSACERTFILE_name (gnutls_serv_opt_strs+2181) #define X509DSACERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509ecckeyfile option description: */ #define X509ECCKEYFILE_DESC (gnutls_serv_opt_strs+2027) #define X509ECCKEYFILE_NAME (gnutls_serv_opt_strs+2197) #define X509ECCKEYFILE_name (gnutls_serv_opt_strs+2212) #define X509ECCKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * x509ecccertfile option description: */ #define X509ECCCERTFILE_DESC (gnutls_serv_opt_strs+2107) #define X509ECCCERTFILE_NAME (gnutls_serv_opt_strs+2227) #define X509ECCCERTFILE_name (gnutls_serv_opt_strs+2243) #define X509ECCCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * pgpsubkey option description: */ #define PGPSUBKEY_DESC (gnutls_serv_opt_strs+2259) #define PGPSUBKEY_NAME (gnutls_serv_opt_strs+2291) #define PGPSUBKEY_name (gnutls_serv_opt_strs+2301) #define PGPSUBKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * srppasswd option description: */ #define SRPPASSWD_DESC (gnutls_serv_opt_strs+2311) #define SRPPASSWD_NAME (gnutls_serv_opt_strs+2336) #define SRPPASSWD_name (gnutls_serv_opt_strs+2346) #define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * srppasswdconf option description: */ #define SRPPASSWDCONF_DESC (gnutls_serv_opt_strs+2356) #define SRPPASSWDCONF_NAME (gnutls_serv_opt_strs+2395) #define SRPPASSWDCONF_name (gnutls_serv_opt_strs+2409) #define SRPPASSWDCONF_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pskpasswd option description: */ #define PSKPASSWD_DESC (gnutls_serv_opt_strs+2423) #define PSKPASSWD_NAME (gnutls_serv_opt_strs+2448) #define PSKPASSWD_name (gnutls_serv_opt_strs+2458) #define PSKPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * pskhint option description: */ #define PSKHINT_DESC (gnutls_serv_opt_strs+2468) #define PSKHINT_NAME (gnutls_serv_opt_strs+2493) #define PSKHINT_name (gnutls_serv_opt_strs+2501) #define PSKHINT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* * ocsp-response option description: */ #define OCSP_RESPONSE_DESC (gnutls_serv_opt_strs+2509) #define OCSP_RESPONSE_NAME (gnutls_serv_opt_strs+2545) #define OCSP_RESPONSE_name (gnutls_serv_opt_strs+2559) #define OCSP_RESPONSE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * port option description: */ #define PORT_DESC (gnutls_serv_opt_strs+2573) #define PORT_NAME (gnutls_serv_opt_strs+2596) #define PORT_name (gnutls_serv_opt_strs+2601) #define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* * list option description: */ #define LIST_DESC (gnutls_serv_opt_strs+2606) #define LIST_NAME (gnutls_serv_opt_strs+2657) #define LIST_name (gnutls_serv_opt_strs+2662) #define LIST_FLAGS (OPTST_DISABLED) /* * Help/More_Help/Version option descriptions: */ #define HELP_DESC (gnutls_serv_opt_strs+2667) #define HELP_name (gnutls_serv_opt_strs+2711) #ifdef HAVE_WORKING_FORK #define MORE_HELP_DESC (gnutls_serv_opt_strs+2716) #define MORE_HELP_name (gnutls_serv_opt_strs+2761) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC NULL #define MORE_HELP_name NULL #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) #endif #ifdef NO_OPTIONAL_OPT_ARGS # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif #define VER_DESC (gnutls_serv_opt_strs+2771) #define VER_name (gnutls_serv_opt_strs+2807) /* * Declare option callback procedures */ extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, optionUnstackArg, optionVendorOption; static tOptProc doOptDebug, doOptDhparams, doOptMtu, doOptOcsp_Response, doOptPgpcertfile, doOptPgpkeyfile, doOptPgpkeyring, doOptPskpasswd, doOptSrppasswd, doOptSrppasswdconf, doOptX509crlfile, doUsageOpt; #define VER_PROC optionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Define the gnutls-serv Option Descriptions. * This is an array of OPTION_CT entries, one for each * option that the gnutls-serv program responds to. */ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_DEBUG, /* equiv idx, value */ 0, VALUE_OPT_DEBUG, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_NOTICKET, /* equiv idx, value */ 1, VALUE_OPT_NOTICKET, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOTICKET_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --noticket */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_GENERATE, /* equiv idx, value */ 2, VALUE_OPT_GENERATE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ GENERATE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --generate */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ GENERATE_DESC, GENERATE_NAME, GENERATE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 3, VALUE_OPT_QUIET, /* equiv idx, value */ 3, VALUE_OPT_QUIET, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ QUIET_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --quiet */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 4, VALUE_OPT_NODB, /* equiv idx, value */ 4, VALUE_OPT_NODB, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NODB_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --nodb */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ NODB_DESC, NODB_NAME, NODB_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 5, VALUE_OPT_HTTP, /* equiv idx, value */ 5, VALUE_OPT_HTTP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HTTP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --http */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ HTTP_DESC, HTTP_NAME, HTTP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 6, VALUE_OPT_ECHO, /* equiv idx, value */ 6, VALUE_OPT_ECHO, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ ECHO_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --echo */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ ECHO_DESC, ECHO_NAME, ECHO_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 7, VALUE_OPT_UDP, /* equiv idx, value */ 7, VALUE_OPT_UDP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ UDP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --udp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 8, VALUE_OPT_MTU, /* equiv idx, value */ 8, VALUE_OPT_MTU, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MTU_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --mtu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptMtu, /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 9, VALUE_OPT_SRTP_PROFILES, /* equiv idx, value */ 9, VALUE_OPT_SRTP_PROFILES, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRTP_PROFILES_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srtp_profiles */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, SRTP_PROFILES_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT, /* equiv idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_CLIENT_CERT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --disable-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT, /* equiv idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ REQUIRE_CLIENT_CERT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --require-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ REQUIRE_CLIENT_CERT_DESC, REQUIRE_CLIENT_CERT_NAME, REQUIRE_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 12, VALUE_OPT_HEARTBEAT, /* equiv idx, value */ 12, VALUE_OPT_HEARTBEAT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HEARTBEAT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --heartbeat */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 13, VALUE_OPT_X509FMTDER, /* equiv idx, value */ 13, VALUE_OPT_X509FMTDER, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509FMTDER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509fmtder */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 14, VALUE_OPT_PRIORITY, /* equiv idx, value */ 14, VALUE_OPT_PRIORITY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRIORITY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --priority */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 15, VALUE_OPT_DHPARAMS, /* equiv idx, value */ 15, VALUE_OPT_DHPARAMS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DHPARAMS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --dhparams */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDhparams, /* desc, NAME, name */ DHPARAMS_DESC, DHPARAMS_NAME, DHPARAMS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 16, VALUE_OPT_X509CAFILE, /* equiv idx, value */ 16, VALUE_OPT_X509CAFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CAFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509cafile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 17, VALUE_OPT_X509CRLFILE, /* equiv idx, value */ 17, VALUE_OPT_X509CRLFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CRLFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509crlfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509crlfile, /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 18, VALUE_OPT_PGPKEYFILE, /* equiv idx, value */ 18, VALUE_OPT_PGPKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyfile, /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 19, VALUE_OPT_PGPKEYRING, /* equiv idx, value */ 19, VALUE_OPT_PGPKEYRING, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYRING_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpkeyring */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyring, /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 20, VALUE_OPT_PGPCERTFILE, /* equiv idx, value */ 20, VALUE_OPT_PGPCERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPCERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpcertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpcertfile, /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 21, VALUE_OPT_X509KEYFILE, /* equiv idx, value */ 21, VALUE_OPT_X509KEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509KEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509keyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 22, VALUE_OPT_X509CERTFILE, /* equiv idx, value */ 22, VALUE_OPT_X509CERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 23, VALUE_OPT_X509DSAKEYFILE, /* equiv idx, value */ 23, VALUE_OPT_X509DSAKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSAKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509dsakeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, X509DSAKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 24, VALUE_OPT_X509DSACERTFILE, /* equiv idx, value */ 24, VALUE_OPT_X509DSACERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSACERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509dsacertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, X509DSACERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 25, VALUE_OPT_X509ECCKEYFILE, /* equiv idx, value */ 25, VALUE_OPT_X509ECCKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509ecckeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, X509ECCKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 26, VALUE_OPT_X509ECCCERTFILE, /* equiv idx, value */ 26, VALUE_OPT_X509ECCCERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCCERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509ecccertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, X509ECCCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_PGPSUBKEY, /* equiv idx, value */ 27, VALUE_OPT_PGPSUBKEY, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPSUBKEY_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pgpsubkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 28, VALUE_OPT_SRPPASSWD, /* equiv idx, value */ 28, VALUE_OPT_SRPPASSWD, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWD_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srppasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptSrppasswd, /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 29, VALUE_OPT_SRPPASSWDCONF, /* equiv idx, value */ 29, VALUE_OPT_SRPPASSWDCONF, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWDCONF_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srppasswdconf */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptSrppasswdconf, /* desc, NAME, name */ SRPPASSWDCONF_DESC, SRPPASSWDCONF_NAME, SRPPASSWDCONF_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 30, VALUE_OPT_PSKPASSWD, /* equiv idx, value */ 30, VALUE_OPT_PSKPASSWD, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKPASSWD_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pskpasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPskpasswd, /* desc, NAME, name */ PSKPASSWD_DESC, PSKPASSWD_NAME, PSKPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 31, VALUE_OPT_PSKHINT, /* equiv idx, value */ 31, VALUE_OPT_PSKHINT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKHINT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --pskhint */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ PSKHINT_DESC, PSKHINT_NAME, PSKHINT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 32, VALUE_OPT_OCSP_RESPONSE, /* equiv idx, value */ 32, VALUE_OPT_OCSP_RESPONSE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OCSP_RESPONSE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ocsp-response */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptOcsp_Response, /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, OCSP_RESPONSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 33, VALUE_OPT_PORT, /* equiv idx, value */ 33, VALUE_OPT_PORT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PORT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --port */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionNumericVal, /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 34, VALUE_OPT_LIST, /* equiv idx, value */ 34, VALUE_OPT_LIST, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LIST_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --list */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ VER_FLAGS, 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-serv Option Environment */ #define zPROGNAME (gnutls_serv_opt_strs+2815) #define zUsageTitle (gnutls_serv_opt_strs+2827) #define zRcName NULL #define apzHomeList NULL #define zBugsAddr (gnutls_serv_opt_strs+2930) #define zExplain (gnutls_serv_opt_strs+2949) #define zDetail (gnutls_serv_opt_strs+2952) #define zFullVersion (gnutls_serv_opt_strs+3011) /* 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_serv_full_usage (NULL) #define gnutls_serv_short_usage (gnutls_serv_opt_strs+3033) #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_servOptions, GNUTLS_SERV_EXIT_SUCCESS); /* NOTREACHED */ (void)pOptDesc; (void)pOptions; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug option. * * @param pOptions the gnutls-serv 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-serv 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 dhparams option. * * @param pOptions the gnutls-serv options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptDhparams(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509crlfile option. * * @param pOptions the gnutls-serv 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-serv 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-serv 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-serv 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); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the srppasswd option. * * @param pOptions the gnutls-serv options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptSrppasswd(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the srppasswdconf option. * * @param pOptions the gnutls-serv options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptSrppasswdconf(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pskpasswd option. * * @param pOptions the gnutls-serv options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptPskpasswd(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the ocsp-response option. * * @param pOptions the gnutls-serv options data structure * @param pOptDesc the option descriptor for this option. */ static void doOptOcsp_Response(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; optionFileCheck(pOptions, pOptDesc, type, mode); } /* extracted from optmain.tlib near line 1113 */ /** * The directory containing the data associated with gnutls-serv. */ #ifndef PKGDATADIR # define PKGDATADIR "" #endif /** * Information about the person or institution that packaged gnutls-serv * for the current distribution. */ #ifndef WITH_PACKAGER # define gnutls_serv_packager_info NULL #else static char const gnutls_serv_packager_info[] = "Packaged by " WITH_PACKAGER # ifdef WITH_PACKAGER_VERSION " ("WITH_PACKAGER_VERSION")" # endif # ifdef WITH_PACKAGER_BUG_REPORTS "\nReport gnutls_serv bugs to " WITH_PACKAGER_BUG_REPORTS # endif "\n"; #endif #ifndef __doxygen__ #endif /* __doxygen__ */ /** * The option definitions for gnutls-serv. The one structure that * binds them all. */ tOptions gnutls_servOptions = { OPTIONS_STRUCT_VERSION, 0, NULL, /* original argc + argv */ ( OPTPROC_BASE + OPTPROC_ERRSTOP + OPTPROC_SHORTOPT + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_NO_ARGS + OPTPROC_GNUUSAGE + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ NULL, NULL, /* extensions/saved state */ optionUsage, /* usage procedure */ translate_option_strings, /* translation procedure */ /* * Indexes to special options */ { INDEX_OPT_MORE_HELP, /* more-help option index */ NO_EQUIVALENT, /* save option index */ NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, 38 /* full option count */, 35 /* user option count */, gnutls_serv_full_usage, gnutls_serv_short_usage, NULL, NULL, PKGDATADIR, gnutls_serv_packager_info }; #if ENABLE_NLS #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_SERV_EXIT_FAILURE); } return pzRes; } static void coerce_it(void** s) { *s = AO_gettext(*s); } /** * Translate all the translatable strings in the gnutls_servOptions * structure defined above. This is done only once. */ static void translate_option_strings(void) { tOptions * const pOpt = &gnutls_servOptions; /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. */ if (option_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_servOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT; } } #endif /* ENABLE_NLS */ #ifdef __cplusplus } #endif /* serv-args.c ends here */