/* -*- buffer-read-only: t -*- vi: set ro: * * DO NOT EDIT THIS FILE (serv-args.c) * * It has been AutoGen-ed * From the definitions serv-args.def * and the template file options * * Generated from AutoOpts 41:1:16 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen * by the gnutls-serv author or copyright holder. AutoOpts is * licensed under the terms of the LGPL. The redistributable library * (``libopts'') is licensed under the terms of either the LGPL or, at the * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * * The gnutls-serv program is copyrighted and licensed * under the following terms: * * Copyright (C) 2000-@YEAR@ Free Software Foundation, and others, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the GNU General Public License, * version 3 or later * * gnutls-serv is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * gnutls-serv is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef __doxygen__ #define OPTION_CODE_COMPILE 1 #include "serv-args.h" #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif extern FILE * option_usage_fp; #define zCopyright (gnutls_serv_opt_strs+0) #define zLicenseDescrip (gnutls_serv_opt_strs+292) #ifndef NULL # define NULL 0 #endif /** * static const strings for gnutls-serv options */ static char const gnutls_serv_opt_strs[3442] = /* 0 */ "gnutls-serv @VERSION@\n" "Copyright (C) 2000-@YEAR@ Free Software Foundation, and others, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the GNU General Public License,\n" "version 3 or later \n\0" /* 292 */ "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" /* 903 */ "Enable debugging\0" /* 920 */ "DEBUG\0" /* 926 */ "debug\0" /* 932 */ "Server's hostname for server name extension\0" /* 976 */ "SNI_HOSTNAME\0" /* 989 */ "sni-hostname\0" /* 1002 */ "Send fatal alert on sni-hostname mismatch\0" /* 1044 */ "SNI_HOSTNAME_FATAL\0" /* 1063 */ "sni-hostname-fatal\0" /* 1082 */ "Specify ALPN protocol to be enabled by the server\0" /* 1132 */ "ALPN\0" /* 1137 */ "alpn\0" /* 1142 */ "Send fatal alert on non-matching ALPN name\0" /* 1185 */ "ALPN_FATAL\0" /* 1196 */ "alpn-fatal\0" /* 1207 */ "Don't accept session tickets\0" /* 1236 */ "NOTICKET\0" /* 1245 */ "noticket\0" /* 1254 */ "Don't require cookie on DTLS sessions\0" /* 1292 */ "NOCOOKIE\0" /* 1301 */ "nocookie\0" /* 1310 */ "Generate Diffie-Hellman parameters\0" /* 1345 */ "GENERATE\0" /* 1354 */ "generate\0" /* 1363 */ "Suppress some messages\0" /* 1386 */ "QUIET\0" /* 1392 */ "quiet\0" /* 1398 */ "Do not use a resumption database\0" /* 1431 */ "NODB\0" /* 1436 */ "nodb\0" /* 1441 */ "Act as an HTTP server\0" /* 1463 */ "HTTP\0" /* 1468 */ "http\0" /* 1473 */ "Act as an Echo server\0" /* 1495 */ "ECHO\0" /* 1500 */ "echo\0" /* 1505 */ "Use DTLS (datagram TLS) over UDP\0" /* 1538 */ "UDP\0" /* 1542 */ "udp\0" /* 1546 */ "Set MTU for datagram TLS\0" /* 1571 */ "MTU\0" /* 1575 */ "mtu\0" /* 1579 */ "Offer SRTP profiles\0" /* 1599 */ "SRTP_PROFILES\0" /* 1613 */ "srtp-profiles\0" /* 1627 */ "Do not request a client certificate\0" /* 1663 */ "DISABLE_CLIENT_CERT\0" /* 1683 */ "disable-client-cert\0" /* 1703 */ "Require a client certificate\0" /* 1732 */ "REQUIRE_CLIENT_CERT\0" /* 1752 */ "require-client-cert\0" /* 1772 */ "If a client certificate is sent then verify it.\0" /* 1820 */ "VERIFY_CLIENT_CERT\0" /* 1839 */ "verify-client-cert\0" /* 1858 */ "Activate heartbeat support\0" /* 1885 */ "HEARTBEAT\0" /* 1895 */ "heartbeat\0" /* 1905 */ "Use DER format for certificates to read from\0" /* 1950 */ "X509FMTDER\0" /* 1961 */ "x509fmtder\0" /* 1972 */ "Priorities string\0" /* 1990 */ "PRIORITY\0" /* 1999 */ "priority\0" /* 2008 */ "DH params file to use\0" /* 2030 */ "DHPARAMS\0" /* 2039 */ "dhparams\0" /* 2048 */ "Certificate file or PKCS #11 URL to use\0" /* 2088 */ "X509CAFILE\0" /* 2099 */ "x509cafile\0" /* 2110 */ "CRL file to use\0" /* 2126 */ "X509CRLFILE\0" /* 2138 */ "x509crlfile\0" /* 2150 */ "PGP Key file to use (deprecated)\0" /* 2183 */ "PGPKEYFILE\0" /* 2194 */ "pgpkeyfile\0" /* 2205 */ "X.509 key file or PKCS #11 URL to use\0" /* 2243 */ "X509KEYFILE\0" /* 2255 */ "x509keyfile\0" /* 2267 */ "X.509 Certificate file or PKCS #11 URL to use\0" /* 2313 */ "X509CERTFILE\0" /* 2326 */ "x509certfile\0" /* 2339 */ "an alias for the 'x509keyfile' option (deprecated)\0" /* 2390 */ "x509dsakeyfile\0" /* 2405 */ "an alias for the 'x509certfile' option (deprecated)\0" /* 2457 */ "x509dsacertfile\0" /* 2473 */ "x509ecckeyfile\0" /* 2488 */ "x509ecccertfile\0" /* 2504 */ "SRP password file to use\0" /* 2529 */ "SRPPASSWD\0" /* 2539 */ "srppasswd\0" /* 2549 */ "SRP password configuration file to use\0" /* 2588 */ "SRPPASSWDCONF\0" /* 2602 */ "srppasswdconf\0" /* 2616 */ "PSK password file to use\0" /* 2641 */ "PSKPASSWD\0" /* 2651 */ "pskpasswd\0" /* 2661 */ "PSK identity hint to use\0" /* 2686 */ "PSKHINT\0" /* 2694 */ "pskhint\0" /* 2702 */ "The OCSP response to send to client\0" /* 2738 */ "OCSP_RESPONSE\0" /* 2752 */ "ocsp-response\0" /* 2766 */ "Ignore any errors when setting the OCSP response\0" /* 2815 */ "IGNORE_OCSP_RESPONSE_ERRORS\0" /* 2843 */ "ignore-ocsp-response-errors\0" /* 2871 */ "The port to connect to\0" /* 2894 */ "PORT\0" /* 2899 */ "port\0" /* 2904 */ "Print a list of the supported algorithms and modes\0" /* 2955 */ "LIST\0" /* 2960 */ "list\0" /* 2965 */ "Specify the PKCS #11 provider library\0" /* 3003 */ "PROVIDER\0" /* 3012 */ "provider\0" /* 3021 */ "display extended usage information and exit\0" /* 3065 */ "help\0" /* 3070 */ "extended usage information passed thru pager\0" /* 3115 */ "more-help\0" /* 3125 */ "output version information and exit\0" /* 3161 */ "version\0" /* 3169 */ "GNUTLS_SERV\0" /* 3181 */ "gnutls-serv - GnuTLS server\n" "Usage: %s [ - [] | --[{=| }] ]...\n\0" /* 3267 */ "@PACKAGE_BUGREPORT@\0" /* 3287 */ "\n\0" /* 3289 */ "Server program that listens to incoming TLS connections.\n\0" /* 3347 */ "gnutls-serv @VERSION@\0" /* 3369 */ "Usage: gnutls-serv [options]\n" "gnutls-serv --help for usage instructions.\n"; /** * debug option description: */ /** Descriptive text for the debug option */ #define DEBUG_DESC (gnutls_serv_opt_strs+903) /** Upper-cased name for the debug option */ #define DEBUG_NAME (gnutls_serv_opt_strs+920) /** Name string for the debug option */ #define DEBUG_name (gnutls_serv_opt_strs+926) /** Compiled in flag settings for the debug option */ #define DEBUG_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /** * sni-hostname option description: */ /** Descriptive text for the sni-hostname option */ #define SNI_HOSTNAME_DESC (gnutls_serv_opt_strs+932) /** Upper-cased name for the sni-hostname option */ #define SNI_HOSTNAME_NAME (gnutls_serv_opt_strs+976) /** Name string for the sni-hostname option */ #define SNI_HOSTNAME_name (gnutls_serv_opt_strs+989) /** Compiled in flag settings for the sni-hostname option */ #define SNI_HOSTNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * sni-hostname-fatal option description: */ /** Descriptive text for the sni-hostname-fatal option */ #define SNI_HOSTNAME_FATAL_DESC (gnutls_serv_opt_strs+1002) /** Upper-cased name for the sni-hostname-fatal option */ #define SNI_HOSTNAME_FATAL_NAME (gnutls_serv_opt_strs+1044) /** Name string for the sni-hostname-fatal option */ #define SNI_HOSTNAME_FATAL_name (gnutls_serv_opt_strs+1063) /** Compiled in flag settings for the sni-hostname-fatal option */ #define SNI_HOSTNAME_FATAL_FLAGS (OPTST_DISABLED) /** * alpn option description: */ /** Descriptive text for the alpn option */ #define ALPN_DESC (gnutls_serv_opt_strs+1082) /** Upper-cased name for the alpn option */ #define ALPN_NAME (gnutls_serv_opt_strs+1132) /** Name string for the alpn option */ #define ALPN_name (gnutls_serv_opt_strs+1137) /** Compiled in flag settings for the alpn option */ #define ALPN_FLAGS (OPTST_DISABLED | OPTST_STACKED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * alpn-fatal option description: */ /** Descriptive text for the alpn-fatal option */ #define ALPN_FATAL_DESC (gnutls_serv_opt_strs+1142) /** Upper-cased name for the alpn-fatal option */ #define ALPN_FATAL_NAME (gnutls_serv_opt_strs+1185) /** Name string for the alpn-fatal option */ #define ALPN_FATAL_name (gnutls_serv_opt_strs+1196) /** Compiled in flag settings for the alpn-fatal option */ #define ALPN_FATAL_FLAGS (OPTST_DISABLED) /** * noticket option description: */ /** Descriptive text for the noticket option */ #define NOTICKET_DESC (gnutls_serv_opt_strs+1207) /** Upper-cased name for the noticket option */ #define NOTICKET_NAME (gnutls_serv_opt_strs+1236) /** Name string for the noticket option */ #define NOTICKET_name (gnutls_serv_opt_strs+1245) /** Compiled in flag settings for the noticket option */ #define NOTICKET_FLAGS (OPTST_DISABLED) /** * nocookie option description: */ /** Descriptive text for the nocookie option */ #define NOCOOKIE_DESC (gnutls_serv_opt_strs+1254) /** Upper-cased name for the nocookie option */ #define NOCOOKIE_NAME (gnutls_serv_opt_strs+1292) /** Name string for the nocookie option */ #define NOCOOKIE_name (gnutls_serv_opt_strs+1301) /** Compiled in flag settings for the nocookie option */ #define NOCOOKIE_FLAGS (OPTST_DISABLED) /** * generate option description: */ /** Descriptive text for the generate option */ #define GENERATE_DESC (gnutls_serv_opt_strs+1310) /** Upper-cased name for the generate option */ #define GENERATE_NAME (gnutls_serv_opt_strs+1345) /** Name string for the generate option */ #define GENERATE_name (gnutls_serv_opt_strs+1354) /** Compiled in flag settings for the generate option */ #define GENERATE_FLAGS (OPTST_DISABLED) /** * quiet option description: */ /** Descriptive text for the quiet option */ #define QUIET_DESC (gnutls_serv_opt_strs+1363) /** Upper-cased name for the quiet option */ #define QUIET_NAME (gnutls_serv_opt_strs+1386) /** Name string for the quiet option */ #define QUIET_name (gnutls_serv_opt_strs+1392) /** Compiled in flag settings for the quiet option */ #define QUIET_FLAGS (OPTST_DISABLED) /** * nodb option description: */ /** Descriptive text for the nodb option */ #define NODB_DESC (gnutls_serv_opt_strs+1398) /** Upper-cased name for the nodb option */ #define NODB_NAME (gnutls_serv_opt_strs+1431) /** Name string for the nodb option */ #define NODB_name (gnutls_serv_opt_strs+1436) /** Compiled in flag settings for the nodb option */ #define NODB_FLAGS (OPTST_DISABLED) /** * http option description: */ /** Descriptive text for the http option */ #define HTTP_DESC (gnutls_serv_opt_strs+1441) /** Upper-cased name for the http option */ #define HTTP_NAME (gnutls_serv_opt_strs+1463) /** Name string for the http option */ #define HTTP_name (gnutls_serv_opt_strs+1468) /** Compiled in flag settings for the http option */ #define HTTP_FLAGS (OPTST_DISABLED) /** * echo option description: */ /** Descriptive text for the echo option */ #define ECHO_DESC (gnutls_serv_opt_strs+1473) /** Upper-cased name for the echo option */ #define ECHO_NAME (gnutls_serv_opt_strs+1495) /** Name string for the echo option */ #define ECHO_name (gnutls_serv_opt_strs+1500) /** Compiled in flag settings for the echo option */ #define ECHO_FLAGS (OPTST_DISABLED) /** * udp option description: */ /** Descriptive text for the udp option */ #define UDP_DESC (gnutls_serv_opt_strs+1505) /** Upper-cased name for the udp option */ #define UDP_NAME (gnutls_serv_opt_strs+1538) /** Name string for the udp option */ #define UDP_name (gnutls_serv_opt_strs+1542) /** Compiled in flag settings for the udp option */ #define UDP_FLAGS (OPTST_DISABLED) /** * mtu option description: */ /** Descriptive text for the mtu option */ #define MTU_DESC (gnutls_serv_opt_strs+1546) /** Upper-cased name for the mtu option */ #define MTU_NAME (gnutls_serv_opt_strs+1571) /** Name string for the mtu option */ #define MTU_name (gnutls_serv_opt_strs+1575) /** Compiled in flag settings for the mtu option */ #define MTU_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /** * srtp_profiles option description: */ /** Descriptive text for the srtp_profiles option */ #define SRTP_PROFILES_DESC (gnutls_serv_opt_strs+1579) /** Upper-cased name for the srtp_profiles option */ #define SRTP_PROFILES_NAME (gnutls_serv_opt_strs+1599) /** Name string for the srtp_profiles option */ #define SRTP_PROFILES_name (gnutls_serv_opt_strs+1613) /** Compiled in flag settings for the srtp_profiles option */ #define SRTP_PROFILES_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * disable-client-cert option description with * "Must also have options" and "Incompatible options": */ /** Descriptive text for the disable-client-cert option */ #define DISABLE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1627) /** Upper-cased name for the disable-client-cert option */ #define DISABLE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1663) /** Name string for the disable-client-cert option */ #define DISABLE_CLIENT_CERT_name (gnutls_serv_opt_strs+1683) /** Other options that appear in conjunction with the disable-client-cert option */ static int const aDisable_Client_CertCantList[] = { INDEX_OPT_REQUIRE_CLIENT_CERT, NO_EQUIVALENT }; /** Compiled in flag settings for the disable-client-cert option */ #define DISABLE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /** * require-client-cert option description: */ /** Descriptive text for the require-client-cert option */ #define REQUIRE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1703) /** Upper-cased name for the require-client-cert option */ #define REQUIRE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1732) /** Name string for the require-client-cert option */ #define REQUIRE_CLIENT_CERT_name (gnutls_serv_opt_strs+1752) /** Compiled in flag settings for the require-client-cert option */ #define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /** * verify-client-cert option description: */ /** Descriptive text for the verify-client-cert option */ #define VERIFY_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1772) /** Upper-cased name for the verify-client-cert option */ #define VERIFY_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1820) /** Name string for the verify-client-cert option */ #define VERIFY_CLIENT_CERT_name (gnutls_serv_opt_strs+1839) /** Compiled in flag settings for the verify-client-cert option */ #define VERIFY_CLIENT_CERT_FLAGS (OPTST_DISABLED) /** * heartbeat option description: */ /** Descriptive text for the heartbeat option */ #define HEARTBEAT_DESC (gnutls_serv_opt_strs+1858) /** Upper-cased name for the heartbeat option */ #define HEARTBEAT_NAME (gnutls_serv_opt_strs+1885) /** Name string for the heartbeat option */ #define HEARTBEAT_name (gnutls_serv_opt_strs+1895) /** Compiled in flag settings for the heartbeat option */ #define HEARTBEAT_FLAGS (OPTST_DISABLED) /** * x509fmtder option description: */ /** Descriptive text for the x509fmtder option */ #define X509FMTDER_DESC (gnutls_serv_opt_strs+1905) /** Upper-cased name for the x509fmtder option */ #define X509FMTDER_NAME (gnutls_serv_opt_strs+1950) /** Name string for the x509fmtder option */ #define X509FMTDER_name (gnutls_serv_opt_strs+1961) /** Compiled in flag settings for the x509fmtder option */ #define X509FMTDER_FLAGS (OPTST_DISABLED) /** * priority option description: */ /** Descriptive text for the priority option */ #define PRIORITY_DESC (gnutls_serv_opt_strs+1972) /** Upper-cased name for the priority option */ #define PRIORITY_NAME (gnutls_serv_opt_strs+1990) /** Name string for the priority option */ #define PRIORITY_name (gnutls_serv_opt_strs+1999) /** Compiled in flag settings for the priority option */ #define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * dhparams option description: */ /** Descriptive text for the dhparams option */ #define DHPARAMS_DESC (gnutls_serv_opt_strs+2008) /** Upper-cased name for the dhparams option */ #define DHPARAMS_NAME (gnutls_serv_opt_strs+2030) /** Name string for the dhparams option */ #define DHPARAMS_name (gnutls_serv_opt_strs+2039) /** Compiled in flag settings for the dhparams option */ #define DHPARAMS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * x509cafile option description: */ /** Descriptive text for the x509cafile option */ #define X509CAFILE_DESC (gnutls_serv_opt_strs+2048) /** Upper-cased name for the x509cafile option */ #define X509CAFILE_NAME (gnutls_serv_opt_strs+2088) /** Name string for the x509cafile option */ #define X509CAFILE_name (gnutls_serv_opt_strs+2099) /** Compiled in flag settings for the x509cafile option */ #define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * x509crlfile option description: */ /** Descriptive text for the x509crlfile option */ #define X509CRLFILE_DESC (gnutls_serv_opt_strs+2110) /** Upper-cased name for the x509crlfile option */ #define X509CRLFILE_NAME (gnutls_serv_opt_strs+2126) /** Name string for the x509crlfile option */ #define X509CRLFILE_name (gnutls_serv_opt_strs+2138) /** Compiled in flag settings for the x509crlfile option */ #define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * pgpkeyfile option description: */ /** Descriptive text for the pgpkeyfile option */ #define PGPKEYFILE_DESC (gnutls_serv_opt_strs+2150) /** Upper-cased name for the pgpkeyfile option */ #define PGPKEYFILE_NAME (gnutls_serv_opt_strs+2183) /** Name string for the pgpkeyfile option */ #define PGPKEYFILE_name (gnutls_serv_opt_strs+2194) /** Compiled in flag settings for the pgpkeyfile option */ #define PGPKEYFILE_FLAGS (OPTST_DISABLED | OPTST_DEPRECATED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * x509keyfile option description: */ /** Descriptive text for the x509keyfile option */ #define X509KEYFILE_DESC (gnutls_serv_opt_strs+2205) /** Upper-cased name for the x509keyfile option */ #define X509KEYFILE_NAME (gnutls_serv_opt_strs+2243) /** Name string for the x509keyfile option */ #define X509KEYFILE_name (gnutls_serv_opt_strs+2255) /** Compiled in flag settings for the x509keyfile option */ #define X509KEYFILE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * x509certfile option description: */ /** Descriptive text for the x509certfile option */ #define X509CERTFILE_DESC (gnutls_serv_opt_strs+2267) /** Upper-cased name for the x509certfile option */ #define X509CERTFILE_NAME (gnutls_serv_opt_strs+2313) /** Name string for the x509certfile option */ #define X509CERTFILE_name (gnutls_serv_opt_strs+2326) /** Compiled in flag settings for the x509certfile option */ #define X509CERTFILE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * x509dsakeyfile option description: */ /** Descriptive text for the x509dsakeyfile option */ #define X509DSAKEYFILE_DESC (gnutls_serv_opt_strs+2339) #define X509DSAKEYFILE_NAME NULL /** Unmodified name string for the x509dsakeyfile option */ #define X509DSAKEYFILE_name (gnutls_serv_opt_strs+2390) /** Compiled in flag settings for the x509dsakeyfile option */ #define X509DSAKEYFILE_FLAGS (X509KEYFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) /** * x509dsacertfile option description: */ /** Descriptive text for the x509dsacertfile option */ #define X509DSACERTFILE_DESC (gnutls_serv_opt_strs+2405) #define X509DSACERTFILE_NAME NULL /** Unmodified name string for the x509dsacertfile option */ #define X509DSACERTFILE_name (gnutls_serv_opt_strs+2457) /** Compiled in flag settings for the x509dsacertfile option */ #define X509DSACERTFILE_FLAGS (X509CERTFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) /** * x509ecckeyfile option description: */ /** Descriptive text for the x509ecckeyfile option */ #define X509ECCKEYFILE_DESC (gnutls_serv_opt_strs+2339) #define X509ECCKEYFILE_NAME NULL /** Unmodified name string for the x509ecckeyfile option */ #define X509ECCKEYFILE_name (gnutls_serv_opt_strs+2473) /** Compiled in flag settings for the x509ecckeyfile option */ #define X509ECCKEYFILE_FLAGS (X509KEYFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) /** * x509ecccertfile option description: */ /** Descriptive text for the x509ecccertfile option */ #define X509ECCCERTFILE_DESC (gnutls_serv_opt_strs+2405) #define X509ECCCERTFILE_NAME NULL /** Unmodified name string for the x509ecccertfile option */ #define X509ECCCERTFILE_name (gnutls_serv_opt_strs+2488) /** Compiled in flag settings for the x509ecccertfile option */ #define X509ECCCERTFILE_FLAGS (X509CERTFILE_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED) /** * srppasswd option description: */ /** Descriptive text for the srppasswd option */ #define SRPPASSWD_DESC (gnutls_serv_opt_strs+2504) /** Upper-cased name for the srppasswd option */ #define SRPPASSWD_NAME (gnutls_serv_opt_strs+2529) /** Name string for the srppasswd option */ #define SRPPASSWD_name (gnutls_serv_opt_strs+2539) /** Compiled in flag settings for the srppasswd option */ #define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * srppasswdconf option description: */ /** Descriptive text for the srppasswdconf option */ #define SRPPASSWDCONF_DESC (gnutls_serv_opt_strs+2549) /** Upper-cased name for the srppasswdconf option */ #define SRPPASSWDCONF_NAME (gnutls_serv_opt_strs+2588) /** Name string for the srppasswdconf option */ #define SRPPASSWDCONF_name (gnutls_serv_opt_strs+2602) /** Compiled in flag settings for the srppasswdconf option */ #define SRPPASSWDCONF_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * pskpasswd option description: */ /** Descriptive text for the pskpasswd option */ #define PSKPASSWD_DESC (gnutls_serv_opt_strs+2616) /** Upper-cased name for the pskpasswd option */ #define PSKPASSWD_NAME (gnutls_serv_opt_strs+2641) /** Name string for the pskpasswd option */ #define PSKPASSWD_name (gnutls_serv_opt_strs+2651) /** Compiled in flag settings for the pskpasswd option */ #define PSKPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /** * pskhint option description: */ /** Descriptive text for the pskhint option */ #define PSKHINT_DESC (gnutls_serv_opt_strs+2661) /** Upper-cased name for the pskhint option */ #define PSKHINT_NAME (gnutls_serv_opt_strs+2686) /** Name string for the pskhint option */ #define PSKHINT_name (gnutls_serv_opt_strs+2694) /** Compiled in flag settings for the pskhint option */ #define PSKHINT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * ocsp-response option description: */ /** Descriptive text for the ocsp-response option */ #define OCSP_RESPONSE_DESC (gnutls_serv_opt_strs+2702) /** Upper-cased name for the ocsp-response option */ #define OCSP_RESPONSE_NAME (gnutls_serv_opt_strs+2738) /** Name string for the ocsp-response option */ #define OCSP_RESPONSE_name (gnutls_serv_opt_strs+2752) /** Compiled in flag settings for the ocsp-response option */ #define OCSP_RESPONSE_FLAGS (OPTST_DISABLED | OPTST_STACKED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /** * ignore-ocsp-response-errors option description: */ /** Descriptive text for the ignore-ocsp-response-errors option */ #define IGNORE_OCSP_RESPONSE_ERRORS_DESC (gnutls_serv_opt_strs+2766) /** Upper-cased name for the ignore-ocsp-response-errors option */ #define IGNORE_OCSP_RESPONSE_ERRORS_NAME (gnutls_serv_opt_strs+2815) /** Name string for the ignore-ocsp-response-errors option */ #define IGNORE_OCSP_RESPONSE_ERRORS_name (gnutls_serv_opt_strs+2843) /** Compiled in flag settings for the ignore-ocsp-response-errors option */ #define IGNORE_OCSP_RESPONSE_ERRORS_FLAGS (OPTST_DISABLED) /** * port option description: */ /** Descriptive text for the port option */ #define PORT_DESC (gnutls_serv_opt_strs+2871) /** Upper-cased name for the port option */ #define PORT_NAME (gnutls_serv_opt_strs+2894) /** Name string for the port option */ #define PORT_name (gnutls_serv_opt_strs+2899) /** Compiled in flag settings for the port option */ #define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /** * list option description: */ /** Descriptive text for the list option */ #define LIST_DESC (gnutls_serv_opt_strs+2904) /** Upper-cased name for the list option */ #define LIST_NAME (gnutls_serv_opt_strs+2955) /** Name string for the list option */ #define LIST_name (gnutls_serv_opt_strs+2960) /** Compiled in flag settings for the list option */ #define LIST_FLAGS (OPTST_DISABLED) /** * provider option description: */ /** Descriptive text for the provider option */ #define PROVIDER_DESC (gnutls_serv_opt_strs+2965) /** Upper-cased name for the provider option */ #define PROVIDER_NAME (gnutls_serv_opt_strs+3003) /** Name string for the provider option */ #define PROVIDER_name (gnutls_serv_opt_strs+3012) /** Compiled in flag settings for the provider option */ #define PROVIDER_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* * Help/More_Help/Version option descriptions: */ #define HELP_DESC (gnutls_serv_opt_strs+3021) #define HELP_name (gnutls_serv_opt_strs+3065) #ifdef HAVE_WORKING_FORK #define MORE_HELP_DESC (gnutls_serv_opt_strs+3070) #define MORE_HELP_name (gnutls_serv_opt_strs+3115) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC HELP_DESC #define MORE_HELP_name HELP_name #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) #endif #ifdef NO_OPTIONAL_OPT_ARGS # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif #define VER_DESC (gnutls_serv_opt_strs+3125) #define VER_name (gnutls_serv_opt_strs+3161) /** * Declare option callback procedures */ extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, optionUnstackArg, optionVendorOption; static tOptProc doOptDebug, doOptDhparams, doOptMtu, doOptPgpkeyfile, doOptProvider, doOptPskpasswd, doOptSrppasswd, doOptSrppasswdconf, doOptX509crlfile, doOptX509dsacertfile, doOptX509dsakeyfile, doOptX509ecccertfile, doOptX509ecckeyfile, doUsageOpt; #define VER_PROC optionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Define the gnutls-serv Option Descriptions. * This is an array of OPTION_CT entries, one for each * option that the gnutls-serv program responds to. */ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_DEBUG, /* equiv idx, value */ 0, VALUE_OPT_DEBUG, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_SNI_HOSTNAME, /* equiv idx, value */ 1, VALUE_OPT_SNI_HOSTNAME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SNI_HOSTNAME_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --sni-hostname */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SNI_HOSTNAME_DESC, SNI_HOSTNAME_NAME, SNI_HOSTNAME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_SNI_HOSTNAME_FATAL, /* equiv idx, value */ 2, VALUE_OPT_SNI_HOSTNAME_FATAL, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SNI_HOSTNAME_FATAL_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --sni-hostname-fatal */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SNI_HOSTNAME_FATAL_DESC, SNI_HOSTNAME_FATAL_NAME, SNI_HOSTNAME_FATAL_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 3, VALUE_OPT_ALPN, /* equiv idx, value */ 3, VALUE_OPT_ALPN, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ ALPN_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --alpn */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionStackArg, /* desc, NAME, name */ ALPN_DESC, ALPN_NAME, ALPN_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 4, VALUE_OPT_ALPN_FATAL, /* equiv idx, value */ 4, VALUE_OPT_ALPN_FATAL, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ ALPN_FATAL_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --alpn-fatal */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ ALPN_FATAL_DESC, ALPN_FATAL_NAME, ALPN_FATAL_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 5, VALUE_OPT_NOTICKET, /* equiv idx, value */ 5, VALUE_OPT_NOTICKET, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOTICKET_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --noticket */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 6, VALUE_OPT_NOCOOKIE, /* equiv idx, value */ 6, VALUE_OPT_NOCOOKIE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOCOOKIE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --nocookie */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ NOCOOKIE_DESC, NOCOOKIE_NAME, NOCOOKIE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 7, VALUE_OPT_GENERATE, /* equiv idx, value */ 7, 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 */ 8, VALUE_OPT_QUIET, /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_NODB, /* equiv idx, value */ 9, 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 */ 10, VALUE_OPT_HTTP, /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_ECHO, /* equiv idx, value */ 11, 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 */ 12, VALUE_OPT_UDP, /* equiv idx, value */ 12, VALUE_OPT_UDP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ UDP_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --udp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 13, VALUE_OPT_MTU, /* equiv idx, value */ 13, VALUE_OPT_MTU, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MTU_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --mtu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptMtu, /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 14, VALUE_OPT_SRTP_PROFILES, /* equiv idx, value */ 14, VALUE_OPT_SRTP_PROFILES, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRTP_PROFILES_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --srtp_profiles */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, SRTP_PROFILES_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 15, VALUE_OPT_DISABLE_CLIENT_CERT, /* equiv idx, value */ 15, VALUE_OPT_DISABLE_CLIENT_CERT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_CLIENT_CERT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --disable-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, aDisable_Client_CertCantList, /* option proc */ NULL, /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 16, VALUE_OPT_REQUIRE_CLIENT_CERT, /* equiv idx, value */ 16, 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 */ 17, VALUE_OPT_VERIFY_CLIENT_CERT, /* equiv idx, value */ 17, VALUE_OPT_VERIFY_CLIENT_CERT, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ VERIFY_CLIENT_CERT_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --verify-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ VERIFY_CLIENT_CERT_DESC, VERIFY_CLIENT_CERT_NAME, VERIFY_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 18, VALUE_OPT_HEARTBEAT, /* equiv idx, value */ 18, 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 */ 19, VALUE_OPT_X509FMTDER, /* equiv idx, value */ 19, 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 */ 20, VALUE_OPT_PRIORITY, /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_DHPARAMS, /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_X509CAFILE, /* equiv idx, value */ 22, 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 */ 23, VALUE_OPT_X509CRLFILE, /* equiv idx, value */ 23, 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 */ 24, VALUE_OPT_PGPKEYFILE, /* equiv idx, value */ 24, 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 */ 25, VALUE_OPT_X509KEYFILE, /* equiv idx, value */ 25, VALUE_OPT_X509KEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ X509KEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509keyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionStackArg, /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 26, VALUE_OPT_X509CERTFILE, /* equiv idx, value */ 26, VALUE_OPT_X509CERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionStackArg, /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_X509DSAKEYFILE, /* equiv idx, value */ 27, VALUE_OPT_X509DSAKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSAKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509dsakeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509dsakeyfile, /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, X509DSAKEYFILE_name, /* disablement strs */ 0, 0 }, { /* entry idx, value */ 28, VALUE_OPT_X509DSACERTFILE, /* equiv idx, value */ 28, VALUE_OPT_X509DSACERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSACERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509dsacertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509dsacertfile, /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, X509DSACERTFILE_name, /* disablement strs */ 0, 0 }, { /* entry idx, value */ 29, VALUE_OPT_X509ECCKEYFILE, /* equiv idx, value */ 29, VALUE_OPT_X509ECCKEYFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCKEYFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509ecckeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509ecckeyfile, /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, X509ECCKEYFILE_name, /* disablement strs */ 0, 0 }, { /* entry idx, value */ 30, VALUE_OPT_X509ECCCERTFILE, /* equiv idx, value */ 30, VALUE_OPT_X509ECCCERTFILE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCCERTFILE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --x509ecccertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509ecccertfile, /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, X509ECCCERTFILE_name, /* disablement strs */ 0, 0 }, { /* entry idx, value */ 31, VALUE_OPT_SRPPASSWD, /* equiv idx, value */ 31, 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 */ 32, VALUE_OPT_SRPPASSWDCONF, /* equiv idx, value */ 32, 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 */ 33, VALUE_OPT_PSKPASSWD, /* equiv idx, value */ 33, 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 */ 34, VALUE_OPT_PSKHINT, /* equiv idx, value */ 34, 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 */ 35, VALUE_OPT_OCSP_RESPONSE, /* equiv idx, value */ 35, VALUE_OPT_OCSP_RESPONSE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ OCSP_RESPONSE_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ocsp-response */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionStackArg, /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, OCSP_RESPONSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 36, VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS, /* equiv idx, value */ 36, VALUE_OPT_IGNORE_OCSP_RESPONSE_ERRORS, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ IGNORE_OCSP_RESPONSE_ERRORS_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --ignore-ocsp-response-errors */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, /* desc, NAME, name */ IGNORE_OCSP_RESPONSE_ERRORS_DESC, IGNORE_OCSP_RESPONSE_ERRORS_NAME, IGNORE_OCSP_RESPONSE_ERRORS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 37, VALUE_OPT_PORT, /* equiv idx, value */ 37, 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 */ 38, VALUE_OPT_LIST, /* equiv idx, value */ 38, 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 */ 39, VALUE_OPT_PROVIDER, /* equiv idx, value */ 39, VALUE_OPT_PROVIDER, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PROVIDER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --provider */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptProvider, /* desc, NAME, name */ PROVIDER_DESC, PROVIDER_NAME, PROVIDER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ VER_FLAGS, AOUSE_VERSION, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ VER_PROC, /* desc, NAME, name */ VER_DESC, NULL, VER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doUsageOpt, /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionPagedUsage, /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, /* disablement strs */ NULL, NULL } }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** Reference to the upper cased version of gnutls-serv. */ #define zPROGNAME (gnutls_serv_opt_strs+3169) /** Reference to the title line for gnutls-serv usage. */ #define zUsageTitle (gnutls_serv_opt_strs+3181) /** There is no gnutls-serv configuration file. */ #define zRcName NULL /** There are no directories to search for gnutls-serv config files. */ #define apzHomeList NULL /** The gnutls-serv program bug email address. */ #define zBugsAddr (gnutls_serv_opt_strs+3267) /** Clarification/explanation of what gnutls-serv does. */ #define zExplain (gnutls_serv_opt_strs+3287) /** Extra detail explaining what gnutls-serv does. */ #define zDetail (gnutls_serv_opt_strs+3289) /** The full version string for gnutls-serv. */ #define zFullVersion (gnutls_serv_opt_strs+3347) /* extracted from optcode.tlib near line 364 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT static tOptionXlateProc translate_option_strings; #else # define OPTPROC_BASE OPTPROC_NONE # define translate_option_strings NULL #endif /* ENABLE_NLS */ #define gnutls_serv_full_usage (NULL) #define gnutls_serv_short_usage (gnutls_serv_opt_strs+3369) #endif /* not defined __doxygen__ */ /* * Create the static procedure(s) declared above. */ /** * The callout function that invokes the optionUsage function. * * @param[in] opts the AutoOpts option description structure * @param[in] od the descriptor for the "help" (usage) option. * @noreturn */ static void doUsageOpt(tOptions * opts, tOptDesc * od) { int ex_code; ex_code = GNUTLS_SERV_EXIT_SUCCESS; optionUsage(&gnutls_servOptions, ex_code); /* NOTREACHED */ exit(GNUTLS_SERV_EXIT_FAILURE); (void)opts; (void)od; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug option. * Specifies the debug level. * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0 , 9999 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the mtu option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) { static struct {long rmin, rmax;} const rng[1] = { { 0, 17000 } }; int ix; if (pOptions <= OPTPROC_EMIT_LIMIT) goto emit_ranges; optionNumericVal(pOptions, pOptDesc); for (ix = 0; ix < 1; ix++) { if (pOptDesc->optArg.argInt < rng[ix].rmin) continue; /* ranges need not be ordered. */ if (pOptDesc->optArg.argInt == rng[ix].rmin) return; if (rng[ix].rmax == LONG_MIN) continue; if (pOptDesc->optArg.argInt <= rng[ix].rmax) return; } option_usage_fp = stderr; emit_ranges: optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the dhparams option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptDhparams(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509crlfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pgpkeyfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509dsakeyfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptX509dsakeyfile(tOptions* pOptions, tOptDesc* pOptDesc) { int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509KEYFILE); if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509dsacertfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptX509dsacertfile(tOptions* pOptions, tOptDesc* pOptDesc) { int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509CERTFILE); if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509ecckeyfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptX509ecckeyfile(tOptions* pOptions, tOptDesc* pOptDesc) { int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509KEYFILE); if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the x509ecccertfile option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptX509ecccertfile(tOptions* pOptions, tOptDesc* pOptDesc) { int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_X509CERTFILE); if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0)) USAGE(GNUTLS_SERV_EXIT_USAGE_ERROR); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the srppasswd option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptSrppasswd(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the srppasswdconf option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptSrppasswdconf(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the pskpasswd option. * * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptPskpasswd(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the provider option. * This will override the default options in /etc/gnutls/pkcs11.conf * @param[in] pOptions the gnutls-serv options data structure * @param[in,out] pOptDesc the option descriptor for this option. */ static void doOptProvider(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; static tuFileMode mode; #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif mode.file_flags = O_CLOEXEC; /* * This function handles special invalid values for "pOptions" */ optionFileCheck(pOptions, pOptDesc, type, mode); } /* extracted from optmain.tlib near line 1250 */ /** * The directory containing the data associated with gnutls-serv. */ #ifndef PKGDATADIR # define PKGDATADIR "" #endif /** * Information about the person or institution that packaged gnutls-serv * for the current distribution. */ #ifndef WITH_PACKAGER # define gnutls_serv_packager_info NULL #else /** Packager information for gnutls-serv. */ static char const gnutls_serv_packager_info[] = "Packaged by " WITH_PACKAGER # ifdef WITH_PACKAGER_VERSION " ("WITH_PACKAGER_VERSION")" # endif # ifdef WITH_PACKAGER_BUG_REPORTS "\nReport gnutls_serv bugs to " WITH_PACKAGER_BUG_REPORTS # endif "\n"; #endif #ifndef __doxygen__ #endif /* __doxygen__ */ /** * The option definitions for gnutls-serv. The one structure that * binds them all. */ tOptions gnutls_servOptions = { OPTIONS_STRUCT_VERSION, 0, NULL, /* original argc + argv */ ( OPTPROC_BASE + OPTPROC_ERRSTOP + OPTPROC_SHORTOPT + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_NO_ARGS + OPTPROC_GNUUSAGE + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ NULL, NULL, /* extensions/saved state */ optionUsage, /* usage procedure */ translate_option_strings, /* translation procedure */ /* * Indexes to special options */ { INDEX_OPT_MORE_HELP, /* more-help option index */ NO_EQUIVALENT, /* save option index */ NO_EQUIVALENT, /* '-#' option index */ NO_EQUIVALENT /* index of default opt */ }, 43 /* full option count */, 40 /* user option count */, gnutls_serv_full_usage, gnutls_serv_short_usage, NULL, NULL, PKGDATADIR, gnutls_serv_packager_info }; #if ENABLE_NLS /** * This code is designed to translate translatable option text for the * gnutls-serv program. These translations happen upon entry * to optionProcess(). */ #include #include #include #include #ifdef HAVE_DCGETTEXT # include #endif #include static char * AO_gettext(char const * pz); static void coerce_it(void ** s); /** * AutoGen specific wrapper function for gettext. It relies on the macro _() * to convert from English to the target language, then strdup-duplicates the * result string. It tries the "libopts" domain first, then whatever has been * set via the \a textdomain(3) call. * * @param[in] pz the input text used as a lookup key. * @returns the translated text (if there is one), * or the original text (if not). */ static char * AO_gettext(char const * pz) { char * res; if (pz == NULL) return NULL; #ifdef HAVE_DCGETTEXT /* * While processing the option_xlateable_txt data, try to use the * "libopts" domain. Once we switch to the option descriptor data, * do *not* use that domain. */ if (option_xlateable_txt.field_ct != 0) { res = dgettext("libopts", pz); if (res == pz) res = (char *)VOIDP(_(pz)); } else res = (char *)VOIDP(_(pz)); #else res = (char *)VOIDP(_(pz)); #endif if (res == pz) return res; res = strdup(res); if (res == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); exit(GNUTLS_SERV_EXIT_FAILURE); } return res; } /** * All the pointers we use are marked "* const", but they are stored in * writable memory. Coerce the mutability and set the pointer. */ static void coerce_it(void ** s) { *s = AO_gettext(*s); } /** * Translate all the translatable strings in the gnutls_servOptions * structure defined above. This is done only once. */ static void translate_option_strings(void) { tOptions * const opts = &gnutls_servOptions; /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. */ if (option_xlateable_txt.field_ct != 0) { /* * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); int ix = option_xlateable_txt.field_ct; do { ppz++; /* skip over field_ct */ *ppz = AO_gettext(*ppz); } while (--ix > 0); /* prevent re-translation and disable "libopts" domain lookup */ option_xlateable_txt.field_ct = 0; coerce_it(VOIDP(&(opts->pzCopyright))); coerce_it(VOIDP(&(opts->pzCopyNotice))); coerce_it(VOIDP(&(opts->pzFullVersion))); coerce_it(VOIDP(&(opts->pzUsageTitle))); coerce_it(VOIDP(&(opts->pzExplain))); coerce_it(VOIDP(&(opts->pzDetail))); { tOptDesc * od = opts->pOptDesc; for (ix = opts->optCt; ix > 0; ix--, od++) coerce_it(VOIDP(&(od->pzText))); } } } #endif /* ENABLE_NLS */ #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT /** I18N function strictly for xgettext. Do not compile. */ static void bogus_function(void) { /* TRANSLATORS: The following dummy function was crated solely so that xgettext can extract the correct strings. These strings are actually referenced by a field name in the gnutls_servOptions structure noted in the comments below. The literal text is defined in gnutls_serv_opt_strs. NOTE: the strings below are segmented with respect to the source string gnutls_serv_opt_strs. The strings above are handed off for translation at run time a paragraph at a time. Consequently, they are presented here for translation a paragraph at a time. ALSO: often the description for an option will reference another option by name. These are set off with apostrophe quotes (I hope). Do not translate option names. */ /* referenced via gnutls_servOptions.pzCopyright */ puts(_("gnutls-serv @VERSION@\n\ Copyright (C) 2000-@YEAR@ Free Software Foundation, and others, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the GNU General Public License,\n\ version 3 or later \n")); /* referenced via gnutls_servOptions.pzCopyNotice */ puts(_("gnutls-serv is free software: you can redistribute it and/or modify it\n\ under the terms of the GNU General Public License as published by the Free\n\ Software Foundation, either version 3 of the License, or (at your option)\n\ any later version.\n\n")); puts(_("gnutls-serv is distributed in the hope that it will be useful, but WITHOUT\n\ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n\ more details.\n\n")); puts(_("You should have received a copy of the GNU General Public License along\n\ with this program. If not, see .\n")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Enable debugging")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Server's hostname for server name extension")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Send fatal alert on sni-hostname mismatch")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Specify ALPN protocol to be enabled by the server")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Send fatal alert on non-matching ALPN name")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Don't accept session tickets")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Don't require cookie on DTLS sessions")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Generate Diffie-Hellman parameters")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Suppress some messages")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Do not use a resumption database")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Act as an HTTP server")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Act as an Echo server")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Use DTLS (datagram TLS) over UDP")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Set MTU for datagram TLS")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Offer SRTP profiles")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Do not request a client certificate")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Require a client certificate")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("If a client certificate is sent then verify it.")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Activate heartbeat support")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Use DER format for certificates to read from")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Priorities string")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("DH params file to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Certificate file or PKCS #11 URL to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("CRL file to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("PGP Key file to use (deprecated)")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("X.509 key file or PKCS #11 URL to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("X.509 Certificate file or PKCS #11 URL to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("an alias for the 'x509keyfile' option (deprecated)")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("an alias for the 'x509certfile' option (deprecated)")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("an alias for the 'x509keyfile' option (deprecated)")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("an alias for the 'x509certfile' option (deprecated)")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("SRP password file to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("SRP password configuration file to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("PSK password file to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("PSK identity hint to use")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("The OCSP response to send to client")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Ignore any errors when setting the OCSP response")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("The port to connect to")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Print a list of the supported algorithms and modes")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("Specify the PKCS #11 provider library")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("display extended usage information and exit")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("extended usage information passed thru pager")); /* referenced via gnutls_servOptions.pOptDesc->pzText */ puts(_("output version information and exit")); /* referenced via gnutls_servOptions.pzUsageTitle */ puts(_("gnutls-serv - GnuTLS server\n\ Usage: %s [ - [] | --[{=| }] ]...\n")); /* referenced via gnutls_servOptions.pzExplain */ puts(_("\n")); /* referenced via gnutls_servOptions.pzDetail */ puts(_("Server program that listens to incoming TLS connections.\n")); /* referenced via gnutls_servOptions.pzFullVersion */ puts(_("gnutls-serv @VERSION@")); /* referenced via gnutls_servOptions.pzFullUsage */ puts(_("<<>>")); /* referenced via gnutls_servOptions.pzShortUsage */ puts(_("Usage: gnutls-serv [options]\n\ gnutls-serv --help for usage instructions.\n")); /* LIBOPTS-MESSAGES: */ #line 67 "../autoopts.c" puts(_("allocation of %d bytes failed\n")); #line 93 "../autoopts.c" puts(_("allocation of %d bytes failed\n")); #line 53 "../init.c" puts(_("AutoOpts function called without option descriptor\n")); #line 86 "../init.c" puts(_("\tThis exceeds the compiled library version: ")); #line 84 "../init.c" puts(_("Automated Options Processing Error!\n" "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); #line 80 "../autoopts.c" puts(_("realloc of %d bytes at 0x%p failed\n")); #line 88 "../init.c" puts(_("\tThis is less than the minimum library version: ")); #line 121 "../version.c" puts(_("Automated Options version %s\n" "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); #line 87 "../makeshell.c" puts(_("(AutoOpts bug): %s.\n")); #line 90 "../reset.c" puts(_("optionResetOpt() called, but reset-option not configured")); #line 295 "../usage.c" puts(_("could not locate the 'help' option")); #line 336 "../autoopts.c" puts(_("optionProcess() was called with invalid data")); #line 751 "../usage.c" puts(_("invalid argument type specified")); #line 598 "../find.c" puts(_("defaulted to option with optional arg")); #line 76 "../alias.c" puts(_("aliasing option is out of range.")); #line 235 "../enum.c" puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); #line 108 "../find.c" puts(_(" The following options match:\n")); #line 293 "../find.c" puts(_("%s: ambiguous option name: %s (matches %d options)\n")); #line 161 "../check.c" puts(_("%s: Command line arguments required\n")); #line 43 "../alias.c" puts(_("%d %s%s options allowed\n")); #line 94 "../makeshell.c" puts(_("%s error %d (%s) calling %s for '%s'\n")); #line 306 "../makeshell.c" puts(_("interprocess pipe")); #line 168 "../version.c" puts(_("error: version option argument '%c' invalid. Use:\n" "\t'v' - version only\n" "\t'c' - version and copyright\n" "\t'n' - version and full copyright notice\n")); #line 58 "../check.c" puts(_("%s error: the '%s' and '%s' options conflict\n")); #line 217 "../find.c" puts(_("%s: The '%s' option has been disabled.")); #line 430 "../find.c" puts(_("%s: The '%s' option has been disabled.")); #line 38 "../alias.c" puts(_("-equivalence")); #line 469 "../find.c" puts(_("%s: illegal option -- %c\n")); #line 110 "../reset.c" puts(_("%s: illegal option -- %c\n")); #line 271 "../find.c" puts(_("%s: illegal option -- %s\n")); #line 755 "../find.c" puts(_("%s: illegal option -- %s\n")); #line 118 "../reset.c" puts(_("%s: illegal option -- %s\n")); #line 335 "../find.c" puts(_("%s: unknown vendor extension option -- %s\n")); #line 160 "../enum.c" puts(_(" or an integer from %d through %d\n")); #line 170 "../enum.c" puts(_(" or an integer from %d through %d\n")); #line 750 "../usage.c" puts(_("%s error: invalid option descriptor for %s\n")); #line 1084 "../usage.c" puts(_("%s error: invalid option descriptor for %s\n")); #line 385 "../find.c" puts(_("%s: invalid option name: %s\n")); #line 527 "../find.c" puts(_("%s: The '%s' option requires an argument.\n")); #line 156 "../autoopts.c" puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" "\t'%s' and '%s'.")); #line 94 "../check.c" puts(_("%s error: The %s option is required\n")); #line 632 "../find.c" puts(_("%s: The '%s' option cannot have an argument.\n")); #line 151 "../check.c" puts(_("%s: Command line arguments are not allowed.\n")); #line 536 "../save.c" puts(_("error %d (%s) creating %s\n")); #line 235 "../enum.c" puts(_("%s error: '%s' does not match any %s keywords.\n")); #line 93 "../reset.c" puts(_("%s error: The '%s' option requires an argument.\n")); #line 186 "../save.c" puts(_("error %d (%s) stat-ing %s\n")); #line 239 "../save.c" puts(_("error %d (%s) stat-ing %s\n")); #line 143 "../restore.c" puts(_("%s error: no saved option state\n")); #line 231 "../autoopts.c" puts(_("'%s' is not a command line option.\n")); #line 113 "../time.c" puts(_("%s error: '%s' is not a recognizable date/time.\n")); #line 131 "../save.c" puts(_("'%s' not defined\n")); #line 50 "../time.c" puts(_("%s error: '%s' is not a recognizable time duration.\n")); #line 92 "../check.c" puts(_("%s error: The %s option must appear %d times.\n")); #line 165 "../numeric.c" puts(_("%s error: '%s' is not a recognizable number.\n")); #line 201 "../enum.c" puts(_("%s error: %s exceeds %s keyword count\n")); #line 333 "../usage.c" puts(_("Try '%s %s' for more information.\n")); #line 45 "../alias.c" puts(_("one %s%s option allowed\n")); #line 208 "../makeshell.c" puts(_("standard output")); #line 943 "../makeshell.c" puts(_("standard output")); #line 277 "../usage.c" puts(_("standard output")); #line 418 "../usage.c" puts(_("standard output")); #line 628 "../usage.c" puts(_("standard output")); #line 175 "../version.c" puts(_("standard output")); #line 277 "../usage.c" puts(_("standard error")); #line 418 "../usage.c" puts(_("standard error")); #line 628 "../usage.c" puts(_("standard error")); #line 175 "../version.c" puts(_("standard error")); #line 208 "../makeshell.c" puts(_("write")); #line 943 "../makeshell.c" puts(_("write")); #line 276 "../usage.c" puts(_("write")); #line 417 "../usage.c" puts(_("write")); #line 627 "../usage.c" puts(_("write")); #line 174 "../version.c" puts(_("write")); #line 60 "../numeric.c" puts(_("%s error: %s option value %ld is out of range.\n")); #line 44 "../check.c" puts(_("%s error: %s option requires the %s option\n")); #line 130 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); #line 185 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); #line 238 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); #line 257 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); #line 535 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); /* END-LIBOPTS-MESSAGES */ /* USAGE-TEXT: */ #line 876 "../usage.c" puts(_("\t\t\t\t- an alternate for '%s'\n")); #line 1151 "../usage.c" puts(_("Version, usage and configuration options:")); #line 927 "../usage.c" puts(_("\t\t\t\t- default option for unnamed options\n")); #line 840 "../usage.c" puts(_("\t\t\t\t- disabled as '--%s'\n")); #line 1120 "../usage.c" puts(_(" --- %-14s %s\n")); #line 1118 "../usage.c" puts(_("This option has been disabled")); #line 867 "../usage.c" puts(_("\t\t\t\t- enabled by default\n")); #line 40 "../alias.c" puts(_("%s error: only ")); #line 1197 "../usage.c" puts(_(" - examining environment variables named %s_*\n")); #line 168 "../file.c" puts(_("\t\t\t\t- file must not pre-exist\n")); #line 172 "../file.c" puts(_("\t\t\t\t- file must pre-exist\n")); #line 383 "../usage.c" puts(_("Options are specified by doubled hyphens and their name or by a single\n" "hyphen and the flag character.\n")); #line 921 "../makeshell.c" puts(_("\n" "= = = = = = = =\n\n" "This incarnation of genshell will produce\n" "a shell script to parse the options for %s:\n\n")); #line 167 "../enum.c" puts(_(" or an integer mask with any of the lower %d bits set\n")); #line 900 "../usage.c" puts(_("\t\t\t\t- is a set membership option\n")); #line 921 "../usage.c" puts(_("\t\t\t\t- must appear between %d and %d times\n")); #line 385 "../usage.c" puts(_("Options are specified by single or double hyphens and their name.\n")); #line 907 "../usage.c" puts(_("\t\t\t\t- may appear multiple times\n")); #line 894 "../usage.c" puts(_("\t\t\t\t- may not be preset\n")); #line 1312 "../usage.c" puts(_(" Arg Option-Name Description\n")); #line 1248 "../usage.c" puts(_(" Flg Arg Option-Name Description\n")); #line 1306 "../usage.c" puts(_(" Flg Arg Option-Name Description\n")); #line 1307 "../usage.c" puts(_(" %3s %s")); #line 1313 "../usage.c" puts(_(" %3s %s")); #line 390 "../usage.c" puts(_("The '-#' option may omit the hash char\n")); #line 386 "../usage.c" puts(_("All arguments are named options.\n")); #line 974 "../usage.c" puts(_(" - reading file %s")); #line 412 "../usage.c" puts(_("\n" "Please send bug reports to: <%s>\n")); #line 100 "../version.c" puts(_("\n" "Please send bug reports to: <%s>\n")); #line 129 "../version.c" puts(_("\n" "Please send bug reports to: <%s>\n")); #line 906 "../usage.c" puts(_("\t\t\t\t- may NOT appear - preset only\n")); #line 947 "../usage.c" puts(_("\n" "The following option preset mechanisms are supported:\n")); #line 1195 "../usage.c" puts(_("\n" "The following option preset mechanisms are supported:\n")); #line 685 "../usage.c" puts(_("prohibits these options:\n")); #line 680 "../usage.c" puts(_("prohibits the option '%s'\n")); #line 81 "../numeric.c" puts(_("%s%ld to %ld")); #line 79 "../numeric.c" puts(_("%sgreater than or equal to %ld")); #line 75 "../numeric.c" puts(_("%s%ld exactly")); #line 68 "../numeric.c" puts(_("%sit must lie in one of the ranges:\n")); #line 68 "../numeric.c" puts(_("%sit must be in the range:\n")); #line 88 "../numeric.c" puts(_(", or\n")); #line 66 "../numeric.c" puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); #line 77 "../numeric.c" puts(_("%sless than or equal to %ld")); #line 393 "../usage.c" puts(_("Operands and options may be intermixed. They will be reordered.\n")); #line 655 "../usage.c" puts(_("requires the option '%s'\n")); #line 658 "../usage.c" puts(_("requires these options:\n")); #line 1324 "../usage.c" puts(_(" Arg Option-Name Req? Description\n")); #line 1318 "../usage.c" puts(_(" Flg Arg Option-Name Req? Description\n")); #line 168 "../enum.c" puts(_("or you may use a numeric representation. Preceding these with a '!'\n" "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" "will set them all. Multiple entries may be passed as an option\n" "argument list.\n")); #line 913 "../usage.c" puts(_("\t\t\t\t- may appear up to %d times\n")); #line 77 "../enum.c" puts(_("The valid \"%s\" option keywords are:\n")); #line 1155 "../usage.c" puts(_("The next option supports vendor supported extra options:")); #line 776 "../usage.c" puts(_("These additional options are:")); /* END-USAGE-TEXT */ } #endif /* uncompilable code */ #ifdef __cplusplus } #endif /* serv-args.c ends here */