From: Nikos Mavrogiannopoulos Date: Sun, 30 Sep 2012 14:22:33 +0000 (+0200) Subject: The OCSP response file is now set on the credentials and other additions. X-Git-Tag: gnutls_3_1_3~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=946ea95e6f3ac2a9dad38d8f64eeee2956279a47;p=thirdparty%2Fgnutls.git The OCSP response file is now set on the credentials and other additions. Changed OCSP function prototypes for almost all status_request functions to move the response file and callback to the certificate credentials structure. Added gnutls_ocsp_resp_check_crt() to check whether a response corresponds to a given certificate. --- diff --git a/NEWS b/NEWS index 8139049db5..1a19bade90 100644 --- a/NEWS +++ b/NEWS @@ -11,10 +11,11 @@ extension. Reported by danblack at http://savannah.gnu.org/support/?108146 ** API and ABI modifications: -gnutls_status_request_ocsp_client: Added -gnutls_status_request_get_ocsp: Added -gnutls_status_request_ocsp_server: Added -gnutls_status_request_ocsp_server_file: Added +gnutls_certificate_set_ocsp_status_request_function: Added +gnutls_certificate_set_ocsp_status_request_file: Added +gnutls_ocsp_status_request_enable_client: Added +gnutls_ocsp_status_request_get: Added +gnutls_ocsp_resp_check_crt: Added * Version 3.1.2 (released 2012-09-26) diff --git a/lib/auth/cert.h b/lib/auth/cert.h index a11caba327..b253e79349 100644 --- a/lib/auth/cert.h +++ b/lib/auth/cert.h @@ -87,6 +87,11 @@ typedef struct gnutls_certificate_credentials_st gnutls_certificate_verify_function *verify_callback; struct pin_info_st pin; + + /* OCSP */ + gnutls_status_request_ocsp_func ocsp_func; + void *ocsp_func_ptr; + char *ocsp_response_file; } certificate_credentials_st; typedef struct rsa_info_st diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c index dae127a663..8c8782b08b 100644 --- a/lib/ext/status_request.c +++ b/lib/ext/status_request.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include typedef struct @@ -39,9 +41,6 @@ typedef struct gnutls_datum_t request_extensions; gnutls_datum_t response; - gnutls_status_request_ocsp_func ocsp_func; - void *ocsp_func_ptr; - char *response_file; unsigned int expect_cstatus; } status_request_ext_st; @@ -187,11 +186,17 @@ server_send (gnutls_session_t session, status_request_ext_st *priv) { int ret; - - if (priv->ocsp_func == NULL) + gnutls_certificate_credentials_t cred; + + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred (session->key, GNUTLS_CRD_CERTIFICATE, NULL); + if (cred == NULL) /* no certificate authentication */ + return gnutls_assert_val (0); + + if (cred->ocsp_func == NULL) return gnutls_assert_val (GNUTLS_E_SUCCESS); - ret = priv->ocsp_func (session, priv->ocsp_func_ptr, &priv->response); + ret = cred->ocsp_func (session, cred->ocsp_func_ptr, &priv->response); if (ret == GNUTLS_E_NO_CERTIFICATE_STATUS) return 0; else if (ret < 0) @@ -226,15 +231,27 @@ _gnutls_status_request_send_params (gnutls_session_t session, ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_STATUS_REQUEST, &epriv); + + if (session->security_parameters.entity == GNUTLS_CLIENT) + { + if (ret < 0 || epriv.ptr == NULL) /* it is ok not to have it */ + return 0; + priv = epriv.ptr; - if (ret < 0 || epriv.ptr == NULL) /* it is ok not to have it */ - return 0; + return client_send (session, extdata, priv); + } + else + { + epriv.ptr = priv = gnutls_calloc (1, sizeof (*priv)); + if (priv == NULL) + return gnutls_assert_val (GNUTLS_E_MEMORY_ERROR); - priv = epriv.ptr; + _gnutls_ext_set_session_data (session, + GNUTLS_EXTENSION_STATUS_REQUEST, + epriv); - if (session->security_parameters.entity == GNUTLS_CLIENT) - return client_send (session, extdata, priv); - return server_send (session, extdata, priv); + return server_send (session, extdata, priv); + } } static int @@ -260,7 +277,7 @@ _gnutls_status_request_recv_params (gnutls_session_t session, } /** - * gnutls_status_request_ocsp_client: + * gnutls_ocsp_status_request_enable_client: * @session: is a #gnutls_session_t structure. * @responder_id: array with #gnutls_datum_t with DER data of responder id * @responder_id_size: number of members in @responder_id array @@ -276,7 +293,7 @@ _gnutls_status_request_recv_params (gnutls_session_t session, * otherwise a negative error code is returned. **/ int -gnutls_status_request_ocsp_client (gnutls_session_t session, +gnutls_ocsp_status_request_enable_client (gnutls_session_t session, gnutls_datum_t *responder_id, size_t responder_id_size, gnutls_datum_t *extensions) @@ -307,7 +324,7 @@ gnutls_status_request_ocsp_client (gnutls_session_t session, } /** - * gnutls_status_request_get_ocsp: + * gnutls_ocsp_status_request_get: * @session: is a #gnutls_session_t structure. * @response: a #gnutls_datum_t with DER encoded OCSP response * @@ -320,7 +337,7 @@ gnutls_status_request_ocsp_client (gnutls_session_t session, * otherwise a negative error code is returned. **/ int -gnutls_status_request_get_ocsp (gnutls_session_t session, +gnutls_ocsp_status_request_get (gnutls_session_t session, gnutls_datum_t *response) { status_request_ext_st *priv; @@ -348,8 +365,8 @@ gnutls_status_request_get_ocsp (gnutls_session_t session, } /** - * gnutls_status_request_ocsp_server: - * @session: is a #gnutls_session_t structure. + * gnutls_certificate_set_ocsp_status_request_function: + * @sc: is a #gnutls_certificate_credentials_t structure. * @ocsp_func: function pointer to OCSP status request callback. * @ptr: opaque pointer passed to callback function * @@ -372,39 +389,23 @@ gnutls_status_request_get_ocsp (gnutls_session_t session, * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, * otherwise a negative error code is returned. **/ -int -gnutls_status_request_ocsp_server (gnutls_session_t session, - gnutls_status_request_ocsp_func ocsp_func, - void *ptr) +void +gnutls_certificate_set_ocsp_status_request_function ( + gnutls_certificate_credentials_t sc, + gnutls_status_request_ocsp_func ocsp_func, + void *ptr) { - extension_priv_data_t epriv; - status_request_ext_st* priv; - - if (session->security_parameters.entity == GNUTLS_CLIENT) - return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); - - priv = gnutls_calloc(1, sizeof(*priv)); - if (priv == NULL) - return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); - - priv->ocsp_func = ocsp_func; - priv->ocsp_func_ptr = ptr; - - epriv.ptr = priv; - - _gnutls_ext_set_session_data (session, - GNUTLS_EXTENSION_STATUS_REQUEST, - epriv); - - return 0; + + sc->ocsp_func = ocsp_func; + sc->ocsp_func_ptr = ptr; } static int file_ocsp_func(gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response) { int ret; -status_request_ext_st* priv = ptr; +gnutls_certificate_credentials_t sc = ptr; - ret = gnutls_load_file(priv->response_file, ocsp_response); + ret = gnutls_load_file(sc->ocsp_response_file, ocsp_response); if (ret < 0) return gnutls_assert_val(GNUTLS_E_NO_CERTIFICATE_STATUS); @@ -412,44 +413,33 @@ status_request_ext_st* priv = ptr; } /** - * gnutls_status_request_ocsp_server_file: + * gnutls_certificate_set_ocsp_status_request_file: * @session: is a #gnutls_session_t structure. * @response_file: a filename of the OCSP response * @flags: should be zero * * This function sets the filename of an OCSP response, that will be - * sent to the client if requests an OCSP certificate status. + * sent to the client if requests an OCSP certificate status. This is + * a convenience function which is inefficient on busy servers since + * the file is opened on every access. Use + * gnutls_certificate_set_ocsp_status_request_function() to fine-tune + * file accesses. * * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, * otherwise a negative error code is returned. **/ int -gnutls_status_request_ocsp_server_file (gnutls_session_t session, +gnutls_certificate_set_ocsp_status_request_file ( + gnutls_certificate_credentials_t sc, const char* response_file, unsigned int flags) { - extension_priv_data_t epriv; - status_request_ext_st* priv; - - if (session->security_parameters.entity == GNUTLS_CLIENT) - return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); - - priv = gnutls_calloc(1, sizeof(*priv)); - if (priv == NULL) - return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); - - priv->response_file = gnutls_strdup(response_file); - if (priv->response_file == NULL) + sc->ocsp_func = file_ocsp_func; + sc->ocsp_func_ptr = sc; + sc->ocsp_response_file = gnutls_strdup(response_file); + if (sc->ocsp_response_file == NULL) return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); - - priv->ocsp_func = file_ocsp_func; - priv->ocsp_func_ptr = priv; - epriv.ptr = priv; - - _gnutls_ext_set_session_data (session, - GNUTLS_EXTENSION_STATUS_REQUEST, - epriv); return 0; } @@ -468,7 +458,6 @@ _gnutls_status_request_deinit_data (extension_priv_data_t epriv) gnutls_free (priv->responder_id); gnutls_free (priv->request_extensions.data); gnutls_free (priv->response.data); - gnutls_free (priv->response_file); gnutls_free (priv); } diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index cdbedd4858..fef4e96b59 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -193,6 +193,7 @@ gnutls_certificate_free_credentials (gnutls_certificate_credentials_t sc) gnutls_x509_trust_list_deinit(sc->tlist, 1); gnutls_certificate_free_keys (sc); gnutls_certificate_free_ca_names (sc); + gnutls_free(sc->ocsp_response_file); #ifdef ENABLE_OPENPGP gnutls_openpgp_keyring_deinit (sc->keyring); diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c index 2a14f74a13..56ff585612 100644 --- a/lib/gnutls_errors.c +++ b/lib/gnutls_errors.c @@ -347,6 +347,10 @@ static const gnutls_error_entry error_algorithms[] = { GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE, 1), ERROR_ENTRY (N_("The provided X.509 certificate list is not sorted (in subject to issuer order)"), GNUTLS_E_CERTIFICATE_LIST_UNSORTED, 1), + ERROR_ENTRY (N_("The OCSP response is invalid"), + GNUTLS_E_OCSP_RESPONSE_ERROR, 1), + ERROR_ENTRY (N_("There is no certificate status (OCSP)."), + GNUTLS_E_NO_CERTIFICATE_STATUS, 1), {NULL, NULL, 0, 0} }; diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index 7b1fae6ba6..c36444054a 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -955,24 +955,6 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); int gnutls_key_generate (gnutls_datum_t * key, unsigned int key_size); - /* OCSP status request extension, RFC 6066 */ - typedef int (*gnutls_status_request_ocsp_func) - (gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response); - int gnutls_status_request_ocsp_server (gnutls_session_t session, - gnutls_status_request_ocsp_func ocsp_func, - void *ptr); - - int gnutls_status_request_ocsp_server_file (gnutls_session_t session, - const char* response_file, - unsigned int flags); - - int gnutls_status_request_ocsp_client (gnutls_session_t session, - gnutls_datum_t *responder_id, - size_t responder_id_size, - gnutls_datum_t *request_extensions); - - int gnutls_status_request_get_ocsp (gnutls_session_t session, gnutls_datum_t *response); - /* if you just want some defaults, use the following. */ int gnutls_priority_init (gnutls_priority_t * priority_cache, @@ -1219,6 +1201,25 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); gnutls_x509_crl_t * crl_list, int crl_list_size); + /* OCSP status request extension, RFC 6066 */ + typedef int (*gnutls_status_request_ocsp_func) + (gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response); + + void gnutls_certificate_set_ocsp_status_request_function (gnutls_certificate_credentials_t res, + gnutls_status_request_ocsp_func ocsp_func, + void *ptr); + + int gnutls_certificate_set_ocsp_status_request_file (gnutls_certificate_credentials_t res, + const char* response_file, unsigned int flags); + + int gnutls_ocsp_status_request_enable_client (gnutls_session_t session, + gnutls_datum_t *responder_id, + size_t responder_id_size, + gnutls_datum_t *request_extensions); + + int gnutls_ocsp_status_request_get (gnutls_session_t session, gnutls_datum_t *response); + + /* global state functions */ int gnutls_global_init (void); @@ -2049,7 +2050,8 @@ typedef int (*gnutls_pin_callback_t) (void *userdata, int attempt, #define GNUTLS_E_TPM_KEY_NOT_FOUND -333 #define GNUTLS_E_TPM_UNINITIALIZED -334 -#define GNUTLS_E_NO_CERTIFICATE_STATUS -329 +#define GNUTLS_E_NO_CERTIFICATE_STATUS -340 +#define GNUTLS_E_OCSP_RESPONSE_ERROR -341 #define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 diff --git a/lib/includes/gnutls/ocsp.h b/lib/includes/gnutls/ocsp.h index db16b70c10..2ad220e97e 100644 --- a/lib/includes/gnutls/ocsp.h +++ b/lib/includes/gnutls/ocsp.h @@ -249,6 +249,9 @@ extern "C" unsigned int *verify, unsigned int flags); + int gnutls_ocsp_resp_check_crt (gnutls_ocsp_resp_t resp, + gnutls_x509_crt_t crt); + #ifdef __cplusplus } #endif diff --git a/lib/libgnutls.map b/lib/libgnutls.map index ffcb597ef1..af01488529 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -836,10 +836,11 @@ GNUTLS_3_1_0 { gnutls_heartbeat_allowed; gnutls_heartbeat_get_timeout; gnutls_heartbeat_set_timeouts; - gnutls_status_request_ocsp_client; - gnutls_status_request_get_ocsp; - gnutls_status_request_ocsp_server; - gnutls_status_request_ocsp_server_file; + gnutls_certificate_set_ocsp_status_request_function; + gnutls_certificate_set_ocsp_status_request_file; + gnutls_ocsp_status_request_enable_client; + gnutls_ocsp_status_request_get; + gnutls_ocsp_resp_check_crt; } GNUTLS_3_0_0; GNUTLS_PRIVATE { diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index 0857e33acf..b7e134c784 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -1274,6 +1274,102 @@ gnutls_ocsp_resp_get_produced (gnutls_ocsp_resp_t resp) return c_time; } +/** + * gnutls_ocsp_resp_check_crt: + * @resp: should contain a #gnutls_ocsp_resp_t structure + * @crt: The certificate to check + * + * This function will check whether the OCSP response + * is about the provided certificate. + * + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code is returned. + **/ +int +gnutls_ocsp_resp_check_crt (gnutls_ocsp_resp_t resp, + gnutls_x509_crt_t crt) +{ +int ret; +gnutls_digest_algorithm_t digest; +gnutls_datum_t rdn_hash = {NULL, 0}, rserial = {NULL, 0}; +gnutls_datum_t cserial = {NULL, 0}; +gnutls_datum_t dn = {NULL, 0}; +uint8_t cdn_hash[MAX_HASH_SIZE]; +size_t t, hash_len; + + ret = gnutls_ocsp_resp_get_single (resp, 0, &digest, &rdn_hash, NULL, + &rserial, NULL, NULL, NULL, NULL, NULL); + if (ret < 0) + return gnutls_assert_val(ret); + + if (rserial.size == 0 || digest == GNUTLS_DIG_UNKNOWN) + { + ret = gnutls_assert_val(GNUTLS_E_OCSP_RESPONSE_ERROR); + goto cleanup; + } + + hash_len = _gnutls_hash_get_algo_len(digest); + if (hash_len != rdn_hash.size) + { + ret = gnutls_assert_val(GNUTLS_E_OCSP_RESPONSE_ERROR); + goto cleanup; + } + + cserial.size = rserial.size; + cserial.data = gnutls_malloc(cserial.size); + if (cserial.data == NULL) + { + ret = gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); + goto cleanup; + } + + t = cserial.size; + ret = gnutls_x509_crt_get_serial(crt, cserial.data, &t); + if (ret < 0) + { + gnutls_assert(); + goto cleanup; + } + + if (rserial.size != cserial.size || memcmp(cserial.data, rserial.data, rserial.size) != 0) + { + ret = GNUTLS_E_OCSP_RESPONSE_ERROR; + gnutls_assert(); + goto cleanup; + } + + ret = gnutls_x509_crt_get_raw_issuer_dn(crt, &dn); + if (ret < 0) + { + gnutls_assert(); + goto cleanup; + } + + ret = _gnutls_hash_fast( digest, dn.data, dn.size, cdn_hash); + if (ret < 0) + { + gnutls_assert(); + goto cleanup; + } + + if (memcmp(cdn_hash, rdn_hash.data, hash_len) != 0) + { + ret = GNUTLS_E_OCSP_RESPONSE_ERROR; + gnutls_assert(); + goto cleanup; + } + + ret = 0; + +cleanup: + gnutls_free(rdn_hash.data); + gnutls_free(rserial.data); + gnutls_free(cserial.data); + gnutls_free(dn.data); + + return ret; +} + /** * gnutls_ocsp_resp_get_single: * @resp: should contain a #gnutls_ocsp_resp_t structure diff --git a/src/cli-args.c b/src/cli-args.c index 703b13cc03..2566d51866 100644 --- a/src/cli-args.c +++ b/src/cli-args.c @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (cli-args.c) * - * It has been AutoGen-ed September 28, 2012 at 01:15:40 PM by AutoGen 5.12 + * It has been AutoGen-ed September 30, 2012 at 03:25:07 PM by AutoGen 5.16 * From the definitions cli-args.def * and the template file options * - * Generated from AutoOpts 35:0:10 templates. + * 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 @@ -16,15 +16,16 @@ * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * - * This source file is copyrighted and licensed under the following terms: + * The gnutls-cli program is copyrighted and licensed + * under the following terms: * * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the * GNU General Public License, version 3 or later * - * -PFX>gnutls-cli is free software: you can redistribute it and/or modify it + * + * gnutls-cli is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -38,14 +39,15 @@ PFX>gnutls-cli is free software: you can redistribute it and/or modify it * with this program. If not, see . */ +#ifndef __doxygen__ +#define OPTION_CODE_COMPILE 1 +#include "cli-args.h" #include #include #include #include #include -#define OPTION_CODE_COMPILE 1 -#include "cli-args.h" #ifdef __cplusplus extern "C" { @@ -54,442 +56,545 @@ extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -static char const zCopyright[281] = -"gnutls-cli @VERSION@\n\ -Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n\ -This is free software. It is licensed for use, modification and\n\ -redistribution under the terms of the\n\ -GNU General Public License, version 3 or later\n\ - \n"; -static char const zLicenseDescrip[609] = -"gnutls-cli 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\n\ -Free Software Foundation, either version 3 of the License, or (at your\n\ -option) any later version.\n\n\ -gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n\ -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\ -for more details.\n\n\ -You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n"; - -extern tUsageProc optionUsage; +#define zCopyright (gnutls_cli_opt_strs+0) +#define zLicenseDescrip (gnutls_cli_opt_strs+281) + #ifndef NULL # define NULL 0 #endif /* - * Debug option description: + * gnutls-cli option static const strings */ -static char const zDebugText[] = - "Enable debugging."; -static char const zDebug_NAME[] = "DEBUG"; -static char const zDebug_Name[] = "debug"; -#define DEBUG_FLAGS (OPTST_DISABLED \ +static char const gnutls_cli_opt_strs[3605] = +/* 0 */ "gnutls-cli @VERSION@\n" + "Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n" + "This is free software. It is licensed for use, modification and\n" + "redistribution under the terms of the\n" + "GNU General Public License, version 3 or later\n" + " \n\0" +/* 281 */ "gnutls-cli is free software: you can redistribute it and/or modify it under\n" + "the terms of the GNU General Public License as published by the Free\n" + "Software Foundation, either version 3 of the License, or (at your option)\n" + "any later version.\n\n" + "gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n" + "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" + "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n" + "more details.\n\n" + "You should have received a copy of the GNU General Public License along\n" + "with this program. If not, see .\n\0" +/* 890 */ "Enable debugging.\0" +/* 908 */ "DEBUG\0" +/* 914 */ "debug\0" +/* 920 */ "More verbose output\0" +/* 940 */ "VERBOSE\0" +/* 948 */ "verbose\0" +/* 956 */ "Enable trust on first use authentication\0" +/* 997 */ "TOFU\0" +/* 1002 */ "no-tofu\0" +/* 1010 */ "no\0" +/* 1013 */ "Enable OCSP certificate verification\0" +/* 1050 */ "OCSP\0" +/* 1055 */ "no-ocsp\0" +/* 1063 */ "Establish a session and resume\0" +/* 1094 */ "RESUME\0" +/* 1101 */ "resume\0" +/* 1108 */ "Activate heartbeat support\0" +/* 1135 */ "HEARTBEAT\0" +/* 1145 */ "heartbeat\0" +/* 1155 */ "Establish a session and rehandshake\0" +/* 1191 */ "REHANDSHAKE\0" +/* 1203 */ "rehandshake\0" +/* 1215 */ "Don't accept session tickets\0" +/* 1244 */ "NOTICKET\0" +/* 1253 */ "noticket\0" +/* 1262 */ "Enable OCSP status request\0" +/* 1289 */ "OCSP_STATUS_REQUEST\0" +/* 1309 */ "ocsp-status-request\0" +/* 1329 */ "Connect, establish a plain session and start TLS.\0" +/* 1379 */ "STARTTLS\0" +/* 1388 */ "starttls\0" +/* 1397 */ "Use DTLS (datagram TLS) over UDP\0" +/* 1430 */ "UDP\0" +/* 1434 */ "udp\0" +/* 1438 */ "Set MTU for datagram TLS\0" +/* 1463 */ "MTU\0" +/* 1467 */ "mtu\0" +/* 1471 */ "Send CR LF instead of LF\0" +/* 1496 */ "CRLF\0" +/* 1501 */ "crlf\0" +/* 1506 */ "Use DER format for certificates to read from\0" +/* 1551 */ "X509FMTDER\0" +/* 1562 */ "x509fmtder\0" +/* 1573 */ "Send the openpgp fingerprint, instead of the key\0" +/* 1622 */ "FINGERPRINT\0" +/* 1634 */ "fingerprint\0" +/* 1646 */ "Disable all the TLS extensions\0" +/* 1677 */ "DISABLE_EXTENSIONS\0" +/* 1696 */ "disable-extensions\0" +/* 1715 */ "Print peer's certificate in PEM format\0" +/* 1754 */ "PRINT_CERT\0" +/* 1765 */ "print-cert\0" +/* 1776 */ "The maximum record size to advertize\0" +/* 1813 */ "RECORDSIZE\0" +/* 1824 */ "recordsize\0" +/* 1835 */ "The minimum number of bits allowed for DH\0" +/* 1877 */ "DH_BITS\0" +/* 1885 */ "dh-bits\0" +/* 1893 */ "Priorities string\0" +/* 1911 */ "PRIORITY\0" +/* 1920 */ "priority\0" +/* 1929 */ "Certificate file or PKCS #11 URL to use\0" +/* 1969 */ "X509CAFILE\0" +/* 1980 */ "x509cafile\0" +/* 1991 */ "CRL file to use\0" +/* 2007 */ "X509CRLFILE\0" +/* 2019 */ "x509crlfile\0" +/* 2031 */ "PGP Key file to use\0" +/* 2051 */ "PGPKEYFILE\0" +/* 2062 */ "pgpkeyfile\0" +/* 2073 */ "PGP Key ring file to use\0" +/* 2098 */ "PGPKEYRING\0" +/* 2109 */ "pgpkeyring\0" +/* 2120 */ "PGP Public Key (certificate) file to use\0" +/* 2161 */ "PGPCERTFILE\0" +/* 2173 */ "pgpcertfile\0" +/* 2185 */ "X.509 key file or PKCS #11 URL to use\0" +/* 2223 */ "X509KEYFILE\0" +/* 2235 */ "x509keyfile\0" +/* 2247 */ "X.509 Certificate file or PKCS #11 URL to use\0" +/* 2293 */ "X509CERTFILE\0" +/* 2306 */ "x509certfile\0" +/* 2319 */ "PGP subkey to use (hex or auto)\0" +/* 2351 */ "PGPSUBKEY\0" +/* 2361 */ "pgpsubkey\0" +/* 2371 */ "SRP username to use\0" +/* 2391 */ "SRPUSERNAME\0" +/* 2403 */ "srpusername\0" +/* 2415 */ "SRP password to use\0" +/* 2435 */ "SRPPASSWD\0" +/* 2445 */ "srppasswd\0" +/* 2455 */ "PSK username to use\0" +/* 2475 */ "PSKUSERNAME\0" +/* 2487 */ "pskusername\0" +/* 2499 */ "PSK key (in hex) to use\0" +/* 2523 */ "PSKKEY\0" +/* 2530 */ "pskkey\0" +/* 2537 */ "The port or service to connect to\0" +/* 2571 */ "PORT\0" +/* 2576 */ "port\0" +/* 2581 */ "Don't abort program if server certificate can't be validated\0" +/* 2642 */ "INSECURE\0" +/* 2651 */ "insecure\0" +/* 2660 */ "Benchmark individual ciphers\0" +/* 2689 */ "BENCHMARK_CIPHERS\0" +/* 2707 */ "benchmark-ciphers\0" +/* 2725 */ "Benchmark individual software ciphers (no hw acceleration)\0" +/* 2784 */ "BENCHMARK_SOFT_CIPHERS\0" +/* 2807 */ "benchmark-soft-ciphers\0" +/* 2830 */ "Benchmark TLS key exchange methods\0" +/* 2865 */ "BENCHMARK_TLS_KX\0" +/* 2882 */ "benchmark-tls-kx\0" +/* 2899 */ "Benchmark TLS ciphers\0" +/* 2921 */ "BENCHMARK_TLS_CIPHERS\0" +/* 2943 */ "benchmark-tls-ciphers\0" +/* 2965 */ "Print a list of the supported algorithms and modes\0" +/* 3016 */ "LIST\0" +/* 3021 */ "list\0" +/* 3026 */ "Display extended usage information and exit\0" +/* 3070 */ "help\0" +/* 3075 */ "Extended usage information passed thru pager\0" +/* 3120 */ "more-help\0" +/* 3130 */ "Output version information and exit\0" +/* 3166 */ "version\0" +/* 3174 */ "GNUTLS_CLI\0" +/* 3185 */ "gnutls-cli - GnuTLS client - Ver. @VERSION@\n" + "USAGE: %s [ - [] | --[{=| }] ]... [hostname]\n\0" +/* 3298 */ "bug-gnutls@gnu.org\0" +/* 3317 */ "\n\n\0" +/* 3320 */ "\n" + "Simple client program to set up a TLS connection to some other computer. It\n" + "sets up a TLS connection and forwards data from the standard input to the\n" + "secured socket and vice versa.\n\0" +/* 3504 */ "gnutls-cli @VERSION@\0" +/* 3525 */ "Usage: gnutls-cli [options] hostname\n" + "gnutls-cli --help for usage instructions.\n"; + +/* + * debug option description: + */ +#define DEBUG_DESC (gnutls_cli_opt_strs+890) +#define DEBUG_NAME (gnutls_cli_opt_strs+908) +#define DEBUG_name (gnutls_cli_opt_strs+914) +#define DEBUG_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* - * Verbose option description: + * verbose option description: */ -static char const zVerboseText[] = - "More verbose output"; -static char const zVerbose_NAME[] = "VERBOSE"; -static char const zVerbose_Name[] = "verbose"; -#define VERBOSE_FLAGS (OPTST_DISABLED) +#define VERBOSE_DESC (gnutls_cli_opt_strs+920) +#define VERBOSE_NAME (gnutls_cli_opt_strs+940) +#define VERBOSE_name (gnutls_cli_opt_strs+948) +#define VERBOSE_FLAGS (OPTST_DISABLED) /* - * Tofu option description: + * tofu option description: */ -static char const zTofuText[] = - "Enable trust on first use authentication"; -static char const zTofu_NAME[] = "TOFU"; -static char const zNotTofu_Name[] = "no-tofu"; -static char const zNotTofu_Pfx[] = "no"; -#define zTofu_Name (zNotTofu_Name + 3) -#define TOFU_FLAGS (OPTST_DISABLED) +#define TOFU_DESC (gnutls_cli_opt_strs+956) +#define TOFU_NAME (gnutls_cli_opt_strs+997) +#define NOT_TOFU_name (gnutls_cli_opt_strs+1002) +#define NOT_TOFU_PFX (gnutls_cli_opt_strs+1010) +#define TOFU_name (NOT_TOFU_name + 3) +#define TOFU_FLAGS (OPTST_DISABLED) /* - * Ocsp option description: + * ocsp option description: */ -static char const zOcspText[] = - "Enable OCSP certificate verification"; -static char const zOcsp_NAME[] = "OCSP"; -static char const zNotOcsp_Name[] = "no-ocsp"; -static char const zNotOcsp_Pfx[] = "no"; -#define zOcsp_Name (zNotOcsp_Name + 3) -#define OCSP_FLAGS (OPTST_DISABLED) +#define OCSP_DESC (gnutls_cli_opt_strs+1013) +#define OCSP_NAME (gnutls_cli_opt_strs+1050) +#define NOT_OCSP_name (gnutls_cli_opt_strs+1055) +#define NOT_OCSP_PFX (gnutls_cli_opt_strs+1010) +#define OCSP_name (NOT_OCSP_name + 3) +#define OCSP_FLAGS (OPTST_DISABLED) /* - * Resume option description: + * resume option description: */ -static char const zResumeText[] = - "Establish a session and resume"; -static char const zResume_NAME[] = "RESUME"; -static char const zResume_Name[] = "resume"; -#define RESUME_FLAGS (OPTST_DISABLED) +#define RESUME_DESC (gnutls_cli_opt_strs+1063) +#define RESUME_NAME (gnutls_cli_opt_strs+1094) +#define RESUME_name (gnutls_cli_opt_strs+1101) +#define RESUME_FLAGS (OPTST_DISABLED) /* - * Heartbeat option description: + * heartbeat option description: */ -static char const zHeartbeatText[] = - "Activate heartbeat support"; -static char const zHeartbeat_NAME[] = "HEARTBEAT"; -static char const zHeartbeat_Name[] = "heartbeat"; -#define HEARTBEAT_FLAGS (OPTST_DISABLED) +#define HEARTBEAT_DESC (gnutls_cli_opt_strs+1108) +#define HEARTBEAT_NAME (gnutls_cli_opt_strs+1135) +#define HEARTBEAT_name (gnutls_cli_opt_strs+1145) +#define HEARTBEAT_FLAGS (OPTST_DISABLED) /* - * Rehandshake option description: + * rehandshake option description: */ -static char const zRehandshakeText[] = - "Establish a session and rehandshake"; -static char const zRehandshake_NAME[] = "REHANDSHAKE"; -static char const zRehandshake_Name[] = "rehandshake"; -#define REHANDSHAKE_FLAGS (OPTST_DISABLED) +#define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1155) +#define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1191) +#define REHANDSHAKE_name (gnutls_cli_opt_strs+1203) +#define REHANDSHAKE_FLAGS (OPTST_DISABLED) /* - * Noticket option description: + * noticket option description: */ -static char const zNoticketText[] = - "Don't accept session tickets"; -static char const zNoticket_NAME[] = "NOTICKET"; -static char const zNoticket_Name[] = "noticket"; -#define NOTICKET_FLAGS (OPTST_DISABLED) +#define NOTICKET_DESC (gnutls_cli_opt_strs+1215) +#define NOTICKET_NAME (gnutls_cli_opt_strs+1244) +#define NOTICKET_name (gnutls_cli_opt_strs+1253) +#define NOTICKET_FLAGS (OPTST_DISABLED) /* - * Status_Request_Ocsp option description: + * ocsp-status-request option description: */ -static char const zStatus_Request_OcspText[] = - "Request OCSP status request"; -static char const zStatus_Request_Ocsp_NAME[] = "STATUS_REQUEST_OCSP"; -static char const zStatus_Request_Ocsp_Name[]= "status-request-ocsp"; -#define STATUS_REQUEST_OCSP_FLAGS (OPTST_DISABLED) +#define OCSP_STATUS_REQUEST_DESC (gnutls_cli_opt_strs+1262) +#define OCSP_STATUS_REQUEST_NAME (gnutls_cli_opt_strs+1289) +#define OCSP_STATUS_REQUEST_name (gnutls_cli_opt_strs+1309) +#define OCSP_STATUS_REQUEST_FLAGS (OPTST_DISABLED) /* - * Starttls option description: + * starttls option description: */ -static char const zStarttlsText[] = - "Connect, establish a plain session and start TLS."; -static char const zStarttls_NAME[] = "STARTTLS"; -static char const zStarttls_Name[] = "starttls"; -#define STARTTLS_FLAGS (OPTST_DISABLED) +#define STARTTLS_DESC (gnutls_cli_opt_strs+1329) +#define STARTTLS_NAME (gnutls_cli_opt_strs+1379) +#define STARTTLS_name (gnutls_cli_opt_strs+1388) +#define STARTTLS_FLAGS (OPTST_DISABLED) /* - * Udp option description: + * udp option description: */ -static char const zUdpText[] = - "Use DTLS (datagram TLS) over UDP"; -static char const zUdp_NAME[] = "UDP"; -static char const zUdp_Name[] = "udp"; -#define UDP_FLAGS (OPTST_DISABLED) +#define UDP_DESC (gnutls_cli_opt_strs+1397) +#define UDP_NAME (gnutls_cli_opt_strs+1430) +#define UDP_name (gnutls_cli_opt_strs+1434) +#define UDP_FLAGS (OPTST_DISABLED) /* - * Mtu option description: + * mtu option description: */ -static char const zMtuText[] = - "Set MTU for datagram TLS"; -static char const zMtu_NAME[] = "MTU"; -static char const zMtu_Name[] = "mtu"; -#define MTU_FLAGS (OPTST_DISABLED \ +#define MTU_DESC (gnutls_cli_opt_strs+1438) +#define MTU_NAME (gnutls_cli_opt_strs+1463) +#define MTU_name (gnutls_cli_opt_strs+1467) +#define MTU_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* - * Crlf option description: + * crlf option description: */ -static char const zCrlfText[] = - "Send CR LF instead of LF"; -static char const zCrlf_NAME[] = "CRLF"; -static char const zCrlf_Name[] = "crlf"; -#define CRLF_FLAGS (OPTST_DISABLED) +#define CRLF_DESC (gnutls_cli_opt_strs+1471) +#define CRLF_NAME (gnutls_cli_opt_strs+1496) +#define CRLF_name (gnutls_cli_opt_strs+1501) +#define CRLF_FLAGS (OPTST_DISABLED) /* - * X509fmtder option description: + * x509fmtder option description: */ -static char const zX509fmtderText[] = - "Use DER format for certificates to read from"; -static char const zX509fmtder_NAME[] = "X509FMTDER"; -static char const zX509fmtder_Name[] = "x509fmtder"; -#define X509FMTDER_FLAGS (OPTST_DISABLED) +#define X509FMTDER_DESC (gnutls_cli_opt_strs+1506) +#define X509FMTDER_NAME (gnutls_cli_opt_strs+1551) +#define X509FMTDER_name (gnutls_cli_opt_strs+1562) +#define X509FMTDER_FLAGS (OPTST_DISABLED) /* - * Fingerprint option description: + * fingerprint option description: */ -static char const zFingerprintText[] = - "Send the openpgp fingerprint, instead of the key"; -static char const zFingerprint_NAME[] = "FINGERPRINT"; -static char const zFingerprint_Name[] = "fingerprint"; -#define FINGERPRINT_FLAGS (OPTST_DISABLED) +#define FINGERPRINT_DESC (gnutls_cli_opt_strs+1573) +#define FINGERPRINT_NAME (gnutls_cli_opt_strs+1622) +#define FINGERPRINT_name (gnutls_cli_opt_strs+1634) +#define FINGERPRINT_FLAGS (OPTST_DISABLED) /* - * Disable_Extensions option description: + * disable-extensions option description: */ -static char const zDisable_ExtensionsText[] = - "Disable all the TLS extensions"; -static char const zDisable_Extensions_NAME[] = "DISABLE_EXTENSIONS"; -static char const zDisable_Extensions_Name[] = "disable-extensions"; -#define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED) +#define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+1646) +#define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+1677) +#define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+1696) +#define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED) /* - * Print_Cert option description: + * print-cert option description: */ -static char const zPrint_CertText[] = - "Print peer's certificate in PEM format"; -static char const zPrint_Cert_NAME[] = "PRINT_CERT"; -static char const zPrint_Cert_Name[] = "print-cert"; -#define PRINT_CERT_FLAGS (OPTST_DISABLED) +#define PRINT_CERT_DESC (gnutls_cli_opt_strs+1715) +#define PRINT_CERT_NAME (gnutls_cli_opt_strs+1754) +#define PRINT_CERT_name (gnutls_cli_opt_strs+1765) +#define PRINT_CERT_FLAGS (OPTST_DISABLED) /* - * Recordsize option description: + * recordsize option description: */ -static char const zRecordsizeText[] = - "The maximum record size to advertize"; -static char const zRecordsize_NAME[] = "RECORDSIZE"; -static char const zRecordsize_Name[] = "recordsize"; -#define RECORDSIZE_FLAGS (OPTST_DISABLED \ +#define RECORDSIZE_DESC (gnutls_cli_opt_strs+1776) +#define RECORDSIZE_NAME (gnutls_cli_opt_strs+1813) +#define RECORDSIZE_name (gnutls_cli_opt_strs+1824) +#define RECORDSIZE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* - * Dh_Bits option description: + * dh-bits option description: */ -static char const zDh_BitsText[] = - "The minimum number of bits allowed for DH"; -static char const zDh_Bits_NAME[] = "DH_BITS"; -static char const zDh_Bits_Name[] = "dh-bits"; -#define DH_BITS_FLAGS (OPTST_DISABLED \ +#define DH_BITS_DESC (gnutls_cli_opt_strs+1835) +#define DH_BITS_NAME (gnutls_cli_opt_strs+1877) +#define DH_BITS_name (gnutls_cli_opt_strs+1885) +#define DH_BITS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* - * Priority option description: + * priority option description: */ -static char const zPriorityText[] = - "Priorities string"; -static char const zPriority_NAME[] = "PRIORITY"; -static char const zPriority_Name[] = "priority"; -#define PRIORITY_FLAGS (OPTST_DISABLED \ +#define PRIORITY_DESC (gnutls_cli_opt_strs+1893) +#define PRIORITY_NAME (gnutls_cli_opt_strs+1911) +#define PRIORITY_name (gnutls_cli_opt_strs+1920) +#define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509cafile option description: + * x509cafile option description: */ -static char const zX509cafileText[] = - "Certificate file or PKCS #11 URL to use"; -static char const zX509cafile_NAME[] = "X509CAFILE"; -static char const zX509cafile_Name[] = "x509cafile"; -#define X509CAFILE_FLAGS (OPTST_DISABLED \ +#define X509CAFILE_DESC (gnutls_cli_opt_strs+1929) +#define X509CAFILE_NAME (gnutls_cli_opt_strs+1969) +#define X509CAFILE_name (gnutls_cli_opt_strs+1980) +#define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509crlfile option description: + * x509crlfile option description: */ -static char const zX509crlfileText[] = - "CRL file to use"; -static char const zX509crlfile_NAME[] = "X509CRLFILE"; -static char const zX509crlfile_Name[] = "x509crlfile"; -#define X509CRLFILE_FLAGS (OPTST_DISABLED \ +#define X509CRLFILE_DESC (gnutls_cli_opt_strs+1991) +#define X509CRLFILE_NAME (gnutls_cli_opt_strs+2007) +#define X509CRLFILE_name (gnutls_cli_opt_strs+2019) +#define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpkeyfile option description: + * pgpkeyfile option description: */ -static char const zPgpkeyfileText[] = - "PGP Key file to use"; -static char const zPgpkeyfile_NAME[] = "PGPKEYFILE"; -static char const zPgpkeyfile_Name[] = "pgpkeyfile"; -#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ +#define PGPKEYFILE_DESC (gnutls_cli_opt_strs+2031) +#define PGPKEYFILE_NAME (gnutls_cli_opt_strs+2051) +#define PGPKEYFILE_name (gnutls_cli_opt_strs+2062) +#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpkeyring option description: + * pgpkeyring option description: */ -static char const zPgpkeyringText[] = - "PGP Key ring file to use"; -static char const zPgpkeyring_NAME[] = "PGPKEYRING"; -static char const zPgpkeyring_Name[] = "pgpkeyring"; -#define PGPKEYRING_FLAGS (OPTST_DISABLED \ +#define PGPKEYRING_DESC (gnutls_cli_opt_strs+2073) +#define PGPKEYRING_NAME (gnutls_cli_opt_strs+2098) +#define PGPKEYRING_name (gnutls_cli_opt_strs+2109) +#define PGPKEYRING_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpcertfile option description: + * pgpcertfile option description: */ -static char const zPgpcertfileText[] = - "PGP Public Key (certificate) file to use"; -static char const zPgpcertfile_NAME[] = "PGPCERTFILE"; -static char const zPgpcertfile_Name[] = "pgpcertfile"; -#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ +#define PGPCERTFILE_DESC (gnutls_cli_opt_strs+2120) +#define PGPCERTFILE_NAME (gnutls_cli_opt_strs+2161) +#define PGPCERTFILE_name (gnutls_cli_opt_strs+2173) +#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * X509keyfile option description: + * x509keyfile option description: */ -static char const zX509keyfileText[] = - "X.509 key file or PKCS #11 URL to use"; -static char const zX509keyfile_NAME[] = "X509KEYFILE"; -static char const zX509keyfile_Name[] = "x509keyfile"; -#define X509KEYFILE_FLAGS (OPTST_DISABLED \ +#define X509KEYFILE_DESC (gnutls_cli_opt_strs+2185) +#define X509KEYFILE_NAME (gnutls_cli_opt_strs+2223) +#define X509KEYFILE_name (gnutls_cli_opt_strs+2235) +#define X509KEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509certfile option description: + * x509certfile option description: */ -static char const zX509certfileText[] = - "X.509 Certificate file or PKCS #11 URL to use"; -static char const zX509certfile_NAME[] = "X509CERTFILE"; -static char const zX509certfile_Name[] = "x509certfile"; -#define X509CERTFILE_FLAGS (OPTST_DISABLED \ +#define X509CERTFILE_DESC (gnutls_cli_opt_strs+2247) +#define X509CERTFILE_NAME (gnutls_cli_opt_strs+2293) +#define X509CERTFILE_name (gnutls_cli_opt_strs+2306) +#define X509CERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Pgpsubkey option description: + * pgpsubkey option description: */ -static char const zPgpsubkeyText[] = - "PGP subkey to use (hex or auto)"; -static char const zPgpsubkey_NAME[] = "PGPSUBKEY"; -static char const zPgpsubkey_Name[] = "pgpsubkey"; -#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ +#define PGPSUBKEY_DESC (gnutls_cli_opt_strs+2319) +#define PGPSUBKEY_NAME (gnutls_cli_opt_strs+2351) +#define PGPSUBKEY_name (gnutls_cli_opt_strs+2361) +#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Srpusername option description: + * srpusername option description: */ -static char const zSrpusernameText[] = - "SRP username to use"; -static char const zSrpusername_NAME[] = "SRPUSERNAME"; -static char const zSrpusername_Name[] = "srpusername"; -#define SRPUSERNAME_FLAGS (OPTST_DISABLED \ +#define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2371) +#define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2391) +#define SRPUSERNAME_name (gnutls_cli_opt_strs+2403) +#define SRPUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Srppasswd option description: + * srppasswd option description: */ -static char const zSrppasswdText[] = - "SRP password to use"; -static char const zSrppasswd_NAME[] = "SRPPASSWD"; -static char const zSrppasswd_Name[] = "srppasswd"; -#define SRPPASSWD_FLAGS (OPTST_DISABLED \ +#define SRPPASSWD_DESC (gnutls_cli_opt_strs+2415) +#define SRPPASSWD_NAME (gnutls_cli_opt_strs+2435) +#define SRPPASSWD_name (gnutls_cli_opt_strs+2445) +#define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Pskusername option description: + * pskusername option description: */ -static char const zPskusernameText[] = - "PSK username to use"; -static char const zPskusername_NAME[] = "PSKUSERNAME"; -static char const zPskusername_Name[] = "pskusername"; -#define PSKUSERNAME_FLAGS (OPTST_DISABLED \ +#define PSKUSERNAME_DESC (gnutls_cli_opt_strs+2455) +#define PSKUSERNAME_NAME (gnutls_cli_opt_strs+2475) +#define PSKUSERNAME_name (gnutls_cli_opt_strs+2487) +#define PSKUSERNAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Pskkey option description: + * pskkey option description: */ -static char const zPskkeyText[] = - "PSK key (in hex) to use"; -static char const zPskkey_NAME[] = "PSKKEY"; -static char const zPskkey_Name[] = "pskkey"; -#define PSKKEY_FLAGS (OPTST_DISABLED \ +#define PSKKEY_DESC (gnutls_cli_opt_strs+2499) +#define PSKKEY_NAME (gnutls_cli_opt_strs+2523) +#define PSKKEY_name (gnutls_cli_opt_strs+2530) +#define PSKKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Port option description: + * port option description: */ -static char const zPortText[] = - "The port or service to connect to"; -static char const zPort_NAME[] = "PORT"; -static char const zPort_Name[] = "port"; -#define PORT_FLAGS (OPTST_DISABLED \ +#define PORT_DESC (gnutls_cli_opt_strs+2537) +#define PORT_NAME (gnutls_cli_opt_strs+2571) +#define PORT_name (gnutls_cli_opt_strs+2576) +#define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Insecure option description: + * insecure option description: */ -static char const zInsecureText[] = - "Don't abort program if server certificate can't be validated"; -static char const zInsecure_NAME[] = "INSECURE"; -static char const zInsecure_Name[] = "insecure"; -#define INSECURE_FLAGS (OPTST_DISABLED) +#define INSECURE_DESC (gnutls_cli_opt_strs+2581) +#define INSECURE_NAME (gnutls_cli_opt_strs+2642) +#define INSECURE_name (gnutls_cli_opt_strs+2651) +#define INSECURE_FLAGS (OPTST_DISABLED) /* - * Benchmark_Ciphers option description: + * benchmark-ciphers option description: */ -static char const zBenchmark_CiphersText[] = - "Benchmark individual ciphers"; -static char const zBenchmark_Ciphers_NAME[] = "BENCHMARK_CIPHERS"; -static char const zBenchmark_Ciphers_Name[] = "benchmark-ciphers"; -#define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) +#define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+2660) +#define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+2689) +#define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+2707) +#define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED) /* - * Benchmark_Soft_Ciphers option description: + * benchmark-soft-ciphers option description: */ -static char const zBenchmark_Soft_CiphersText[] = - "Benchmark individual software ciphers (no hw acceleration)"; -static char const zBenchmark_Soft_Ciphers_NAME[] = "BENCHMARK_SOFT_CIPHERS"; -static char const zBenchmark_Soft_Ciphers_Name[]= "benchmark-soft-ciphers"; -#define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED) +#define BENCHMARK_SOFT_CIPHERS_DESC (gnutls_cli_opt_strs+2725) +#define BENCHMARK_SOFT_CIPHERS_NAME (gnutls_cli_opt_strs+2784) +#define BENCHMARK_SOFT_CIPHERS_name (gnutls_cli_opt_strs+2807) +#define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED) /* - * Benchmark_Tls_Kx option description: + * benchmark-tls-kx option description: */ -static char const zBenchmark_Tls_KxText[] = - "Benchmark TLS key exchange methods"; -static char const zBenchmark_Tls_Kx_NAME[] = "BENCHMARK_TLS_KX"; -static char const zBenchmark_Tls_Kx_Name[] = "benchmark-tls-kx"; -#define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) +#define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+2830) +#define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+2865) +#define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+2882) +#define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED) /* - * Benchmark_Tls_Ciphers option description: + * benchmark-tls-ciphers option description: */ -static char const zBenchmark_Tls_CiphersText[] = - "Benchmark TLS ciphers"; -static char const zBenchmark_Tls_Ciphers_NAME[] = "BENCHMARK_TLS_CIPHERS"; -static char const zBenchmark_Tls_Ciphers_Name[]= "benchmark-tls-ciphers"; -#define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) +#define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+2899) +#define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+2921) +#define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+2943) +#define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED) /* - * List option description: + * list option description: */ -static char const zListText[] = - "Print a list of the supported algorithms and modes"; -static char const zList_NAME[] = "LIST"; -static char const zList_Name[] = "list"; -#define LIST_FLAGS (OPTST_DISABLED) +#define LIST_DESC (gnutls_cli_opt_strs+2965) +#define LIST_NAME (gnutls_cli_opt_strs+3016) +#define LIST_name (gnutls_cli_opt_strs+3021) +#define LIST_FLAGS (OPTST_DISABLED) /* * Help/More_Help/Version option descriptions: */ -static char const zHelpText[] = "Display extended usage information and exit"; -static char const zHelp_Name[] = "help"; +#define HELP_DESC (gnutls_cli_opt_strs+3026) +#define HELP_name (gnutls_cli_opt_strs+3070) #ifdef HAVE_WORKING_FORK -#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -static char const zMore_Help_Name[] = "more-help"; -static char const zMore_HelpText[] = "Extended usage information passed thru pager"; +#define MORE_HELP_DESC (gnutls_cli_opt_strs+3075) +#define MORE_HELP_name (gnutls_cli_opt_strs+3120) +#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else -#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#define zMore_Help_Name NULL -#define zMore_HelpText NULL +#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 OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT +# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else -# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT +# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ + OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif - -static char const zVersionText[] = "Output version information and exit"; -static char const zVersion_Name[] = "version"; +#define VER_DESC (gnutls_cli_opt_strs+3130) +#define VER_name (gnutls_cli_opt_strs+3166) /* * Declare option callback procedures */ extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVersionStderr; + optionBooleanVal, optionNestedVal, optionNumericVal, + optionPagedUsage, optionPrintVersion, optionResetOpt, + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug, doOptMtu, doOptPgpcertfile, doOptPgpkeyfile, doOptPgpkeyring, doOptRecordsize, doOptX509crlfile, doUsageOpt; +#define VER_PROC optionPrintVersion -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the Gnutls_Cli Option Descriptions. +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Define the gnutls-cli Option Descriptions. + * This is an array of OPTION_CT entries, one for each + * option that the gnutls-cli program responds to. */ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_DEBUG, @@ -497,11 +602,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, - /* desc, NAME, name */ zDebugText, zDebug_NAME, zDebug_Name, + /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_VERBOSE, @@ -509,11 +614,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, NOLIMIT, 0, /* opt state flags */ VERBOSE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --verbose */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zVerboseText, zVerbose_NAME, zVerbose_Name, + /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_TOFU, @@ -521,35 +626,35 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ TOFU_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --tofu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zTofuText, zTofu_NAME, zTofu_Name, - /* disablement strs */ zNotTofu_Name, zNotTofu_Pfx }, + /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name, + /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX }, { /* entry idx, value */ 3, VALUE_OPT_OCSP, /* equiv idx, value */ 3, VALUE_OPT_OCSP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ OCSP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --ocsp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zOcspText, zOcsp_NAME, zOcsp_Name, - /* disablement strs */ zNotOcsp_Name, zNotOcsp_Pfx }, + /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name, + /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX }, { /* entry idx, value */ 4, VALUE_OPT_RESUME, /* equiv idx, value */ 4, VALUE_OPT_RESUME, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RESUME_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --resume */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zResumeText, zResume_NAME, zResume_Name, + /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 5, VALUE_OPT_HEARTBEAT, @@ -557,11 +662,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HEARTBEAT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --heartbeat */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zHeartbeatText, zHeartbeat_NAME, zHeartbeat_Name, + /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 6, VALUE_OPT_REHANDSHAKE, @@ -569,11 +674,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ REHANDSHAKE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --rehandshake */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zRehandshakeText, zRehandshake_NAME, zRehandshake_Name, + /* desc, NAME, name */ REHANDSHAKE_DESC, REHANDSHAKE_NAME, REHANDSHAKE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 7, VALUE_OPT_NOTICKET, @@ -581,23 +686,23 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOTICKET_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --noticket */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zNoticketText, zNoticket_NAME, zNoticket_Name, + /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, /* disablement strs */ NULL, NULL }, - { /* entry idx, value */ 8, VALUE_OPT_STATUS_REQUEST_OCSP, - /* equiv idx, value */ 8, VALUE_OPT_STATUS_REQUEST_OCSP, + { /* entry idx, value */ 8, VALUE_OPT_OCSP_STATUS_REQUEST, + /* equiv idx, value */ 8, VALUE_OPT_OCSP_STATUS_REQUEST, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STATUS_REQUEST_OCSP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* opt state flags */ OCSP_STATUS_REQUEST_FLAGS, 0, + /* last opt argumnt */ { NULL }, /* --ocsp-status-request */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zStatus_Request_OcspText, zStatus_Request_Ocsp_NAME, zStatus_Request_Ocsp_Name, + /* desc, NAME, name */ OCSP_STATUS_REQUEST_DESC, OCSP_STATUS_REQUEST_NAME, OCSP_STATUS_REQUEST_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 9, VALUE_OPT_STARTTLS, @@ -605,11 +710,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ STARTTLS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --starttls */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zStarttlsText, zStarttls_NAME, zStarttls_Name, + /* desc, NAME, name */ STARTTLS_DESC, STARTTLS_NAME, STARTTLS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 10, VALUE_OPT_UDP, @@ -617,11 +722,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ UDP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --udp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zUdpText, zUdp_NAME, zUdp_Name, + /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 11, VALUE_OPT_MTU, @@ -629,11 +734,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MTU_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --mtu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptMtu, - /* desc, NAME, name */ zMtuText, zMtu_NAME, zMtu_Name, + /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 12, VALUE_OPT_CRLF, @@ -641,11 +746,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ CRLF_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --crlf */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zCrlfText, zCrlf_NAME, zCrlf_Name, + /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 13, VALUE_OPT_X509FMTDER, @@ -653,11 +758,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509FMTDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509fmtder */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509fmtderText, zX509fmtder_NAME, zX509fmtder_Name, + /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 14, VALUE_OPT_FINGERPRINT, @@ -665,11 +770,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ FINGERPRINT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --fingerprint */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zFingerprintText, zFingerprint_NAME, zFingerprint_Name, + /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, FINGERPRINT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 15, VALUE_OPT_DISABLE_EXTENSIONS, @@ -677,11 +782,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_EXTENSIONS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --disable-extensions */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zDisable_ExtensionsText, zDisable_Extensions_NAME, zDisable_Extensions_Name, + /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, DISABLE_EXTENSIONS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 16, VALUE_OPT_PRINT_CERT, @@ -689,11 +794,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRINT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --print-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPrint_CertText, zPrint_Cert_NAME, zPrint_Cert_Name, + /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 17, VALUE_OPT_RECORDSIZE, @@ -701,11 +806,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ RECORDSIZE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --recordsize */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptRecordsize, - /* desc, NAME, name */ zRecordsizeText, zRecordsize_NAME, zRecordsize_Name, + /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 18, VALUE_OPT_DH_BITS, @@ -713,11 +818,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DH_BITS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --dh-bits */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionNumericVal, - /* desc, NAME, name */ zDh_BitsText, zDh_Bits_NAME, zDh_Bits_Name, + /* desc, NAME, name */ DH_BITS_DESC, DH_BITS_NAME, DH_BITS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 19, VALUE_OPT_PRIORITY, @@ -725,11 +830,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRIORITY_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --priority */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPriorityText, zPriority_NAME, zPriority_Name, + /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 20, VALUE_OPT_X509CAFILE, @@ -737,11 +842,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CAFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509cafile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509cafileText, zX509cafile_NAME, zX509cafile_Name, + /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 21, VALUE_OPT_X509CRLFILE, @@ -749,11 +854,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CRLFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509crlfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509crlfile, - /* desc, NAME, name */ zX509crlfileText, zX509crlfile_NAME, zX509crlfile_Name, + /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 22, VALUE_OPT_PGPKEYFILE, @@ -761,11 +866,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyfile, - /* desc, NAME, name */ zPgpkeyfileText, zPgpkeyfile_NAME, zPgpkeyfile_Name, + /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 23, VALUE_OPT_PGPKEYRING, @@ -773,11 +878,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYRING_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpkeyring */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyring, - /* desc, NAME, name */ zPgpkeyringText, zPgpkeyring_NAME, zPgpkeyring_Name, + /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 24, VALUE_OPT_PGPCERTFILE, @@ -785,11 +890,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpcertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpcertfile, - /* desc, NAME, name */ zPgpcertfileText, zPgpcertfile_NAME, zPgpcertfile_Name, + /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 25, VALUE_OPT_X509KEYFILE, @@ -797,11 +902,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509KEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509keyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509keyfileText, zX509keyfile_NAME, zX509keyfile_Name, + /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 26, VALUE_OPT_X509CERTFILE, @@ -809,11 +914,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509certfileText, zX509certfile_NAME, zX509certfile_Name, + /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_PGPSUBKEY, @@ -821,11 +926,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPSUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpsubkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPgpsubkeyText, zPgpsubkey_NAME, zPgpsubkey_Name, + /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 28, VALUE_OPT_SRPUSERNAME, @@ -833,11 +938,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPUSERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --srpusername */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zSrpusernameText, zSrpusername_NAME, zSrpusername_Name, + /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, SRPUSERNAME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 29, VALUE_OPT_SRPPASSWD, @@ -845,11 +950,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --srppasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zSrppasswdText, zSrppasswd_NAME, zSrppasswd_Name, + /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 30, VALUE_OPT_PSKUSERNAME, @@ -857,11 +962,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKUSERNAME_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pskusername */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPskusernameText, zPskusername_NAME, zPskusername_Name, + /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, PSKUSERNAME_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 31, VALUE_OPT_PSKKEY, @@ -869,11 +974,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pskkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPskkeyText, zPskkey_NAME, zPskkey_Name, + /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 32, VALUE_OPT_PORT, @@ -881,11 +986,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --port */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPortText, zPort_NAME, zPort_Name, + /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 33, VALUE_OPT_INSECURE, @@ -893,11 +998,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ INSECURE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --insecure */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zInsecureText, zInsecure_NAME, zInsecure_Name, + /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 34, VALUE_OPT_BENCHMARK_CIPHERS, @@ -905,11 +1010,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --benchmark-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zBenchmark_CiphersText, zBenchmark_Ciphers_NAME, zBenchmark_Ciphers_Name, + /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, BENCHMARK_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 35, VALUE_OPT_BENCHMARK_SOFT_CIPHERS, @@ -917,11 +1022,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zBenchmark_Soft_CiphersText, zBenchmark_Soft_Ciphers_NAME, zBenchmark_Soft_Ciphers_Name, + /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 36, VALUE_OPT_BENCHMARK_TLS_KX, @@ -929,11 +1034,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_TLS_KX_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --benchmark-tls-kx */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zBenchmark_Tls_KxText, zBenchmark_Tls_Kx_NAME, zBenchmark_Tls_Kx_Name, + /* desc, NAME, name */ BENCHMARK_TLS_KX_DESC, BENCHMARK_TLS_KX_NAME, BENCHMARK_TLS_KX_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 37, VALUE_OPT_BENCHMARK_TLS_CIPHERS, @@ -941,11 +1046,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ BENCHMARK_TLS_CIPHERS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --benchmark-tls-ciphers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zBenchmark_Tls_CiphersText, zBenchmark_Tls_Ciphers_NAME, zBenchmark_Tls_Ciphers_Name, + /* desc, NAME, name */ BENCHMARK_TLS_CIPHERS_DESC, BENCHMARK_TLS_CIPHERS_NAME, BENCHMARK_TLS_CIPHERS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 38, VALUE_OPT_LIST, @@ -953,29 +1058,29 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --list */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zListText, zList_NAME, zList_Name, + /* 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, 0, + /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_VERSION_FLAGS, 0, + /* opt state flags */ VER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPrintVersion, - /* desc, NAME, name */ zVersionText, NULL, zVersion_Name, + /* 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, 0, + /* 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, @@ -983,41 +1088,36 @@ static tOptDesc optDesc[OPTION_CT] = { /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doUsageOpt, - /* desc, NAME, name */ zHelpText, NULL, zHelp_Name, + /* 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, 0, + /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_MORE_HELP_FLAGS, 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 */ zMore_HelpText, NULL, zMore_Help_Name, + /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, /* disablement strs */ NULL, NULL } }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Define the Gnutls_Cli Option Environment + * Define the gnutls-cli Option Environment */ -static char const zPROGNAME[11] = "GNUTLS_CLI"; -static char const zUsageTitle[113] = -"gnutls-cli - GnuTLS client - Ver. @VERSION@\n\ -USAGE: %s [ - [] | --[{=| }] ]... [hostname]\n"; -#define zRcName NULL -#define apzHomeList NULL - -static char const zBugsAddr[19] = "bug-gnutls@gnu.org"; -static char const zExplain[] = "\n\n"; -static char const zDetail[195] = "\n\ -Simple client program to set up a TLS connection to some other computer.\n\ -It sets up a TLS connection and forwards data from the standard input\n\ -to the secured socket and vice versa.\n"; -static char const zFullVersion[] = GNUTLS_CLI_FULL_VERSION; -/* extracted from optcode.tlib near line 515 */ +#define zPROGNAME (gnutls_cli_opt_strs+3174) +#define zUsageTitle (gnutls_cli_opt_strs+3185) +#define zRcName NULL +#define apzHomeList NULL +#define zBugsAddr (gnutls_cli_opt_strs+3298) +#define zExplain (gnutls_cli_opt_strs+3317) +#define zDetail (gnutls_cli_opt_strs+3320) +#define zFullVersion (gnutls_cli_opt_strs+3504) +/* extracted from optcode.tlib near line 350 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT @@ -1028,84 +1128,42 @@ static char const zFullVersion[] = GNUTLS_CLI_FULL_VERSION; #endif /* ENABLE_NLS */ -#define gnutls_cli_full_usage NULL -static char const gnutls_cli_short_usage[] = - "Usage: gnutls-cli [options] hostname\n\ -gnutls-cli --help for usage instructions.\n"; - -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -#ifndef WITH_PACKAGER -# define gnutls_cli_packager_info NULL -#else -static char const gnutls_cli_packager_info[] = - "Packaged by " WITH_PACKAGER - -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif +#define gnutls_cli_full_usage (NULL) -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif +#define gnutls_cli_short_usage (gnutls_cli_opt_strs+3525) -tOptions gnutls_cliOptions = { - OPTIONS_STRUCT_VERSION, - 0, NULL, /* original argc + argv */ - ( OPTPROC_BASE - + OPTPROC_ERRSTOP - + OPTPROC_SHORTOPT - + OPTPROC_LONGOPT - + OPTPROC_NO_REQ_OPT - + OPTPROC_NEGATIONS - + OPTPROC_REORDER - + OPTPROC_GNUUSAGE - + OPTPROC_MISUSE ), - 0, NULL, /* current option index, current option */ - NULL, NULL, zPROGNAME, - zRcName, zCopyright, zLicenseDescrip, - zFullVersion, apzHomeList, zUsageTitle, - zExplain, zDetail, optDesc, - zBugsAddr, /* address to send bugs to */ - NULL, NULL, /* extensions/saved state */ - optionUsage, /* usage procedure */ - translate_option_strings, /* translation procedure */ - /* - * Indexes to special options - */ - { INDEX_OPT_MORE_HELP, /* more-help option index */ - NO_EQUIVALENT, /* save option index */ - NO_EQUIVALENT, /* '-#' option index */ - NO_EQUIVALENT /* index of default opt */ - }, - 42 /* full option count */, 39 /* user option count */, - gnutls_cli_full_usage, gnutls_cli_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_cli_packager_info -}; +#endif /* not defined __doxygen__ */ /* * Create the static procedure(s) declared above. */ +/** + * The callout function that invokes the optionUsage function. + * + * @param pOptions the AutoOpts option description structure + * @param pOptDesc the descriptor for the "help" (usage) option. + * @noreturn + */ static void doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { + optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS); + /* NOTREACHED */ + (void)pOptDesc; (void)pOptions; - USAGE(GNUTLS_CLI_EXIT_SUCCESS); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the debug option. * - * For the debug option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc) { - static const struct {long const rmin, rmax;} rng[1] = { + static struct {long rmin, rmax;} const rng[1] = { { 0 , 9999 } }; int ix; @@ -1131,14 +1189,17 @@ emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the mtu option. * - * For the mtu option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc) { - static const struct {long const rmin, rmax;} rng[1] = { + static struct {long rmin, rmax;} const rng[1] = { { 0, 17000 } }; int ix; @@ -1164,14 +1225,17 @@ emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the recordsize option. * - * For the recordsize option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc) { - static const struct {long const rmin, rmax;} rng[1] = { + static struct {long rmin, rmax;} const rng[1] = { { 0, 4096 } }; int ix; @@ -1197,9 +1261,12 @@ emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the x509crlfile option. * - * For the x509crlfile option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) @@ -1215,9 +1282,12 @@ doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpkeyfile option. * - * For the pgpkeyfile option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) @@ -1233,9 +1303,12 @@ doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpkeyring option. * - * For the pgpkeyring option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) @@ -1251,9 +1324,12 @@ doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpcertfile option. * - * For the pgpcertfile option. + * @param pOptions the gnutls-cli options data structure + * @param pOptDesc the option descriptor for this option. */ static void doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) @@ -1268,7 +1344,75 @@ doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* extracted from optcode.tlib near line 666 */ +/* extracted from optmain.tlib near line 1113 */ + +/** + * The directory containing the data associated with gnutls-cli. + */ +#ifndef PKGDATADIR +# define PKGDATADIR "" +#endif + +/** + * Information about the person or institution that packaged gnutls-cli + * for the current distribution. + */ +#ifndef WITH_PACKAGER +# define gnutls_cli_packager_info NULL +#else +static char const gnutls_cli_packager_info[] = + "Packaged by " WITH_PACKAGER + +# ifdef WITH_PACKAGER_VERSION + " ("WITH_PACKAGER_VERSION")" +# endif + +# ifdef WITH_PACKAGER_BUG_REPORTS + "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS +# endif + "\n"; +#endif +#ifndef __doxygen__ + +#endif /* __doxygen__ */ +/** + * The option definitions for gnutls-cli. The one structure that + * binds them all. + */ +tOptions gnutls_cliOptions = { + OPTIONS_STRUCT_VERSION, + 0, NULL, /* original argc + argv */ + ( OPTPROC_BASE + + OPTPROC_ERRSTOP + + OPTPROC_SHORTOPT + + OPTPROC_LONGOPT + + OPTPROC_NO_REQ_OPT + + OPTPROC_NEGATIONS + + OPTPROC_REORDER + + OPTPROC_GNUUSAGE + + OPTPROC_MISUSE ), + 0, NULL, /* current option index, current option */ + NULL, NULL, zPROGNAME, + zRcName, zCopyright, zLicenseDescrip, + zFullVersion, apzHomeList, zUsageTitle, + zExplain, zDetail, optDesc, + zBugsAddr, /* address to send bugs to */ + NULL, NULL, /* extensions/saved state */ + optionUsage, /* usage procedure */ + translate_option_strings, /* translation procedure */ + /* + * Indexes to special options + */ + { INDEX_OPT_MORE_HELP, /* more-help option index */ + NO_EQUIVALENT, /* save option index */ + NO_EQUIVALENT, /* '-#' option index */ + NO_EQUIVALENT /* index of default opt */ + }, + 42 /* full option count */, 39 /* user option count */, + gnutls_cli_full_usage, gnutls_cli_short_usage, + NULL, NULL, + PKGDATADIR, gnutls_cli_packager_info +}; #if ENABLE_NLS #include @@ -1280,7 +1424,16 @@ doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) static char* AO_gettext(char const* pz); static void coerce_it(void** s); -static char* +/** + * 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; @@ -1300,8 +1453,9 @@ AO_gettext(char const* pz) static void coerce_it(void** s) { *s = AO_gettext(*s); } -/* - * This invokes the translation code (e.g. gettext(3)). +/** + * Translate all the translatable strings in the gnutls_cliOptions + * structure defined above. This is done only once. */ static void translate_option_strings(void) diff --git a/src/cli-args.def b/src/cli-args.def index 17cf85f757..79d9b71281 100644 --- a/src/cli-args.def +++ b/src/cli-args.def @@ -56,8 +56,8 @@ flag = { }; flag = { - name = status-request-ocsp; - descrip = "Request OCSP status request"; + name = ocsp-status-request; + descrip = "Enable OCSP status request"; doc = "The client will indicate to the server in a TLS extension that it wants a OCSP status request."; }; diff --git a/src/cli-args.h b/src/cli-args.h index c31879adff..86e710b0e7 100644 --- a/src/cli-args.h +++ b/src/cli-args.h @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (cli-args.h) * - * It has been AutoGen-ed September 28, 2012 at 01:15:40 PM by AutoGen 5.12 + * It has been AutoGen-ed September 30, 2012 at 03:25:07 PM by AutoGen 5.16 * From the definitions cli-args.def * and the template file options * - * Generated from AutoOpts 35:0:10 templates. + * Generated from AutoOpts 36:4:11 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -16,15 +16,16 @@ * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * - * This source file is copyrighted and licensed under the following terms: + * The gnutls-cli program is copyrighted and licensed + * under the following terms: * * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the * GNU General Public License, version 3 or later * - * -PFX>gnutls-cli is free software: you can redistribute it and/or modify it + * + * gnutls-cli is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -55,7 +56,7 @@ PFX>gnutls-cli is free software: you can redistribute it and/or modify it * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 143360 +#define AO_TEMPLATE_VERSION 147460 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -74,7 +75,7 @@ typedef enum { INDEX_OPT_HEARTBEAT = 5, INDEX_OPT_REHANDSHAKE = 6, INDEX_OPT_NOTICKET = 7, - INDEX_OPT_STATUS_REQUEST_OCSP = 8, + INDEX_OPT_OCSP_STATUS_REQUEST = 8, INDEX_OPT_STARTTLS = 9, INDEX_OPT_UDP = 10, INDEX_OPT_MTU = 11, @@ -141,7 +142,8 @@ typedef enum { */ typedef enum { GNUTLS_CLI_EXIT_SUCCESS = 0, - GNUTLS_CLI_EXIT_FAILURE = 1 + GNUTLS_CLI_EXIT_FAILURE = 1, + GNUTLS_CLI_EXIT_LIBOPTS_FAILURE = 70 } gnutls_cli_exit_code_t; /* * * * * * * @@ -157,7 +159,7 @@ typedef enum { #define VALUE_OPT_HEARTBEAT 'b' #define VALUE_OPT_REHANDSHAKE 'e' #define VALUE_OPT_NOTICKET 7 -#define VALUE_OPT_STATUS_REQUEST_OCSP 8 +#define VALUE_OPT_OCSP_STATUS_REQUEST 8 #define VALUE_OPT_STARTTLS 's' #define VALUE_OPT_UDP 'u' #define VALUE_OPT_MTU 11 @@ -207,18 +209,17 @@ typedef enum { gnutls_cliOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*gnutls_cliOptions.pUsageProc)(&gnutls_cliOptions, c) -/* extracted from opthead.tlib near line 451 */ +/* extracted from opthead.tlib near line 484 */ #ifdef __cplusplus extern "C" { #endif - -/* * * * * * - * - * Globals exported from the GnuTLS client option definitions +/* + * global exported definitions */ #include + /* * * * * * * * Declare the gnutls-cli option descriptor. diff --git a/src/cli.c b/src/cli.c index 95a6da92ab..6d99572f75 100644 --- a/src/cli.c +++ b/src/cli.c @@ -632,7 +632,7 @@ init_tls_session (const char *hostname) /* OCSP status-request TLS extension */ if (status_request_ocsp > 0 && disable_extensions == 0) { - if (gnutls_status_request_ocsp_client (session, NULL, 0, NULL) < 0) + if (gnutls_ocsp_status_request_enable_client (session, NULL, 0, NULL) < 0) { fprintf (stderr, "Cannot set OCSP status request information.\n"); exit (1); @@ -1103,7 +1103,7 @@ const char* rest = NULL; } record_max_size = OPT_VALUE_RECORDSIZE; - status_request_ocsp = HAVE_OPT(STATUS_REQUEST_OCSP); + status_request_ocsp = HAVE_OPT(OCSP_STATUS_REQUEST); if (ENABLED_OPT(OCSP)) status_request_ocsp = 1; @@ -1488,18 +1488,18 @@ cert_verify_ocsp (gnutls_session_t session) if (status_request_ocsp) { /* try the server's OCSP response */ - ret = gnutls_status_request_get_ocsp(session, &resp); + ret = gnutls_ocsp_status_request_get(session, &resp); if (ret < 0 && !ENABLED_OPT(OCSP)) { if (ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) - fprintf(stderr, "gnutls_status_request_get_ocsp: %s\n", gnutls_strerror(ret)); + fprintf(stderr, "gnutls_ocsp_status_request_get: %s\n", gnutls_strerror(ret)); ret = -1; goto cleanup; } if (ret >= 0) { - ret = check_ocsp_response(issuer, &resp); + ret = check_ocsp_response(crt, issuer, &resp); if (ret >= 0 || !ENABLED_OPT(OCSP)) goto cleanup; } @@ -1515,7 +1515,7 @@ cert_verify_ocsp (gnutls_session_t session) } /* verify and check the response for revoked cert */ - ret = check_ocsp_response(issuer, &resp); + ret = check_ocsp_response(crt, issuer, &resp); cleanup: if (deinit_issuer) diff --git a/src/ocsptool-common.c b/src/ocsptool-common.c index 1c441b3824..33f78948ab 100644 --- a/src/ocsptool-common.c +++ b/src/ocsptool-common.c @@ -311,7 +311,8 @@ print_ocsp_verify_res (unsigned int output) * -1: dunno */ int -check_ocsp_response (gnutls_x509_crt_t issuer, +check_ocsp_response (gnutls_x509_crt_t cert, + gnutls_x509_crt_t issuer, gnutls_datum_t *data) { gnutls_ocsp_resp_t resp; @@ -328,6 +329,14 @@ check_ocsp_response (gnutls_x509_crt_t issuer, ret = gnutls_ocsp_resp_import (resp, data); if (ret < 0) error (EXIT_FAILURE, 0, "importing response: %s", gnutls_strerror (ret)); + + ret = gnutls_ocsp_resp_check_crt(resp, cert); + if (ret < 0) + { + printf ("*** Got OCSP response on an unrelated certificate (ignoring)\n"); + ret = -1; + goto cleanup; + } ret = gnutls_ocsp_resp_verify_direct( resp, issuer, &status, 0); if (ret < 0) diff --git a/src/ocsptool-common.h b/src/ocsptool-common.h index 455b5640f5..1158b61f40 100644 --- a/src/ocsptool-common.h +++ b/src/ocsptool-common.h @@ -43,6 +43,6 @@ void print_ocsp_verify_res (unsigned int output); int -check_ocsp_response (gnutls_x509_crt_t issuer, gnutls_datum_t *data); +check_ocsp_response (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer, gnutls_datum_t *data); #endif diff --git a/src/serv-args.c b/src/serv-args.c index 1231aaa727..35dafc1309 100644 --- a/src/serv-args.c +++ b/src/serv-args.c @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (serv-args.c) * - * It has been AutoGen-ed September 28, 2012 at 01:15:45 PM by AutoGen 5.12 + * It has been AutoGen-ed September 30, 2012 at 03:29:31 PM by AutoGen 5.16 * From the definitions serv-args.def * and the template file options * - * Generated from AutoOpts 35:0:10 templates. + * 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 @@ -16,15 +16,16 @@ * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * - * This source file is copyrighted and licensed under the following terms: + * 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 * - * -PFX>gnutls-serv is free software: you can redistribute it and/or modify it + * + * 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. @@ -38,14 +39,15 @@ PFX>gnutls-serv is free software: you can redistribute it and/or modify it * with this program. If not, see . */ +#ifndef __doxygen__ +#define OPTION_CODE_COMPILE 1 +#include "serv-args.h" #include #include #include #include #include -#define OPTION_CODE_COMPILE 1 -#include "serv-args.h" #ifdef __cplusplus extern "C" { @@ -54,401 +56,487 @@ extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -static char const zCopyright[282] = -"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"; -static char const zLicenseDescrip[611] = -"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\n\ -Free Software Foundation, either version 3 of the License, or (at your\n\ -option) 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\n\ -for more details.\n\n\ -You should have received a copy of the GNU General Public License along\n\ -with this program. If not, see .\n"; - -extern tUsageProc optionUsage; +#define zCopyright (gnutls_serv_opt_strs+0) +#define zLicenseDescrip (gnutls_serv_opt_strs+282) + #ifndef NULL # define NULL 0 #endif /* - * Debug option description: + * gnutls-serv option static const strings */ -static char const zDebugText[] = - "Enable debugging."; -static char const zDebug_NAME[] = "DEBUG"; -static char const zDebug_Name[] = "debug"; -#define DEBUG_FLAGS (OPTST_DISABLED \ +static char const gnutls_serv_opt_strs[3058] = +/* 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 */ "Do not request a client certificate\0" +/* 1290 */ "DISABLE_CLIENT_CERT\0" +/* 1310 */ "disable-client-cert\0" +/* 1330 */ "Require a client certificate\0" +/* 1359 */ "REQUIRE_CLIENT_CERT\0" +/* 1379 */ "require-client-cert\0" +/* 1399 */ "Activate heartbeat support\0" +/* 1426 */ "HEARTBEAT\0" +/* 1436 */ "heartbeat\0" +/* 1446 */ "Use DER format for certificates to read from\0" +/* 1491 */ "X509FMTDER\0" +/* 1502 */ "x509fmtder\0" +/* 1513 */ "Priorities string\0" +/* 1531 */ "PRIORITY\0" +/* 1540 */ "priority\0" +/* 1549 */ "DH params file to use\0" +/* 1571 */ "DHPARAMS\0" +/* 1580 */ "dhparams\0" +/* 1589 */ "Certificate file or PKCS #11 URL to use\0" +/* 1629 */ "X509CAFILE\0" +/* 1640 */ "x509cafile\0" +/* 1651 */ "CRL file to use\0" +/* 1667 */ "X509CRLFILE\0" +/* 1679 */ "x509crlfile\0" +/* 1691 */ "PGP Key file to use\0" +/* 1711 */ "PGPKEYFILE\0" +/* 1722 */ "pgpkeyfile\0" +/* 1733 */ "PGP Key ring file to use\0" +/* 1758 */ "PGPKEYRING\0" +/* 1769 */ "pgpkeyring\0" +/* 1780 */ "PGP Public Key (certificate) file to use\0" +/* 1821 */ "PGPCERTFILE\0" +/* 1833 */ "pgpcertfile\0" +/* 1845 */ "X.509 key file or PKCS #11 URL to use\0" +/* 1883 */ "X509KEYFILE\0" +/* 1895 */ "x509keyfile\0" +/* 1907 */ "X.509 Certificate file or PKCS #11 URL to use\0" +/* 1953 */ "X509CERTFILE\0" +/* 1966 */ "x509certfile\0" +/* 1979 */ "Alternative X.509 key file or PKCS #11 URL to use\0" +/* 2029 */ "X509DSAKEYFILE\0" +/* 2044 */ "x509dsakeyfile\0" +/* 2059 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0" +/* 2117 */ "X509DSACERTFILE\0" +/* 2133 */ "x509dsacertfile\0" +/* 2149 */ "X509ECCKEYFILE\0" +/* 2164 */ "x509ecckeyfile\0" +/* 2179 */ "X509ECCCERTFILE\0" +/* 2195 */ "x509ecccertfile\0" +/* 2211 */ "PGP subkey to use (hex or auto)\0" +/* 2243 */ "PGPSUBKEY\0" +/* 2253 */ "pgpsubkey\0" +/* 2263 */ "SRP password file to use\0" +/* 2288 */ "SRPPASSWD\0" +/* 2298 */ "srppasswd\0" +/* 2308 */ "SRP password configuration file to use\0" +/* 2347 */ "SRPPASSWDCONF\0" +/* 2361 */ "srppasswdconf\0" +/* 2375 */ "PSK password file to use\0" +/* 2400 */ "PSKPASSWD\0" +/* 2410 */ "pskpasswd\0" +/* 2420 */ "PSK identity hint to use\0" +/* 2445 */ "PSKHINT\0" +/* 2453 */ "pskhint\0" +/* 2461 */ "The OCSP response to send to client\0" +/* 2497 */ "OCSP_RESPONSE\0" +/* 2511 */ "ocsp-response\0" +/* 2525 */ "The port to connect to\0" +/* 2548 */ "PORT\0" +/* 2553 */ "port\0" +/* 2558 */ "Print a list of the supported algorithms and modes\0" +/* 2609 */ "LIST\0" +/* 2614 */ "list\0" +/* 2619 */ "Display extended usage information and exit\0" +/* 2663 */ "help\0" +/* 2668 */ "Extended usage information passed thru pager\0" +/* 2713 */ "more-help\0" +/* 2723 */ "Output version information and exit\0" +/* 2759 */ "version\0" +/* 2767 */ "GNUTLS_SERV\0" +/* 2779 */ "gnutls-serv - GnuTLS server - Ver. @VERSION@\n" + "USAGE: %s [ - [] | --[{=| }] ]...\n\0" +/* 2882 */ "bug-gnutls@gnu.org\0" +/* 2901 */ "\n\n\0" +/* 2904 */ "\n" + "Server program that listens to incoming TLS connections.\n\0" +/* 2963 */ "gnutls-serv @VERSION@\0" +/* 2985 */ "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: + * noticket option description: */ -static char const zNoticketText[] = - "Don't accept session tickets"; -static char const zNoticket_NAME[] = "NOTICKET"; -static char const zNoticket_Name[] = "noticket"; -#define NOTICKET_FLAGS (OPTST_DISABLED) +#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: + * generate option description: */ -static char const zGenerateText[] = - "Generate Diffie-Hellman and RSA-export parameters"; -static char const zGenerate_NAME[] = "GENERATE"; -static char const zGenerate_Name[] = "generate"; -#define GENERATE_FLAGS (OPTST_DISABLED) +#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: + * quiet option description: */ -static char const zQuietText[] = - "Suppress some messages"; -static char const zQuiet_NAME[] = "QUIET"; -static char const zQuiet_Name[] = "quiet"; -#define QUIET_FLAGS (OPTST_DISABLED) +#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: + * nodb option description: */ -static char const zNodbText[] = - "Do not use a resumption database"; -static char const zNodb_NAME[] = "NODB"; -static char const zNodb_Name[] = "nodb"; -#define NODB_FLAGS (OPTST_DISABLED) +#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: + * http option description: */ -static char const zHttpText[] = - "Act as an HTTP server"; -static char const zHttp_NAME[] = "HTTP"; -static char const zHttp_Name[] = "http"; -#define HTTP_FLAGS (OPTST_DISABLED) +#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: + * echo option description: */ -static char const zEchoText[] = - "Act as an Echo server"; -static char const zEcho_NAME[] = "ECHO"; -static char const zEcho_Name[] = "echo"; -#define ECHO_FLAGS (OPTST_DISABLED) +#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: + * udp option description: */ -static char const zUdpText[] = - "Use DTLS (datagram TLS) over UDP"; -static char const zUdp_NAME[] = "UDP"; -static char const zUdp_Name[] = "udp"; -#define UDP_FLAGS (OPTST_DISABLED) +#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: + * mtu option description: */ -static char const zMtuText[] = - "Set MTU for datagram TLS"; -static char const zMtu_NAME[] = "MTU"; -static char const zMtu_Name[] = "mtu"; -#define MTU_FLAGS (OPTST_DISABLED \ +#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)) /* - * Disable_Client_Cert option description: + * disable-client-cert option description: */ -static char const zDisable_Client_CertText[] = - "Do not request a client certificate"; -static char const zDisable_Client_Cert_NAME[] = "DISABLE_CLIENT_CERT"; -static char const zDisable_Client_Cert_Name[]= "disable-client-cert"; -#define DISABLE_CLIENT_CERT_FLAGS (OPTST_DISABLED) +#define DISABLE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1254) +#define DISABLE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1290) +#define DISABLE_CLIENT_CERT_name (gnutls_serv_opt_strs+1310) +#define DISABLE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /* - * Require_Client_Cert option description: + * require-client-cert option description: */ -static char const zRequire_Client_CertText[] = - "Require a client certificate"; -static char const zRequire_Client_Cert_NAME[] = "REQUIRE_CLIENT_CERT"; -static char const zRequire_Client_Cert_Name[]= "require-client-cert"; -#define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) +#define REQUIRE_CLIENT_CERT_DESC (gnutls_serv_opt_strs+1330) +#define REQUIRE_CLIENT_CERT_NAME (gnutls_serv_opt_strs+1359) +#define REQUIRE_CLIENT_CERT_name (gnutls_serv_opt_strs+1379) +#define REQUIRE_CLIENT_CERT_FLAGS (OPTST_DISABLED) /* - * Heartbeat option description: + * heartbeat option description: */ -static char const zHeartbeatText[] = - "Activate heartbeat support"; -static char const zHeartbeat_NAME[] = "HEARTBEAT"; -static char const zHeartbeat_Name[] = "heartbeat"; -#define HEARTBEAT_FLAGS (OPTST_DISABLED) +#define HEARTBEAT_DESC (gnutls_serv_opt_strs+1399) +#define HEARTBEAT_NAME (gnutls_serv_opt_strs+1426) +#define HEARTBEAT_name (gnutls_serv_opt_strs+1436) +#define HEARTBEAT_FLAGS (OPTST_DISABLED) /* - * X509fmtder option description: + * x509fmtder option description: */ -static char const zX509fmtderText[] = - "Use DER format for certificates to read from"; -static char const zX509fmtder_NAME[] = "X509FMTDER"; -static char const zX509fmtder_Name[] = "x509fmtder"; -#define X509FMTDER_FLAGS (OPTST_DISABLED) +#define X509FMTDER_DESC (gnutls_serv_opt_strs+1446) +#define X509FMTDER_NAME (gnutls_serv_opt_strs+1491) +#define X509FMTDER_name (gnutls_serv_opt_strs+1502) +#define X509FMTDER_FLAGS (OPTST_DISABLED) /* - * Priority option description: + * priority option description: */ -static char const zPriorityText[] = - "Priorities string"; -static char const zPriority_NAME[] = "PRIORITY"; -static char const zPriority_Name[] = "priority"; -#define PRIORITY_FLAGS (OPTST_DISABLED \ +#define PRIORITY_DESC (gnutls_serv_opt_strs+1513) +#define PRIORITY_NAME (gnutls_serv_opt_strs+1531) +#define PRIORITY_name (gnutls_serv_opt_strs+1540) +#define PRIORITY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Dhparams option description: + * dhparams option description: */ -static char const zDhparamsText[] = - "DH params file to use"; -static char const zDhparams_NAME[] = "DHPARAMS"; -static char const zDhparams_Name[] = "dhparams"; -#define DHPARAMS_FLAGS (OPTST_DISABLED \ +#define DHPARAMS_DESC (gnutls_serv_opt_strs+1549) +#define DHPARAMS_NAME (gnutls_serv_opt_strs+1571) +#define DHPARAMS_name (gnutls_serv_opt_strs+1580) +#define DHPARAMS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * X509cafile option description: + * x509cafile option description: */ -static char const zX509cafileText[] = - "Certificate file or PKCS #11 URL to use"; -static char const zX509cafile_NAME[] = "X509CAFILE"; -static char const zX509cafile_Name[] = "x509cafile"; -#define X509CAFILE_FLAGS (OPTST_DISABLED \ +#define X509CAFILE_DESC (gnutls_serv_opt_strs+1589) +#define X509CAFILE_NAME (gnutls_serv_opt_strs+1629) +#define X509CAFILE_name (gnutls_serv_opt_strs+1640) +#define X509CAFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509crlfile option description: + * x509crlfile option description: */ -static char const zX509crlfileText[] = - "CRL file to use"; -static char const zX509crlfile_NAME[] = "X509CRLFILE"; -static char const zX509crlfile_Name[] = "x509crlfile"; -#define X509CRLFILE_FLAGS (OPTST_DISABLED \ +#define X509CRLFILE_DESC (gnutls_serv_opt_strs+1651) +#define X509CRLFILE_NAME (gnutls_serv_opt_strs+1667) +#define X509CRLFILE_name (gnutls_serv_opt_strs+1679) +#define X509CRLFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpkeyfile option description: + * pgpkeyfile option description: */ -static char const zPgpkeyfileText[] = - "PGP Key file to use"; -static char const zPgpkeyfile_NAME[] = "PGPKEYFILE"; -static char const zPgpkeyfile_Name[] = "pgpkeyfile"; -#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ +#define PGPKEYFILE_DESC (gnutls_serv_opt_strs+1691) +#define PGPKEYFILE_NAME (gnutls_serv_opt_strs+1711) +#define PGPKEYFILE_name (gnutls_serv_opt_strs+1722) +#define PGPKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpkeyring option description: + * pgpkeyring option description: */ -static char const zPgpkeyringText[] = - "PGP Key ring file to use"; -static char const zPgpkeyring_NAME[] = "PGPKEYRING"; -static char const zPgpkeyring_Name[] = "pgpkeyring"; -#define PGPKEYRING_FLAGS (OPTST_DISABLED \ +#define PGPKEYRING_DESC (gnutls_serv_opt_strs+1733) +#define PGPKEYRING_NAME (gnutls_serv_opt_strs+1758) +#define PGPKEYRING_name (gnutls_serv_opt_strs+1769) +#define PGPKEYRING_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pgpcertfile option description: + * pgpcertfile option description: */ -static char const zPgpcertfileText[] = - "PGP Public Key (certificate) file to use"; -static char const zPgpcertfile_NAME[] = "PGPCERTFILE"; -static char const zPgpcertfile_Name[] = "pgpcertfile"; -#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ +#define PGPCERTFILE_DESC (gnutls_serv_opt_strs+1780) +#define PGPCERTFILE_NAME (gnutls_serv_opt_strs+1821) +#define PGPCERTFILE_name (gnutls_serv_opt_strs+1833) +#define PGPCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * X509keyfile option description: + * x509keyfile option description: */ -static char const zX509keyfileText[] = - "X.509 key file or PKCS #11 URL to use"; -static char const zX509keyfile_NAME[] = "X509KEYFILE"; -static char const zX509keyfile_Name[] = "x509keyfile"; -#define X509KEYFILE_FLAGS (OPTST_DISABLED \ +#define X509KEYFILE_DESC (gnutls_serv_opt_strs+1845) +#define X509KEYFILE_NAME (gnutls_serv_opt_strs+1883) +#define X509KEYFILE_name (gnutls_serv_opt_strs+1895) +#define X509KEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509certfile option description: + * x509certfile option description: */ -static char const zX509certfileText[] = - "X.509 Certificate file or PKCS #11 URL to use"; -static char const zX509certfile_NAME[] = "X509CERTFILE"; -static char const zX509certfile_Name[] = "x509certfile"; -#define X509CERTFILE_FLAGS (OPTST_DISABLED \ +#define X509CERTFILE_DESC (gnutls_serv_opt_strs+1907) +#define X509CERTFILE_NAME (gnutls_serv_opt_strs+1953) +#define X509CERTFILE_name (gnutls_serv_opt_strs+1966) +#define X509CERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509dsakeyfile option description: + * x509dsakeyfile option description: */ -static char const zX509dsakeyfileText[] = - "Alternative X.509 key file or PKCS #11 URL to use"; -static char const zX509dsakeyfile_NAME[] = "X509DSAKEYFILE"; -static char const zX509dsakeyfile_Name[] = "x509dsakeyfile"; -#define X509DSAKEYFILE_FLAGS (OPTST_DISABLED \ +#define X509DSAKEYFILE_DESC (gnutls_serv_opt_strs+1979) +#define X509DSAKEYFILE_NAME (gnutls_serv_opt_strs+2029) +#define X509DSAKEYFILE_name (gnutls_serv_opt_strs+2044) +#define X509DSAKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509dsacertfile option description: + * x509dsacertfile option description: */ -static char const zX509dsacertfileText[] = - "Alternative X.509 Certificate file or PKCS #11 URL to use"; -static char const zX509dsacertfile_NAME[] = "X509DSACERTFILE"; -static char const zX509dsacertfile_Name[] = "x509dsacertfile"; -#define X509DSACERTFILE_FLAGS (OPTST_DISABLED \ +#define X509DSACERTFILE_DESC (gnutls_serv_opt_strs+2059) +#define X509DSACERTFILE_NAME (gnutls_serv_opt_strs+2117) +#define X509DSACERTFILE_name (gnutls_serv_opt_strs+2133) +#define X509DSACERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509ecckeyfile option description: + * x509ecckeyfile option description: */ -static char const zX509ecckeyfileText[] = - "Alternative X.509 key file or PKCS #11 URL to use"; -static char const zX509ecckeyfile_NAME[] = "X509ECCKEYFILE"; -static char const zX509ecckeyfile_Name[] = "x509ecckeyfile"; -#define X509ECCKEYFILE_FLAGS (OPTST_DISABLED \ +#define X509ECCKEYFILE_DESC (gnutls_serv_opt_strs+1979) +#define X509ECCKEYFILE_NAME (gnutls_serv_opt_strs+2149) +#define X509ECCKEYFILE_name (gnutls_serv_opt_strs+2164) +#define X509ECCKEYFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * X509ecccertfile option description: + * x509ecccertfile option description: */ -static char const zX509ecccertfileText[] = - "Alternative X.509 Certificate file or PKCS #11 URL to use"; -static char const zX509ecccertfile_NAME[] = "X509ECCCERTFILE"; -static char const zX509ecccertfile_Name[] = "x509ecccertfile"; -#define X509ECCCERTFILE_FLAGS (OPTST_DISABLED \ +#define X509ECCCERTFILE_DESC (gnutls_serv_opt_strs+2059) +#define X509ECCCERTFILE_NAME (gnutls_serv_opt_strs+2179) +#define X509ECCCERTFILE_name (gnutls_serv_opt_strs+2195) +#define X509ECCCERTFILE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Pgpsubkey option description: + * pgpsubkey option description: */ -static char const zPgpsubkeyText[] = - "PGP subkey to use (hex or auto)"; -static char const zPgpsubkey_NAME[] = "PGPSUBKEY"; -static char const zPgpsubkey_Name[] = "pgpsubkey"; -#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ +#define PGPSUBKEY_DESC (gnutls_serv_opt_strs+2211) +#define PGPSUBKEY_NAME (gnutls_serv_opt_strs+2243) +#define PGPSUBKEY_name (gnutls_serv_opt_strs+2253) +#define PGPSUBKEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Srppasswd option description: + * srppasswd option description: */ -static char const zSrppasswdText[] = - "SRP password file to use"; -static char const zSrppasswd_NAME[] = "SRPPASSWD"; -static char const zSrppasswd_Name[] = "srppasswd"; -#define SRPPASSWD_FLAGS (OPTST_DISABLED \ +#define SRPPASSWD_DESC (gnutls_serv_opt_strs+2263) +#define SRPPASSWD_NAME (gnutls_serv_opt_strs+2288) +#define SRPPASSWD_name (gnutls_serv_opt_strs+2298) +#define SRPPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Srppasswdconf option description: + * srppasswdconf option description: */ -static char const zSrppasswdconfText[] = - "SRP password configuration file to use"; -static char const zSrppasswdconf_NAME[] = "SRPPASSWDCONF"; -static char const zSrppasswdconf_Name[] = "srppasswdconf"; -#define SRPPASSWDCONF_FLAGS (OPTST_DISABLED \ +#define SRPPASSWDCONF_DESC (gnutls_serv_opt_strs+2308) +#define SRPPASSWDCONF_NAME (gnutls_serv_opt_strs+2347) +#define SRPPASSWDCONF_name (gnutls_serv_opt_strs+2361) +#define SRPPASSWDCONF_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pskpasswd option description: + * pskpasswd option description: */ -static char const zPskpasswdText[] = - "PSK password file to use"; -static char const zPskpasswd_NAME[] = "PSKPASSWD"; -static char const zPskpasswd_Name[] = "pskpasswd"; -#define PSKPASSWD_FLAGS (OPTST_DISABLED \ +#define PSKPASSWD_DESC (gnutls_serv_opt_strs+2375) +#define PSKPASSWD_NAME (gnutls_serv_opt_strs+2400) +#define PSKPASSWD_name (gnutls_serv_opt_strs+2410) +#define PSKPASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Pskhint option description: + * pskhint option description: */ -static char const zPskhintText[] = - "PSK identity hint to use"; -static char const zPskhint_NAME[] = "PSKHINT"; -static char const zPskhint_Name[] = "pskhint"; -#define PSKHINT_FLAGS (OPTST_DISABLED \ +#define PSKHINT_DESC (gnutls_serv_opt_strs+2420) +#define PSKHINT_NAME (gnutls_serv_opt_strs+2445) +#define PSKHINT_name (gnutls_serv_opt_strs+2453) +#define PSKHINT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) /* - * Status_Response_Ocsp option description: + * ocsp-response option description: */ -static char const zStatus_Response_OcspText[] = - "OCSP response to send to client"; -static char const zStatus_Response_Ocsp_NAME[] = "STATUS_RESPONSE_OCSP"; -static char const zStatus_Response_Ocsp_Name[]= "status-response-ocsp"; -#define STATUS_RESPONSE_OCSP_FLAGS (OPTST_DISABLED \ +#define OCSP_RESPONSE_DESC (gnutls_serv_opt_strs+2461) +#define OCSP_RESPONSE_NAME (gnutls_serv_opt_strs+2497) +#define OCSP_RESPONSE_name (gnutls_serv_opt_strs+2511) +#define OCSP_RESPONSE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE)) /* - * Port option description: + * port option description: */ -static char const zPortText[] = - "The port to connect to"; -static char const zPort_NAME[] = "PORT"; -static char const zPort_Name[] = "port"; -#define PORT_FLAGS (OPTST_DISABLED \ +#define PORT_DESC (gnutls_serv_opt_strs+2525) +#define PORT_NAME (gnutls_serv_opt_strs+2548) +#define PORT_name (gnutls_serv_opt_strs+2553) +#define PORT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) /* - * List option description: + * list option description: */ -static char const zListText[] = - "Print a list of the supported algorithms and modes"; -static char const zList_NAME[] = "LIST"; -static char const zList_Name[] = "list"; -#define LIST_FLAGS (OPTST_DISABLED) +#define LIST_DESC (gnutls_serv_opt_strs+2558) +#define LIST_NAME (gnutls_serv_opt_strs+2609) +#define LIST_name (gnutls_serv_opt_strs+2614) +#define LIST_FLAGS (OPTST_DISABLED) /* * Help/More_Help/Version option descriptions: */ -static char const zHelpText[] = "Display extended usage information and exit"; -static char const zHelp_Name[] = "help"; +#define HELP_DESC (gnutls_serv_opt_strs+2619) +#define HELP_name (gnutls_serv_opt_strs+2663) #ifdef HAVE_WORKING_FORK -#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) -static char const zMore_Help_Name[] = "more-help"; -static char const zMore_HelpText[] = "Extended usage information passed thru pager"; +#define MORE_HELP_DESC (gnutls_serv_opt_strs+2668) +#define MORE_HELP_name (gnutls_serv_opt_strs+2713) +#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else -#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) -#define zMore_Help_Name NULL -#define zMore_HelpText NULL +#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 OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT +# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else -# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ - OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT +# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ + OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif - -static char const zVersionText[] = "Output version information and exit"; -static char const zVersion_Name[] = "version"; +#define VER_DESC (gnutls_serv_opt_strs+2723) +#define VER_name (gnutls_serv_opt_strs+2759) /* * Declare option callback procedures */ extern tOptProc - optionBooleanVal, optionNestedVal, optionNumericVal, - optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVersionStderr; + optionBooleanVal, optionNestedVal, optionNumericVal, + optionPagedUsage, optionPrintVersion, optionResetOpt, + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVendorOption; static tOptProc - doOptDebug, doOptDhparams, - doOptMtu, doOptPgpcertfile, - doOptPgpkeyfile, doOptPgpkeyring, - doOptPskpasswd, doOptSrppasswd, - doOptSrppasswdconf, doOptStatus_Response_Ocsp, - doOptX509crlfile, doUsageOpt; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Define the Gnutls_Serv Option Descriptions. + 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, @@ -456,11 +544,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DEBUG_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --debug */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDebug, - /* desc, NAME, name */ zDebugText, zDebug_NAME, zDebug_Name, + /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 1, VALUE_OPT_NOTICKET, @@ -468,11 +556,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NOTICKET_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --noticket */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zNoticketText, zNoticket_NAME, zNoticket_Name, + /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 2, VALUE_OPT_GENERATE, @@ -480,11 +568,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ GENERATE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --generate */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zGenerateText, zGenerate_NAME, zGenerate_Name, + /* desc, NAME, name */ GENERATE_DESC, GENERATE_NAME, GENERATE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 3, VALUE_OPT_QUIET, @@ -492,11 +580,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ QUIET_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --quiet */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zQuietText, zQuiet_NAME, zQuiet_Name, + /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 4, VALUE_OPT_NODB, @@ -504,11 +592,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ NODB_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --nodb */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zNodbText, zNodb_NAME, zNodb_Name, + /* desc, NAME, name */ NODB_DESC, NODB_NAME, NODB_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 5, VALUE_OPT_HTTP, @@ -516,11 +604,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HTTP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --http */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zHttpText, zHttp_NAME, zHttp_Name, + /* desc, NAME, name */ HTTP_DESC, HTTP_NAME, HTTP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 6, VALUE_OPT_ECHO, @@ -528,11 +616,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ ECHO_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --echo */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zEchoText, zEcho_NAME, zEcho_Name, + /* desc, NAME, name */ ECHO_DESC, ECHO_NAME, ECHO_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 7, VALUE_OPT_UDP, @@ -540,11 +628,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ UDP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --udp */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zUdpText, zUdp_NAME, zUdp_Name, + /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 8, VALUE_OPT_MTU, @@ -552,11 +640,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ MTU_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --mtu */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptMtu, - /* desc, NAME, name */ zMtuText, zMtu_NAME, zMtu_Name, + /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 9, VALUE_OPT_DISABLE_CLIENT_CERT, @@ -564,11 +652,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DISABLE_CLIENT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --disable-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zDisable_Client_CertText, zDisable_Client_Cert_NAME, zDisable_Client_Cert_Name, + /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 10, VALUE_OPT_REQUIRE_CLIENT_CERT, @@ -576,11 +664,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ REQUIRE_CLIENT_CERT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --require-client-cert */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zRequire_Client_CertText, zRequire_Client_Cert_NAME, zRequire_Client_Cert_Name, + /* desc, NAME, name */ REQUIRE_CLIENT_CERT_DESC, REQUIRE_CLIENT_CERT_NAME, REQUIRE_CLIENT_CERT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 11, VALUE_OPT_HEARTBEAT, @@ -588,11 +676,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ HEARTBEAT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --heartbeat */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zHeartbeatText, zHeartbeat_NAME, zHeartbeat_Name, + /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 12, VALUE_OPT_X509FMTDER, @@ -600,11 +688,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509FMTDER_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509fmtder */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509fmtderText, zX509fmtder_NAME, zX509fmtder_Name, + /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 13, VALUE_OPT_PRIORITY, @@ -612,11 +700,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PRIORITY_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --priority */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPriorityText, zPriority_NAME, zPriority_Name, + /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 14, VALUE_OPT_DHPARAMS, @@ -624,11 +712,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ DHPARAMS_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --dhparams */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptDhparams, - /* desc, NAME, name */ zDhparamsText, zDhparams_NAME, zDhparams_Name, + /* desc, NAME, name */ DHPARAMS_DESC, DHPARAMS_NAME, DHPARAMS_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 15, VALUE_OPT_X509CAFILE, @@ -636,11 +724,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CAFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509cafile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509cafileText, zX509cafile_NAME, zX509cafile_Name, + /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 16, VALUE_OPT_X509CRLFILE, @@ -648,11 +736,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CRLFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509crlfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptX509crlfile, - /* desc, NAME, name */ zX509crlfileText, zX509crlfile_NAME, zX509crlfile_Name, + /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 17, VALUE_OPT_PGPKEYFILE, @@ -660,11 +748,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpkeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyfile, - /* desc, NAME, name */ zPgpkeyfileText, zPgpkeyfile_NAME, zPgpkeyfile_Name, + /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 18, VALUE_OPT_PGPKEYRING, @@ -672,11 +760,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPKEYRING_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpkeyring */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpkeyring, - /* desc, NAME, name */ zPgpkeyringText, zPgpkeyring_NAME, zPgpkeyring_Name, + /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 19, VALUE_OPT_PGPCERTFILE, @@ -684,11 +772,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpcertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPgpcertfile, - /* desc, NAME, name */ zPgpcertfileText, zPgpcertfile_NAME, zPgpcertfile_Name, + /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 20, VALUE_OPT_X509KEYFILE, @@ -696,11 +784,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509KEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509keyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509keyfileText, zX509keyfile_NAME, zX509keyfile_Name, + /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 21, VALUE_OPT_X509CERTFILE, @@ -708,11 +796,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509CERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509certfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509certfileText, zX509certfile_NAME, zX509certfile_Name, + /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 22, VALUE_OPT_X509DSAKEYFILE, @@ -720,11 +808,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSAKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509dsakeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509dsakeyfileText, zX509dsakeyfile_NAME, zX509dsakeyfile_Name, + /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, X509DSAKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 23, VALUE_OPT_X509DSACERTFILE, @@ -732,11 +820,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509DSACERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509dsacertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509dsacertfileText, zX509dsacertfile_NAME, zX509dsacertfile_Name, + /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, X509DSACERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 24, VALUE_OPT_X509ECCKEYFILE, @@ -744,11 +832,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCKEYFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509ecckeyfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509ecckeyfileText, zX509ecckeyfile_NAME, zX509ecckeyfile_Name, + /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, X509ECCKEYFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 25, VALUE_OPT_X509ECCCERTFILE, @@ -756,11 +844,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ X509ECCCERTFILE_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --x509ecccertfile */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zX509ecccertfileText, zX509ecccertfile_NAME, zX509ecccertfile_Name, + /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, X509ECCCERTFILE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 26, VALUE_OPT_PGPSUBKEY, @@ -768,11 +856,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PGPSUBKEY_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pgpsubkey */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPgpsubkeyText, zPgpsubkey_NAME, zPgpsubkey_Name, + /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 27, VALUE_OPT_SRPPASSWD, @@ -780,11 +868,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --srppasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptSrppasswd, - /* desc, NAME, name */ zSrppasswdText, zSrppasswd_NAME, zSrppasswd_Name, + /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 28, VALUE_OPT_SRPPASSWDCONF, @@ -792,11 +880,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ SRPPASSWDCONF_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --srppasswdconf */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptSrppasswdconf, - /* desc, NAME, name */ zSrppasswdconfText, zSrppasswdconf_NAME, zSrppasswdconf_Name, + /* desc, NAME, name */ SRPPASSWDCONF_DESC, SRPPASSWDCONF_NAME, SRPPASSWDCONF_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 29, VALUE_OPT_PSKPASSWD, @@ -804,11 +892,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKPASSWD_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pskpasswd */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doOptPskpasswd, - /* desc, NAME, name */ zPskpasswdText, zPskpasswd_NAME, zPskpasswd_Name, + /* desc, NAME, name */ PSKPASSWD_DESC, PSKPASSWD_NAME, PSKPASSWD_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 30, VALUE_OPT_PSKHINT, @@ -816,23 +904,23 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PSKHINT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --pskhint */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zPskhintText, zPskhint_NAME, zPskhint_Name, + /* desc, NAME, name */ PSKHINT_DESC, PSKHINT_NAME, PSKHINT_name, /* disablement strs */ NULL, NULL }, - { /* entry idx, value */ 31, VALUE_OPT_STATUS_RESPONSE_OCSP, - /* equiv idx, value */ 31, VALUE_OPT_STATUS_RESPONSE_OCSP, + { /* entry idx, value */ 31, VALUE_OPT_OCSP_RESPONSE, + /* equiv idx, value */ 31, VALUE_OPT_OCSP_RESPONSE, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ STATUS_RESPONSE_OCSP_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* opt state flags */ OCSP_RESPONSE_FLAGS, 0, + /* last opt argumnt */ { NULL }, /* --ocsp-response */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ doOptStatus_Response_Ocsp, - /* desc, NAME, name */ zStatus_Response_OcspText, zStatus_Response_Ocsp_NAME, zStatus_Response_Ocsp_Name, + /* option proc */ doOptOcsp_Response, + /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, OCSP_RESPONSE_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 32, VALUE_OPT_PORT, @@ -840,11 +928,11 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ PORT_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --port */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ optionNumericVal, - /* desc, NAME, name */ zPortText, zPort_NAME, zPort_Name, + /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name, /* disablement strs */ NULL, NULL }, { /* entry idx, value */ 33, VALUE_OPT_LIST, @@ -852,29 +940,29 @@ static tOptDesc optDesc[OPTION_CT] = { /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, /* opt state flags */ LIST_FLAGS, 0, - /* last opt argumnt */ { NULL }, + /* last opt argumnt */ { NULL }, /* --list */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ NULL, - /* desc, NAME, name */ zListText, zList_NAME, zList_Name, + /* 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, 0, + /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_VERSION_FLAGS, 0, + /* opt state flags */ VER_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ optionPrintVersion, - /* desc, NAME, name */ zVersionText, NULL, zVersion_Name, + /* 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, 0, + /* 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, @@ -882,39 +970,36 @@ static tOptDesc optDesc[OPTION_CT] = { /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, /* option proc */ doUsageOpt, - /* desc, NAME, name */ zHelpText, NULL, zHelp_Name, + /* 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, 0, + /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, /* equivalenced to */ NO_EQUIVALENT, /* min, max, act ct */ 0, 1, 0, - /* opt state flags */ OPTST_MORE_HELP_FLAGS, 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 */ zMore_HelpText, NULL, zMore_Help_Name, + /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, /* disablement strs */ NULL, NULL } }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Define the Gnutls_Serv Option Environment + * Define the gnutls-serv Option Environment */ -static char const zPROGNAME[12] = "GNUTLS_SERV"; -static char const zUsageTitle[103] = -"gnutls-serv - GnuTLS server - Ver. @VERSION@\n\ -USAGE: %s [ - [] | --[{=| }] ]...\n"; -#define zRcName NULL -#define apzHomeList NULL - -static char const zBugsAddr[19] = "bug-gnutls@gnu.org"; -static char const zExplain[] = "\n\n"; -static char const zDetail[65] = "\n\ -Server program that listens to incoming TLS connections.\n"; -static char const zFullVersion[] = GNUTLS_SERV_FULL_VERSION; -/* extracted from optcode.tlib near line 515 */ +#define zPROGNAME (gnutls_serv_opt_strs+2767) +#define zUsageTitle (gnutls_serv_opt_strs+2779) +#define zRcName NULL +#define apzHomeList NULL +#define zBugsAddr (gnutls_serv_opt_strs+2882) +#define zExplain (gnutls_serv_opt_strs+2901) +#define zDetail (gnutls_serv_opt_strs+2904) +#define zFullVersion (gnutls_serv_opt_strs+2963) +/* extracted from optcode.tlib near line 350 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT @@ -925,83 +1010,42 @@ static char const zFullVersion[] = GNUTLS_SERV_FULL_VERSION; #endif /* ENABLE_NLS */ -#define gnutls_serv_full_usage NULL -static char const gnutls_serv_short_usage[] = - "Usage: gnutls-serv [options]\n\ -gnutls-serv --help for usage instructions.\n"; - -#ifndef PKGDATADIR -# define PKGDATADIR "" -#endif - -#ifndef WITH_PACKAGER -# define gnutls_serv_packager_info NULL -#else -static char const gnutls_serv_packager_info[] = - "Packaged by " WITH_PACKAGER +#define gnutls_serv_full_usage (NULL) -# ifdef WITH_PACKAGER_VERSION - " ("WITH_PACKAGER_VERSION")" -# endif +#define gnutls_serv_short_usage (gnutls_serv_opt_strs+2985) -# ifdef WITH_PACKAGER_BUG_REPORTS - "\nReport gnutls_serv bugs to " WITH_PACKAGER_BUG_REPORTS -# endif - "\n"; -#endif - -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 */ - }, - 37 /* full option count */, 34 /* user option count */, - gnutls_serv_full_usage, gnutls_serv_short_usage, - NULL, NULL, - PKGDATADIR, gnutls_serv_packager_info -}; +#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; - USAGE(GNUTLS_SERV_EXIT_SUCCESS); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the debug option. * - * For 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 const struct {long const rmin, rmax;} rng[1] = { + static struct {long rmin, rmax;} const rng[1] = { { 0 , 9999 } }; int ix; @@ -1027,14 +1071,17 @@ emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the mtu option. * - * For 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 const struct {long const rmin, rmax;} rng[1] = { + static struct {long rmin, rmax;} const rng[1] = { { 0, 17000 } }; int ix; @@ -1060,9 +1107,12 @@ emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the dhparams option. * - * For 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) @@ -1078,9 +1128,12 @@ doOptDhparams(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the x509crlfile option. * - * For 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) @@ -1096,9 +1149,12 @@ doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpkeyfile option. * - * For 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) @@ -1114,9 +1170,12 @@ doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpkeyring option. * - * For 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) @@ -1132,9 +1191,12 @@ doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pgpcertfile option. * - * For 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) @@ -1150,9 +1212,12 @@ doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the srppasswd option. * - * For 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) @@ -1168,9 +1233,12 @@ doOptSrppasswd(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the srppasswdconf option. * - * For 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) @@ -1186,9 +1254,12 @@ doOptSrppasswdconf(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the pskpasswd option. * - * For 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) @@ -1204,12 +1275,15 @@ doOptPskpasswd(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/** + * Code to handle the ocsp-response option. * - * For the status-response-ocsp option. + * @param pOptions the gnutls-serv options data structure + * @param pOptDesc the option descriptor for this option. */ static void -doOptStatus_Response_Ocsp(tOptions* pOptions, tOptDesc* pOptDesc) +doOptOcsp_Response(tOptions* pOptions, tOptDesc* pOptDesc) { static teOptFileType const type = FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN; @@ -1221,7 +1295,74 @@ doOptStatus_Response_Ocsp(tOptions* pOptions, tOptDesc* pOptDesc) optionFileCheck(pOptions, pOptDesc, type, mode); } -/* extracted from optcode.tlib near line 666 */ +/* 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 */ + }, + 37 /* full option count */, 34 /* user option count */, + gnutls_serv_full_usage, gnutls_serv_short_usage, + NULL, NULL, + PKGDATADIR, gnutls_serv_packager_info +}; #if ENABLE_NLS #include @@ -1233,7 +1374,16 @@ doOptStatus_Response_Ocsp(tOptions* pOptions, tOptDesc* pOptDesc) static char* AO_gettext(char const* pz); static void coerce_it(void** s); -static char* +/** + * 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; @@ -1253,8 +1403,9 @@ AO_gettext(char const* pz) static void coerce_it(void** s) { *s = AO_gettext(*s); } -/* - * This invokes the translation code (e.g. gettext(3)). +/** + * Translate all the translatable strings in the gnutls_servOptions + * structure defined above. This is done only once. */ static void translate_option_strings(void) diff --git a/src/serv-args.def b/src/serv-args.def index c24e7ebca5..df196bae11 100644 --- a/src/serv-args.def +++ b/src/serv-args.def @@ -228,10 +228,10 @@ flag = { }; flag = { - name = status-response-ocsp; + name = ocsp-response; arg-type = file; file-exists = yes; - descrip = "OCSP response to send to client"; + descrip = "The OCSP response to send to client"; doc = "If the client requested an OCSP response, return data from this file to the client."; }; diff --git a/src/serv-args.h b/src/serv-args.h index 0e825a639b..8ff5e1e3be 100644 --- a/src/serv-args.h +++ b/src/serv-args.h @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (serv-args.h) * - * It has been AutoGen-ed September 28, 2012 at 01:15:45 PM by AutoGen 5.12 + * It has been AutoGen-ed September 30, 2012 at 03:29:31 PM by AutoGen 5.16 * From the definitions serv-args.def * and the template file options * - * Generated from AutoOpts 35:0:10 templates. + * Generated from AutoOpts 36:4:11 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -16,15 +16,16 @@ * users discretion, the BSD license. See the AutoOpts and/or libopts sources * for details. * - * This source file is copyrighted and licensed under the following terms: + * 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 * - * -PFX>gnutls-serv is free software: you can redistribute it and/or modify it + * + * 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. @@ -55,7 +56,7 @@ PFX>gnutls-serv is free software: you can redistribute it and/or modify it * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 143360 +#define AO_TEMPLATE_VERSION 147460 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -66,43 +67,43 @@ PFX>gnutls-serv is free software: you can redistribute it and/or modify it * Enumeration of each option: */ typedef enum { - INDEX_OPT_DEBUG = 0, - INDEX_OPT_NOTICKET = 1, - INDEX_OPT_GENERATE = 2, - INDEX_OPT_QUIET = 3, - INDEX_OPT_NODB = 4, - INDEX_OPT_HTTP = 5, - INDEX_OPT_ECHO = 6, - INDEX_OPT_UDP = 7, - INDEX_OPT_MTU = 8, - INDEX_OPT_DISABLE_CLIENT_CERT = 9, - INDEX_OPT_REQUIRE_CLIENT_CERT = 10, - INDEX_OPT_HEARTBEAT = 11, - INDEX_OPT_X509FMTDER = 12, - INDEX_OPT_PRIORITY = 13, - INDEX_OPT_DHPARAMS = 14, - INDEX_OPT_X509CAFILE = 15, - INDEX_OPT_X509CRLFILE = 16, - INDEX_OPT_PGPKEYFILE = 17, - INDEX_OPT_PGPKEYRING = 18, - INDEX_OPT_PGPCERTFILE = 19, - INDEX_OPT_X509KEYFILE = 20, - INDEX_OPT_X509CERTFILE = 21, - INDEX_OPT_X509DSAKEYFILE = 22, - INDEX_OPT_X509DSACERTFILE = 23, - INDEX_OPT_X509ECCKEYFILE = 24, - INDEX_OPT_X509ECCCERTFILE = 25, - INDEX_OPT_PGPSUBKEY = 26, - INDEX_OPT_SRPPASSWD = 27, - INDEX_OPT_SRPPASSWDCONF = 28, - INDEX_OPT_PSKPASSWD = 29, - INDEX_OPT_PSKHINT = 30, - INDEX_OPT_STATUS_RESPONSE_OCSP = 31, - INDEX_OPT_PORT = 32, - INDEX_OPT_LIST = 33, - INDEX_OPT_VERSION = 34, - INDEX_OPT_HELP = 35, - INDEX_OPT_MORE_HELP = 36 + INDEX_OPT_DEBUG = 0, + INDEX_OPT_NOTICKET = 1, + INDEX_OPT_GENERATE = 2, + INDEX_OPT_QUIET = 3, + INDEX_OPT_NODB = 4, + INDEX_OPT_HTTP = 5, + INDEX_OPT_ECHO = 6, + INDEX_OPT_UDP = 7, + INDEX_OPT_MTU = 8, + INDEX_OPT_DISABLE_CLIENT_CERT = 9, + INDEX_OPT_REQUIRE_CLIENT_CERT = 10, + INDEX_OPT_HEARTBEAT = 11, + INDEX_OPT_X509FMTDER = 12, + INDEX_OPT_PRIORITY = 13, + INDEX_OPT_DHPARAMS = 14, + INDEX_OPT_X509CAFILE = 15, + INDEX_OPT_X509CRLFILE = 16, + INDEX_OPT_PGPKEYFILE = 17, + INDEX_OPT_PGPKEYRING = 18, + INDEX_OPT_PGPCERTFILE = 19, + INDEX_OPT_X509KEYFILE = 20, + INDEX_OPT_X509CERTFILE = 21, + INDEX_OPT_X509DSAKEYFILE = 22, + INDEX_OPT_X509DSACERTFILE = 23, + INDEX_OPT_X509ECCKEYFILE = 24, + INDEX_OPT_X509ECCCERTFILE = 25, + INDEX_OPT_PGPSUBKEY = 26, + INDEX_OPT_SRPPASSWD = 27, + INDEX_OPT_SRPPASSWDCONF = 28, + INDEX_OPT_PSKPASSWD = 29, + INDEX_OPT_PSKHINT = 30, + INDEX_OPT_OCSP_RESPONSE = 31, + INDEX_OPT_PORT = 32, + INDEX_OPT_LIST = 33, + INDEX_OPT_VERSION = 34, + INDEX_OPT_HELP = 35, + INDEX_OPT_MORE_HELP = 36 } teOptIndex; #define OPTION_CT 37 @@ -136,7 +137,8 @@ typedef enum { */ typedef enum { GNUTLS_SERV_EXIT_SUCCESS = 0, - GNUTLS_SERV_EXIT_FAILURE = 1 + GNUTLS_SERV_EXIT_FAILURE = 1, + GNUTLS_SERV_EXIT_LIBOPTS_FAILURE = 70 } gnutls_serv_exit_code_t; /* * * * * * * @@ -177,7 +179,7 @@ typedef enum { #define VALUE_OPT_SRPPASSWDCONF 28 #define VALUE_OPT_PSKPASSWD 29 #define VALUE_OPT_PSKHINT 30 -#define VALUE_OPT_STATUS_RESPONSE_OCSP 31 +#define VALUE_OPT_OCSP_RESPONSE 31 #define VALUE_OPT_PORT 'p' #define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) @@ -195,18 +197,17 @@ typedef enum { gnutls_servOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*gnutls_servOptions.pUsageProc)(&gnutls_servOptions, c) -/* extracted from opthead.tlib near line 451 */ +/* extracted from opthead.tlib near line 484 */ #ifdef __cplusplus extern "C" { #endif - -/* * * * * * - * - * Globals exported from the GnuTLS server option definitions +/* + * global exported definitions */ #include + /* * * * * * * * Declare the gnutls-serv option descriptor. diff --git a/src/serv.c b/src/serv.c index 26b669961a..6be7a6d29c 100644 --- a/src/serv.c +++ b/src/serv.c @@ -359,15 +359,6 @@ gnutls_session_t initialize_session (int dtls) gnutls_session_ticket_enable_server (session, &session_ticket_key); #endif - /* OCSP status-request TLS extension */ - if (status_response_ocsp) - { - if (gnutls_status_request_ocsp_server_file (session, status_response_ocsp, 0) < 0) - { - fprintf (stderr, "Cannot set OCSP status request callback.\n"); - exit (1); - } - } if (noticket == 0) gnutls_session_ticket_enable_server (session, &session_ticket_key); @@ -1100,6 +1091,16 @@ main (int argc, char **argv) exit (1); } + /* OCSP status-request TLS extension */ + if (status_response_ocsp) + { + if (gnutls_certificate_set_ocsp_status_request_file (cert_cred, status_response_ocsp, 0) < 0) + { + fprintf (stderr, "Cannot set OCSP status request file: %s\n", gnutls_strerror(ret)); + exit (1); + } + } + gnutls_certificate_set_params_function (cert_cred, get_params); /* gnutls_certificate_set_dh_params(cert_cred, dh_params); * gnutls_certificate_set_rsa_export_params(cert_cred, rsa_params); @@ -1664,8 +1665,8 @@ cmd_parser (int argc, char **argv) if (HAVE_OPT (PSKPASSWD)) psk_passwd = OPT_ARG (PSKPASSWD); - if (HAVE_OPT(STATUS_RESPONSE_OCSP)) - status_response_ocsp = OPT_ARG(STATUS_RESPONSE_OCSP); + if (HAVE_OPT(OCSP_RESPONSE)) + status_response_ocsp = OPT_ARG(OCSP_RESPONSE); }