removed old flag
[gnutls.git] / src / cli-args.c
blob05f8af5e8fea22638299ea5ba0dd668aee85dc0c
1 /* -*- buffer-read-only: t -*- vi: set ro:
2 *
3 * DO NOT EDIT THIS FILE (cli-args.c)
4 *
5 * It has been AutoGen-ed October 6, 2012 at 03:20:01 AM by AutoGen 5.16
6 * From the definitions cli-args.def
7 * and the template file options
9 * Generated from AutoOpts 36:4:11 templates.
11 * AutoOpts is a copyrighted work. This source file is not encumbered
12 * by AutoOpts licensing, but is provided under the licensing terms chosen
13 * by the gnutls-cli author or copyright holder. AutoOpts is
14 * licensed under the terms of the LGPL. The redistributable library
15 * (``libopts'') is licensed under the terms of either the LGPL or, at the
16 * users discretion, the BSD license. See the AutoOpts and/or libopts sources
17 * for details.
19 * The gnutls-cli program is copyrighted and licensed
20 * under the following terms:
22 * Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
23 * This is free software. It is licensed for use, modification and
24 * redistribution under the terms of the
25 * GNU General Public License, version 3 or later
26 * <http://gnu.org/licenses/gpl.html>
28 * gnutls-cli is free software: you can redistribute it and/or modify it
29 * under the terms of the GNU General Public License as published by the
30 * Free Software Foundation, either version 3 of the License, or
31 * (at your option) any later version.
33 * gnutls-cli is distributed in the hope that it will be useful, but
34 * WITHOUT ANY WARRANTY; without even the implied warranty of
35 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36 * See the GNU General Public License for more details.
38 * You should have received a copy of the GNU General Public License along
39 * with this program. If not, see <http://www.gnu.org/licenses/>.
42 #ifndef __doxygen__
43 #define OPTION_CODE_COMPILE 1
44 #include "cli-args.h"
45 #include <sys/types.h>
47 #include <limits.h>
48 #include <stdio.h>
49 #include <stdlib.h>
50 #include <errno.h>
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 extern FILE * option_usage_fp;
57 /* TRANSLATORS: choose the translation for option names wisely because you
58 cannot ever change your mind. */
59 #define zCopyright (gnutls_cli_opt_strs+0)
60 #define zLicenseDescrip (gnutls_cli_opt_strs+281)
63 #ifndef NULL
64 # define NULL 0
65 #endif
68 * gnutls-cli option static const strings
70 static char const gnutls_cli_opt_strs[3667] =
71 /* 0 */ "gnutls-cli @VERSION@\n"
72 "Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.\n"
73 "This is free software. It is licensed for use, modification and\n"
74 "redistribution under the terms of the\n"
75 "GNU General Public License, version 3 or later\n"
76 " <http://gnu.org/licenses/gpl.html>\n\0"
77 /* 281 */ "gnutls-cli is free software: you can redistribute it and/or modify it under\n"
78 "the terms of the GNU General Public License as published by the Free\n"
79 "Software Foundation, either version 3 of the License, or (at your option)\n"
80 "any later version.\n\n"
81 "gnutls-cli is distributed in the hope that it will be useful, but WITHOUT\n"
82 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
83 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n"
84 "more details.\n\n"
85 "You should have received a copy of the GNU General Public License along\n"
86 "with this program. If not, see <http://www.gnu.org/licenses/>.\n\0"
87 /* 890 */ "Enable debugging.\0"
88 /* 908 */ "DEBUG\0"
89 /* 914 */ "debug\0"
90 /* 920 */ "More verbose output\0"
91 /* 940 */ "VERBOSE\0"
92 /* 948 */ "verbose\0"
93 /* 956 */ "Enable trust on first use authentication\0"
94 /* 997 */ "TOFU\0"
95 /* 1002 */ "no-tofu\0"
96 /* 1010 */ "no\0"
97 /* 1013 */ "Enable DANE certificate verification (DNSSEC)\0"
98 /* 1059 */ "DANE\0"
99 /* 1064 */ "no-dane\0"
100 /* 1072 */ "Enable OCSP certificate verification\0"
101 /* 1109 */ "OCSP\0"
102 /* 1114 */ "no-ocsp\0"
103 /* 1122 */ "Establish a session and resume\0"
104 /* 1153 */ "RESUME\0"
105 /* 1160 */ "resume\0"
106 /* 1167 */ "Activate heartbeat support\0"
107 /* 1194 */ "HEARTBEAT\0"
108 /* 1204 */ "heartbeat\0"
109 /* 1214 */ "Establish a session and rehandshake\0"
110 /* 1250 */ "REHANDSHAKE\0"
111 /* 1262 */ "rehandshake\0"
112 /* 1274 */ "Don't accept session tickets\0"
113 /* 1303 */ "NOTICKET\0"
114 /* 1312 */ "noticket\0"
115 /* 1321 */ "Enable OCSP status request\0"
116 /* 1348 */ "OCSP_STATUS_REQUEST\0"
117 /* 1368 */ "no-ocsp-status-request\0"
118 /* 1391 */ "Connect, establish a plain session and start TLS.\0"
119 /* 1441 */ "STARTTLS\0"
120 /* 1450 */ "starttls\0"
121 /* 1459 */ "Use DTLS (datagram TLS) over UDP\0"
122 /* 1492 */ "UDP\0"
123 /* 1496 */ "udp\0"
124 /* 1500 */ "Set MTU for datagram TLS\0"
125 /* 1525 */ "MTU\0"
126 /* 1529 */ "mtu\0"
127 /* 1533 */ "Send CR LF instead of LF\0"
128 /* 1558 */ "CRLF\0"
129 /* 1563 */ "crlf\0"
130 /* 1568 */ "Use DER format for certificates to read from\0"
131 /* 1613 */ "X509FMTDER\0"
132 /* 1624 */ "x509fmtder\0"
133 /* 1635 */ "Send the openpgp fingerprint, instead of the key\0"
134 /* 1684 */ "FINGERPRINT\0"
135 /* 1696 */ "fingerprint\0"
136 /* 1708 */ "Disable all the TLS extensions\0"
137 /* 1739 */ "DISABLE_EXTENSIONS\0"
138 /* 1758 */ "disable-extensions\0"
139 /* 1777 */ "Print peer's certificate in PEM format\0"
140 /* 1816 */ "PRINT_CERT\0"
141 /* 1827 */ "print-cert\0"
142 /* 1838 */ "The maximum record size to advertize\0"
143 /* 1875 */ "RECORDSIZE\0"
144 /* 1886 */ "recordsize\0"
145 /* 1897 */ "The minimum number of bits allowed for DH\0"
146 /* 1939 */ "DH_BITS\0"
147 /* 1947 */ "dh-bits\0"
148 /* 1955 */ "Priorities string\0"
149 /* 1973 */ "PRIORITY\0"
150 /* 1982 */ "priority\0"
151 /* 1991 */ "Certificate file or PKCS #11 URL to use\0"
152 /* 2031 */ "X509CAFILE\0"
153 /* 2042 */ "x509cafile\0"
154 /* 2053 */ "CRL file to use\0"
155 /* 2069 */ "X509CRLFILE\0"
156 /* 2081 */ "x509crlfile\0"
157 /* 2093 */ "PGP Key file to use\0"
158 /* 2113 */ "PGPKEYFILE\0"
159 /* 2124 */ "pgpkeyfile\0"
160 /* 2135 */ "PGP Key ring file to use\0"
161 /* 2160 */ "PGPKEYRING\0"
162 /* 2171 */ "pgpkeyring\0"
163 /* 2182 */ "PGP Public Key (certificate) file to use\0"
164 /* 2223 */ "PGPCERTFILE\0"
165 /* 2235 */ "pgpcertfile\0"
166 /* 2247 */ "X.509 key file or PKCS #11 URL to use\0"
167 /* 2285 */ "X509KEYFILE\0"
168 /* 2297 */ "x509keyfile\0"
169 /* 2309 */ "X.509 Certificate file or PKCS #11 URL to use\0"
170 /* 2355 */ "X509CERTFILE\0"
171 /* 2368 */ "x509certfile\0"
172 /* 2381 */ "PGP subkey to use (hex or auto)\0"
173 /* 2413 */ "PGPSUBKEY\0"
174 /* 2423 */ "pgpsubkey\0"
175 /* 2433 */ "SRP username to use\0"
176 /* 2453 */ "SRPUSERNAME\0"
177 /* 2465 */ "srpusername\0"
178 /* 2477 */ "SRP password to use\0"
179 /* 2497 */ "SRPPASSWD\0"
180 /* 2507 */ "srppasswd\0"
181 /* 2517 */ "PSK username to use\0"
182 /* 2537 */ "PSKUSERNAME\0"
183 /* 2549 */ "pskusername\0"
184 /* 2561 */ "PSK key (in hex) to use\0"
185 /* 2585 */ "PSKKEY\0"
186 /* 2592 */ "pskkey\0"
187 /* 2599 */ "The port or service to connect to\0"
188 /* 2633 */ "PORT\0"
189 /* 2638 */ "port\0"
190 /* 2643 */ "Don't abort program if server certificate can't be validated\0"
191 /* 2704 */ "INSECURE\0"
192 /* 2713 */ "insecure\0"
193 /* 2722 */ "Benchmark individual ciphers\0"
194 /* 2751 */ "BENCHMARK_CIPHERS\0"
195 /* 2769 */ "benchmark-ciphers\0"
196 /* 2787 */ "Benchmark individual software ciphers (no hw acceleration)\0"
197 /* 2846 */ "BENCHMARK_SOFT_CIPHERS\0"
198 /* 2869 */ "benchmark-soft-ciphers\0"
199 /* 2892 */ "Benchmark TLS key exchange methods\0"
200 /* 2927 */ "BENCHMARK_TLS_KX\0"
201 /* 2944 */ "benchmark-tls-kx\0"
202 /* 2961 */ "Benchmark TLS ciphers\0"
203 /* 2983 */ "BENCHMARK_TLS_CIPHERS\0"
204 /* 3005 */ "benchmark-tls-ciphers\0"
205 /* 3027 */ "Print a list of the supported algorithms and modes\0"
206 /* 3078 */ "LIST\0"
207 /* 3083 */ "list\0"
208 /* 3088 */ "Display extended usage information and exit\0"
209 /* 3132 */ "help\0"
210 /* 3137 */ "Extended usage information passed thru pager\0"
211 /* 3182 */ "more-help\0"
212 /* 3192 */ "Output version information and exit\0"
213 /* 3228 */ "version\0"
214 /* 3236 */ "GNUTLS_CLI\0"
215 /* 3247 */ "gnutls-cli - GnuTLS client - Ver. @VERSION@\n"
216 "USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostname]\n\0"
217 /* 3360 */ "bug-gnutls@gnu.org\0"
218 /* 3379 */ "\n\n\0"
219 /* 3382 */ "\n"
220 "Simple client program to set up a TLS connection to some other computer. It\n"
221 "sets up a TLS connection and forwards data from the standard input to the\n"
222 "secured socket and vice versa.\n\0"
223 /* 3566 */ "gnutls-cli @VERSION@\0"
224 /* 3587 */ "Usage: gnutls-cli [options] hostname\n"
225 "gnutls-cli --help for usage instructions.\n";
228 * debug option description:
230 #define DEBUG_DESC (gnutls_cli_opt_strs+890)
231 #define DEBUG_NAME (gnutls_cli_opt_strs+908)
232 #define DEBUG_name (gnutls_cli_opt_strs+914)
233 #define DEBUG_FLAGS (OPTST_DISABLED \
234 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
237 * verbose option description:
239 #define VERBOSE_DESC (gnutls_cli_opt_strs+920)
240 #define VERBOSE_NAME (gnutls_cli_opt_strs+940)
241 #define VERBOSE_name (gnutls_cli_opt_strs+948)
242 #define VERBOSE_FLAGS (OPTST_DISABLED)
245 * tofu option description:
247 #define TOFU_DESC (gnutls_cli_opt_strs+956)
248 #define TOFU_NAME (gnutls_cli_opt_strs+997)
249 #define NOT_TOFU_name (gnutls_cli_opt_strs+1002)
250 #define NOT_TOFU_PFX (gnutls_cli_opt_strs+1010)
251 #define TOFU_name (NOT_TOFU_name + 3)
252 #define TOFU_FLAGS (OPTST_DISABLED)
255 * dane option description:
257 #define DANE_DESC (gnutls_cli_opt_strs+1013)
258 #define DANE_NAME (gnutls_cli_opt_strs+1059)
259 #define NOT_DANE_name (gnutls_cli_opt_strs+1064)
260 #define NOT_DANE_PFX (gnutls_cli_opt_strs+1010)
261 #define DANE_name (NOT_DANE_name + 3)
262 #define DANE_FLAGS (OPTST_DISABLED)
265 * ocsp option description:
267 #define OCSP_DESC (gnutls_cli_opt_strs+1072)
268 #define OCSP_NAME (gnutls_cli_opt_strs+1109)
269 #define NOT_OCSP_name (gnutls_cli_opt_strs+1114)
270 #define NOT_OCSP_PFX (gnutls_cli_opt_strs+1010)
271 #define OCSP_name (NOT_OCSP_name + 3)
272 #define OCSP_FLAGS (OPTST_DISABLED)
275 * resume option description:
277 #define RESUME_DESC (gnutls_cli_opt_strs+1122)
278 #define RESUME_NAME (gnutls_cli_opt_strs+1153)
279 #define RESUME_name (gnutls_cli_opt_strs+1160)
280 #define RESUME_FLAGS (OPTST_DISABLED)
283 * heartbeat option description:
285 #define HEARTBEAT_DESC (gnutls_cli_opt_strs+1167)
286 #define HEARTBEAT_NAME (gnutls_cli_opt_strs+1194)
287 #define HEARTBEAT_name (gnutls_cli_opt_strs+1204)
288 #define HEARTBEAT_FLAGS (OPTST_DISABLED)
291 * rehandshake option description:
293 #define REHANDSHAKE_DESC (gnutls_cli_opt_strs+1214)
294 #define REHANDSHAKE_NAME (gnutls_cli_opt_strs+1250)
295 #define REHANDSHAKE_name (gnutls_cli_opt_strs+1262)
296 #define REHANDSHAKE_FLAGS (OPTST_DISABLED)
299 * noticket option description:
301 #define NOTICKET_DESC (gnutls_cli_opt_strs+1274)
302 #define NOTICKET_NAME (gnutls_cli_opt_strs+1303)
303 #define NOTICKET_name (gnutls_cli_opt_strs+1312)
304 #define NOTICKET_FLAGS (OPTST_DISABLED)
307 * ocsp-status-request option description:
309 #define OCSP_STATUS_REQUEST_DESC (gnutls_cli_opt_strs+1321)
310 #define OCSP_STATUS_REQUEST_NAME (gnutls_cli_opt_strs+1348)
311 #define NOT_OCSP_STATUS_REQUEST_name (gnutls_cli_opt_strs+1368)
312 #define NOT_OCSP_STATUS_REQUEST_PFX (gnutls_cli_opt_strs+1010)
313 #define OCSP_STATUS_REQUEST_name (NOT_OCSP_STATUS_REQUEST_name + 3)
314 #define OCSP_STATUS_REQUEST_FLAGS (OPTST_INITENABLED)
317 * starttls option description:
319 #define STARTTLS_DESC (gnutls_cli_opt_strs+1391)
320 #define STARTTLS_NAME (gnutls_cli_opt_strs+1441)
321 #define STARTTLS_name (gnutls_cli_opt_strs+1450)
322 #define STARTTLS_FLAGS (OPTST_DISABLED)
325 * udp option description:
327 #define UDP_DESC (gnutls_cli_opt_strs+1459)
328 #define UDP_NAME (gnutls_cli_opt_strs+1492)
329 #define UDP_name (gnutls_cli_opt_strs+1496)
330 #define UDP_FLAGS (OPTST_DISABLED)
333 * mtu option description:
335 #define MTU_DESC (gnutls_cli_opt_strs+1500)
336 #define MTU_NAME (gnutls_cli_opt_strs+1525)
337 #define MTU_name (gnutls_cli_opt_strs+1529)
338 #define MTU_FLAGS (OPTST_DISABLED \
339 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
342 * crlf option description:
344 #define CRLF_DESC (gnutls_cli_opt_strs+1533)
345 #define CRLF_NAME (gnutls_cli_opt_strs+1558)
346 #define CRLF_name (gnutls_cli_opt_strs+1563)
347 #define CRLF_FLAGS (OPTST_DISABLED)
350 * x509fmtder option description:
352 #define X509FMTDER_DESC (gnutls_cli_opt_strs+1568)
353 #define X509FMTDER_NAME (gnutls_cli_opt_strs+1613)
354 #define X509FMTDER_name (gnutls_cli_opt_strs+1624)
355 #define X509FMTDER_FLAGS (OPTST_DISABLED)
358 * fingerprint option description:
360 #define FINGERPRINT_DESC (gnutls_cli_opt_strs+1635)
361 #define FINGERPRINT_NAME (gnutls_cli_opt_strs+1684)
362 #define FINGERPRINT_name (gnutls_cli_opt_strs+1696)
363 #define FINGERPRINT_FLAGS (OPTST_DISABLED)
366 * disable-extensions option description:
368 #define DISABLE_EXTENSIONS_DESC (gnutls_cli_opt_strs+1708)
369 #define DISABLE_EXTENSIONS_NAME (gnutls_cli_opt_strs+1739)
370 #define DISABLE_EXTENSIONS_name (gnutls_cli_opt_strs+1758)
371 #define DISABLE_EXTENSIONS_FLAGS (OPTST_DISABLED)
374 * print-cert option description:
376 #define PRINT_CERT_DESC (gnutls_cli_opt_strs+1777)
377 #define PRINT_CERT_NAME (gnutls_cli_opt_strs+1816)
378 #define PRINT_CERT_name (gnutls_cli_opt_strs+1827)
379 #define PRINT_CERT_FLAGS (OPTST_DISABLED)
382 * recordsize option description:
384 #define RECORDSIZE_DESC (gnutls_cli_opt_strs+1838)
385 #define RECORDSIZE_NAME (gnutls_cli_opt_strs+1875)
386 #define RECORDSIZE_name (gnutls_cli_opt_strs+1886)
387 #define RECORDSIZE_FLAGS (OPTST_DISABLED \
388 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
391 * dh-bits option description:
393 #define DH_BITS_DESC (gnutls_cli_opt_strs+1897)
394 #define DH_BITS_NAME (gnutls_cli_opt_strs+1939)
395 #define DH_BITS_name (gnutls_cli_opt_strs+1947)
396 #define DH_BITS_FLAGS (OPTST_DISABLED \
397 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
400 * priority option description:
402 #define PRIORITY_DESC (gnutls_cli_opt_strs+1955)
403 #define PRIORITY_NAME (gnutls_cli_opt_strs+1973)
404 #define PRIORITY_name (gnutls_cli_opt_strs+1982)
405 #define PRIORITY_FLAGS (OPTST_DISABLED \
406 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
409 * x509cafile option description:
411 #define X509CAFILE_DESC (gnutls_cli_opt_strs+1991)
412 #define X509CAFILE_NAME (gnutls_cli_opt_strs+2031)
413 #define X509CAFILE_name (gnutls_cli_opt_strs+2042)
414 #define X509CAFILE_FLAGS (OPTST_DISABLED \
415 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
418 * x509crlfile option description:
420 #define X509CRLFILE_DESC (gnutls_cli_opt_strs+2053)
421 #define X509CRLFILE_NAME (gnutls_cli_opt_strs+2069)
422 #define X509CRLFILE_name (gnutls_cli_opt_strs+2081)
423 #define X509CRLFILE_FLAGS (OPTST_DISABLED \
424 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
427 * pgpkeyfile option description:
429 #define PGPKEYFILE_DESC (gnutls_cli_opt_strs+2093)
430 #define PGPKEYFILE_NAME (gnutls_cli_opt_strs+2113)
431 #define PGPKEYFILE_name (gnutls_cli_opt_strs+2124)
432 #define PGPKEYFILE_FLAGS (OPTST_DISABLED \
433 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
436 * pgpkeyring option description:
438 #define PGPKEYRING_DESC (gnutls_cli_opt_strs+2135)
439 #define PGPKEYRING_NAME (gnutls_cli_opt_strs+2160)
440 #define PGPKEYRING_name (gnutls_cli_opt_strs+2171)
441 #define PGPKEYRING_FLAGS (OPTST_DISABLED \
442 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
445 * pgpcertfile option description:
447 #define PGPCERTFILE_DESC (gnutls_cli_opt_strs+2182)
448 #define PGPCERTFILE_NAME (gnutls_cli_opt_strs+2223)
449 #define PGPCERTFILE_name (gnutls_cli_opt_strs+2235)
450 #define PGPCERTFILE_FLAGS (OPTST_DISABLED \
451 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
454 * x509keyfile option description:
456 #define X509KEYFILE_DESC (gnutls_cli_opt_strs+2247)
457 #define X509KEYFILE_NAME (gnutls_cli_opt_strs+2285)
458 #define X509KEYFILE_name (gnutls_cli_opt_strs+2297)
459 #define X509KEYFILE_FLAGS (OPTST_DISABLED \
460 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
463 * x509certfile option description:
465 #define X509CERTFILE_DESC (gnutls_cli_opt_strs+2309)
466 #define X509CERTFILE_NAME (gnutls_cli_opt_strs+2355)
467 #define X509CERTFILE_name (gnutls_cli_opt_strs+2368)
468 #define X509CERTFILE_FLAGS (OPTST_DISABLED \
469 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
472 * pgpsubkey option description:
474 #define PGPSUBKEY_DESC (gnutls_cli_opt_strs+2381)
475 #define PGPSUBKEY_NAME (gnutls_cli_opt_strs+2413)
476 #define PGPSUBKEY_name (gnutls_cli_opt_strs+2423)
477 #define PGPSUBKEY_FLAGS (OPTST_DISABLED \
478 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
481 * srpusername option description:
483 #define SRPUSERNAME_DESC (gnutls_cli_opt_strs+2433)
484 #define SRPUSERNAME_NAME (gnutls_cli_opt_strs+2453)
485 #define SRPUSERNAME_name (gnutls_cli_opt_strs+2465)
486 #define SRPUSERNAME_FLAGS (OPTST_DISABLED \
487 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
490 * srppasswd option description:
492 #define SRPPASSWD_DESC (gnutls_cli_opt_strs+2477)
493 #define SRPPASSWD_NAME (gnutls_cli_opt_strs+2497)
494 #define SRPPASSWD_name (gnutls_cli_opt_strs+2507)
495 #define SRPPASSWD_FLAGS (OPTST_DISABLED \
496 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
499 * pskusername option description:
501 #define PSKUSERNAME_DESC (gnutls_cli_opt_strs+2517)
502 #define PSKUSERNAME_NAME (gnutls_cli_opt_strs+2537)
503 #define PSKUSERNAME_name (gnutls_cli_opt_strs+2549)
504 #define PSKUSERNAME_FLAGS (OPTST_DISABLED \
505 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
508 * pskkey option description:
510 #define PSKKEY_DESC (gnutls_cli_opt_strs+2561)
511 #define PSKKEY_NAME (gnutls_cli_opt_strs+2585)
512 #define PSKKEY_name (gnutls_cli_opt_strs+2592)
513 #define PSKKEY_FLAGS (OPTST_DISABLED \
514 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
517 * port option description:
519 #define PORT_DESC (gnutls_cli_opt_strs+2599)
520 #define PORT_NAME (gnutls_cli_opt_strs+2633)
521 #define PORT_name (gnutls_cli_opt_strs+2638)
522 #define PORT_FLAGS (OPTST_DISABLED \
523 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
526 * insecure option description:
528 #define INSECURE_DESC (gnutls_cli_opt_strs+2643)
529 #define INSECURE_NAME (gnutls_cli_opt_strs+2704)
530 #define INSECURE_name (gnutls_cli_opt_strs+2713)
531 #define INSECURE_FLAGS (OPTST_DISABLED)
534 * benchmark-ciphers option description:
536 #define BENCHMARK_CIPHERS_DESC (gnutls_cli_opt_strs+2722)
537 #define BENCHMARK_CIPHERS_NAME (gnutls_cli_opt_strs+2751)
538 #define BENCHMARK_CIPHERS_name (gnutls_cli_opt_strs+2769)
539 #define BENCHMARK_CIPHERS_FLAGS (OPTST_DISABLED)
542 * benchmark-soft-ciphers option description:
544 #define BENCHMARK_SOFT_CIPHERS_DESC (gnutls_cli_opt_strs+2787)
545 #define BENCHMARK_SOFT_CIPHERS_NAME (gnutls_cli_opt_strs+2846)
546 #define BENCHMARK_SOFT_CIPHERS_name (gnutls_cli_opt_strs+2869)
547 #define BENCHMARK_SOFT_CIPHERS_FLAGS (OPTST_DISABLED)
550 * benchmark-tls-kx option description:
552 #define BENCHMARK_TLS_KX_DESC (gnutls_cli_opt_strs+2892)
553 #define BENCHMARK_TLS_KX_NAME (gnutls_cli_opt_strs+2927)
554 #define BENCHMARK_TLS_KX_name (gnutls_cli_opt_strs+2944)
555 #define BENCHMARK_TLS_KX_FLAGS (OPTST_DISABLED)
558 * benchmark-tls-ciphers option description:
560 #define BENCHMARK_TLS_CIPHERS_DESC (gnutls_cli_opt_strs+2961)
561 #define BENCHMARK_TLS_CIPHERS_NAME (gnutls_cli_opt_strs+2983)
562 #define BENCHMARK_TLS_CIPHERS_name (gnutls_cli_opt_strs+3005)
563 #define BENCHMARK_TLS_CIPHERS_FLAGS (OPTST_DISABLED)
566 * list option description:
568 #define LIST_DESC (gnutls_cli_opt_strs+3027)
569 #define LIST_NAME (gnutls_cli_opt_strs+3078)
570 #define LIST_name (gnutls_cli_opt_strs+3083)
571 #define LIST_FLAGS (OPTST_DISABLED)
574 * Help/More_Help/Version option descriptions:
576 #define HELP_DESC (gnutls_cli_opt_strs+3088)
577 #define HELP_name (gnutls_cli_opt_strs+3132)
578 #ifdef HAVE_WORKING_FORK
579 #define MORE_HELP_DESC (gnutls_cli_opt_strs+3137)
580 #define MORE_HELP_name (gnutls_cli_opt_strs+3182)
581 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
582 #else
583 #define MORE_HELP_DESC NULL
584 #define MORE_HELP_name NULL
585 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
586 #endif
587 #ifdef NO_OPTIONAL_OPT_ARGS
588 # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
589 #else
590 # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
591 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
592 #endif
593 #define VER_DESC (gnutls_cli_opt_strs+3192)
594 #define VER_name (gnutls_cli_opt_strs+3228)
596 * Declare option callback procedures
598 extern tOptProc
599 optionBooleanVal, optionNestedVal, optionNumericVal,
600 optionPagedUsage, optionPrintVersion, optionResetOpt,
601 optionStackArg, optionTimeDate, optionTimeVal,
602 optionUnstackArg, optionVendorOption;
603 static tOptProc
604 doOptDebug, doOptMtu, doOptPgpcertfile, doOptPgpkeyfile,
605 doOptPgpkeyring, doOptRecordsize, doOptX509crlfile, doUsageOpt;
606 #define VER_PROC optionPrintVersion
608 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
610 * Define the gnutls-cli Option Descriptions.
611 * This is an array of OPTION_CT entries, one for each
612 * option that the gnutls-cli program responds to.
614 static tOptDesc optDesc[OPTION_CT] = {
615 { /* entry idx, value */ 0, VALUE_OPT_DEBUG,
616 /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
617 /* equivalenced to */ NO_EQUIVALENT,
618 /* min, max, act ct */ 0, 1, 0,
619 /* opt state flags */ DEBUG_FLAGS, 0,
620 /* last opt argumnt */ { NULL }, /* --debug */
621 /* arg list/cookie */ NULL,
622 /* must/cannot opts */ NULL, NULL,
623 /* option proc */ doOptDebug,
624 /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
625 /* disablement strs */ NULL, NULL },
627 { /* entry idx, value */ 1, VALUE_OPT_VERBOSE,
628 /* equiv idx, value */ 1, VALUE_OPT_VERBOSE,
629 /* equivalenced to */ NO_EQUIVALENT,
630 /* min, max, act ct */ 0, NOLIMIT, 0,
631 /* opt state flags */ VERBOSE_FLAGS, 0,
632 /* last opt argumnt */ { NULL }, /* --verbose */
633 /* arg list/cookie */ NULL,
634 /* must/cannot opts */ NULL, NULL,
635 /* option proc */ NULL,
636 /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
637 /* disablement strs */ NULL, NULL },
639 { /* entry idx, value */ 2, VALUE_OPT_TOFU,
640 /* equiv idx, value */ 2, VALUE_OPT_TOFU,
641 /* equivalenced to */ NO_EQUIVALENT,
642 /* min, max, act ct */ 0, 1, 0,
643 /* opt state flags */ TOFU_FLAGS, 0,
644 /* last opt argumnt */ { NULL }, /* --tofu */
645 /* arg list/cookie */ NULL,
646 /* must/cannot opts */ NULL, NULL,
647 /* option proc */ NULL,
648 /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name,
649 /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX },
651 { /* entry idx, value */ 3, VALUE_OPT_DANE,
652 /* equiv idx, value */ 3, VALUE_OPT_DANE,
653 /* equivalenced to */ NO_EQUIVALENT,
654 /* min, max, act ct */ 0, 1, 0,
655 /* opt state flags */ DANE_FLAGS, 0,
656 /* last opt argumnt */ { NULL }, /* --dane */
657 /* arg list/cookie */ NULL,
658 /* must/cannot opts */ NULL, NULL,
659 /* option proc */ NULL,
660 /* desc, NAME, name */ DANE_DESC, DANE_NAME, DANE_name,
661 /* disablement strs */ NOT_DANE_name, NOT_DANE_PFX },
663 { /* entry idx, value */ 4, VALUE_OPT_OCSP,
664 /* equiv idx, value */ 4, VALUE_OPT_OCSP,
665 /* equivalenced to */ NO_EQUIVALENT,
666 /* min, max, act ct */ 0, 1, 0,
667 /* opt state flags */ OCSP_FLAGS, 0,
668 /* last opt argumnt */ { NULL }, /* --ocsp */
669 /* arg list/cookie */ NULL,
670 /* must/cannot opts */ NULL, NULL,
671 /* option proc */ NULL,
672 /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name,
673 /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX },
675 { /* entry idx, value */ 5, VALUE_OPT_RESUME,
676 /* equiv idx, value */ 5, VALUE_OPT_RESUME,
677 /* equivalenced to */ NO_EQUIVALENT,
678 /* min, max, act ct */ 0, 1, 0,
679 /* opt state flags */ RESUME_FLAGS, 0,
680 /* last opt argumnt */ { NULL }, /* --resume */
681 /* arg list/cookie */ NULL,
682 /* must/cannot opts */ NULL, NULL,
683 /* option proc */ NULL,
684 /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name,
685 /* disablement strs */ NULL, NULL },
687 { /* entry idx, value */ 6, VALUE_OPT_HEARTBEAT,
688 /* equiv idx, value */ 6, VALUE_OPT_HEARTBEAT,
689 /* equivalenced to */ NO_EQUIVALENT,
690 /* min, max, act ct */ 0, 1, 0,
691 /* opt state flags */ HEARTBEAT_FLAGS, 0,
692 /* last opt argumnt */ { NULL }, /* --heartbeat */
693 /* arg list/cookie */ NULL,
694 /* must/cannot opts */ NULL, NULL,
695 /* option proc */ NULL,
696 /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name,
697 /* disablement strs */ NULL, NULL },
699 { /* entry idx, value */ 7, VALUE_OPT_REHANDSHAKE,
700 /* equiv idx, value */ 7, VALUE_OPT_REHANDSHAKE,
701 /* equivalenced to */ NO_EQUIVALENT,
702 /* min, max, act ct */ 0, 1, 0,
703 /* opt state flags */ REHANDSHAKE_FLAGS, 0,
704 /* last opt argumnt */ { NULL }, /* --rehandshake */
705 /* arg list/cookie */ NULL,
706 /* must/cannot opts */ NULL, NULL,
707 /* option proc */ NULL,
708 /* desc, NAME, name */ REHANDSHAKE_DESC, REHANDSHAKE_NAME, REHANDSHAKE_name,
709 /* disablement strs */ NULL, NULL },
711 { /* entry idx, value */ 8, VALUE_OPT_NOTICKET,
712 /* equiv idx, value */ 8, VALUE_OPT_NOTICKET,
713 /* equivalenced to */ NO_EQUIVALENT,
714 /* min, max, act ct */ 0, 1, 0,
715 /* opt state flags */ NOTICKET_FLAGS, 0,
716 /* last opt argumnt */ { NULL }, /* --noticket */
717 /* arg list/cookie */ NULL,
718 /* must/cannot opts */ NULL, NULL,
719 /* option proc */ NULL,
720 /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name,
721 /* disablement strs */ NULL, NULL },
723 { /* entry idx, value */ 9, VALUE_OPT_OCSP_STATUS_REQUEST,
724 /* equiv idx, value */ 9, VALUE_OPT_OCSP_STATUS_REQUEST,
725 /* equivalenced to */ NO_EQUIVALENT,
726 /* min, max, act ct */ 0, 1, 0,
727 /* opt state flags */ OCSP_STATUS_REQUEST_FLAGS, 0,
728 /* last opt argumnt */ { NULL }, /* --ocsp-status-request */
729 /* arg list/cookie */ NULL,
730 /* must/cannot opts */ NULL, NULL,
731 /* option proc */ NULL,
732 /* desc, NAME, name */ OCSP_STATUS_REQUEST_DESC, OCSP_STATUS_REQUEST_NAME, OCSP_STATUS_REQUEST_name,
733 /* disablement strs */ NOT_OCSP_STATUS_REQUEST_name, NOT_OCSP_STATUS_REQUEST_PFX },
735 { /* entry idx, value */ 10, VALUE_OPT_STARTTLS,
736 /* equiv idx, value */ 10, VALUE_OPT_STARTTLS,
737 /* equivalenced to */ NO_EQUIVALENT,
738 /* min, max, act ct */ 0, 1, 0,
739 /* opt state flags */ STARTTLS_FLAGS, 0,
740 /* last opt argumnt */ { NULL }, /* --starttls */
741 /* arg list/cookie */ NULL,
742 /* must/cannot opts */ NULL, NULL,
743 /* option proc */ NULL,
744 /* desc, NAME, name */ STARTTLS_DESC, STARTTLS_NAME, STARTTLS_name,
745 /* disablement strs */ NULL, NULL },
747 { /* entry idx, value */ 11, VALUE_OPT_UDP,
748 /* equiv idx, value */ 11, VALUE_OPT_UDP,
749 /* equivalenced to */ NO_EQUIVALENT,
750 /* min, max, act ct */ 0, 1, 0,
751 /* opt state flags */ UDP_FLAGS, 0,
752 /* last opt argumnt */ { NULL }, /* --udp */
753 /* arg list/cookie */ NULL,
754 /* must/cannot opts */ NULL, NULL,
755 /* option proc */ NULL,
756 /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name,
757 /* disablement strs */ NULL, NULL },
759 { /* entry idx, value */ 12, VALUE_OPT_MTU,
760 /* equiv idx, value */ 12, VALUE_OPT_MTU,
761 /* equivalenced to */ NO_EQUIVALENT,
762 /* min, max, act ct */ 0, 1, 0,
763 /* opt state flags */ MTU_FLAGS, 0,
764 /* last opt argumnt */ { NULL }, /* --mtu */
765 /* arg list/cookie */ NULL,
766 /* must/cannot opts */ NULL, NULL,
767 /* option proc */ doOptMtu,
768 /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
769 /* disablement strs */ NULL, NULL },
771 { /* entry idx, value */ 13, VALUE_OPT_CRLF,
772 /* equiv idx, value */ 13, VALUE_OPT_CRLF,
773 /* equivalenced to */ NO_EQUIVALENT,
774 /* min, max, act ct */ 0, 1, 0,
775 /* opt state flags */ CRLF_FLAGS, 0,
776 /* last opt argumnt */ { NULL }, /* --crlf */
777 /* arg list/cookie */ NULL,
778 /* must/cannot opts */ NULL, NULL,
779 /* option proc */ NULL,
780 /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name,
781 /* disablement strs */ NULL, NULL },
783 { /* entry idx, value */ 14, VALUE_OPT_X509FMTDER,
784 /* equiv idx, value */ 14, VALUE_OPT_X509FMTDER,
785 /* equivalenced to */ NO_EQUIVALENT,
786 /* min, max, act ct */ 0, 1, 0,
787 /* opt state flags */ X509FMTDER_FLAGS, 0,
788 /* last opt argumnt */ { NULL }, /* --x509fmtder */
789 /* arg list/cookie */ NULL,
790 /* must/cannot opts */ NULL, NULL,
791 /* option proc */ NULL,
792 /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name,
793 /* disablement strs */ NULL, NULL },
795 { /* entry idx, value */ 15, VALUE_OPT_FINGERPRINT,
796 /* equiv idx, value */ 15, VALUE_OPT_FINGERPRINT,
797 /* equivalenced to */ NO_EQUIVALENT,
798 /* min, max, act ct */ 0, 1, 0,
799 /* opt state flags */ FINGERPRINT_FLAGS, 0,
800 /* last opt argumnt */ { NULL }, /* --fingerprint */
801 /* arg list/cookie */ NULL,
802 /* must/cannot opts */ NULL, NULL,
803 /* option proc */ NULL,
804 /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, FINGERPRINT_name,
805 /* disablement strs */ NULL, NULL },
807 { /* entry idx, value */ 16, VALUE_OPT_DISABLE_EXTENSIONS,
808 /* equiv idx, value */ 16, VALUE_OPT_DISABLE_EXTENSIONS,
809 /* equivalenced to */ NO_EQUIVALENT,
810 /* min, max, act ct */ 0, 1, 0,
811 /* opt state flags */ DISABLE_EXTENSIONS_FLAGS, 0,
812 /* last opt argumnt */ { NULL }, /* --disable-extensions */
813 /* arg list/cookie */ NULL,
814 /* must/cannot opts */ NULL, NULL,
815 /* option proc */ NULL,
816 /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, DISABLE_EXTENSIONS_name,
817 /* disablement strs */ NULL, NULL },
819 { /* entry idx, value */ 17, VALUE_OPT_PRINT_CERT,
820 /* equiv idx, value */ 17, VALUE_OPT_PRINT_CERT,
821 /* equivalenced to */ NO_EQUIVALENT,
822 /* min, max, act ct */ 0, 1, 0,
823 /* opt state flags */ PRINT_CERT_FLAGS, 0,
824 /* last opt argumnt */ { NULL }, /* --print-cert */
825 /* arg list/cookie */ NULL,
826 /* must/cannot opts */ NULL, NULL,
827 /* option proc */ NULL,
828 /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name,
829 /* disablement strs */ NULL, NULL },
831 { /* entry idx, value */ 18, VALUE_OPT_RECORDSIZE,
832 /* equiv idx, value */ 18, VALUE_OPT_RECORDSIZE,
833 /* equivalenced to */ NO_EQUIVALENT,
834 /* min, max, act ct */ 0, 1, 0,
835 /* opt state flags */ RECORDSIZE_FLAGS, 0,
836 /* last opt argumnt */ { NULL }, /* --recordsize */
837 /* arg list/cookie */ NULL,
838 /* must/cannot opts */ NULL, NULL,
839 /* option proc */ doOptRecordsize,
840 /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name,
841 /* disablement strs */ NULL, NULL },
843 { /* entry idx, value */ 19, VALUE_OPT_DH_BITS,
844 /* equiv idx, value */ 19, VALUE_OPT_DH_BITS,
845 /* equivalenced to */ NO_EQUIVALENT,
846 /* min, max, act ct */ 0, 1, 0,
847 /* opt state flags */ DH_BITS_FLAGS, 0,
848 /* last opt argumnt */ { NULL }, /* --dh-bits */
849 /* arg list/cookie */ NULL,
850 /* must/cannot opts */ NULL, NULL,
851 /* option proc */ optionNumericVal,
852 /* desc, NAME, name */ DH_BITS_DESC, DH_BITS_NAME, DH_BITS_name,
853 /* disablement strs */ NULL, NULL },
855 { /* entry idx, value */ 20, VALUE_OPT_PRIORITY,
856 /* equiv idx, value */ 20, VALUE_OPT_PRIORITY,
857 /* equivalenced to */ NO_EQUIVALENT,
858 /* min, max, act ct */ 0, 1, 0,
859 /* opt state flags */ PRIORITY_FLAGS, 0,
860 /* last opt argumnt */ { NULL }, /* --priority */
861 /* arg list/cookie */ NULL,
862 /* must/cannot opts */ NULL, NULL,
863 /* option proc */ NULL,
864 /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
865 /* disablement strs */ NULL, NULL },
867 { /* entry idx, value */ 21, VALUE_OPT_X509CAFILE,
868 /* equiv idx, value */ 21, VALUE_OPT_X509CAFILE,
869 /* equivalenced to */ NO_EQUIVALENT,
870 /* min, max, act ct */ 0, 1, 0,
871 /* opt state flags */ X509CAFILE_FLAGS, 0,
872 /* last opt argumnt */ { NULL }, /* --x509cafile */
873 /* arg list/cookie */ NULL,
874 /* must/cannot opts */ NULL, NULL,
875 /* option proc */ NULL,
876 /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name,
877 /* disablement strs */ NULL, NULL },
879 { /* entry idx, value */ 22, VALUE_OPT_X509CRLFILE,
880 /* equiv idx, value */ 22, VALUE_OPT_X509CRLFILE,
881 /* equivalenced to */ NO_EQUIVALENT,
882 /* min, max, act ct */ 0, 1, 0,
883 /* opt state flags */ X509CRLFILE_FLAGS, 0,
884 /* last opt argumnt */ { NULL }, /* --x509crlfile */
885 /* arg list/cookie */ NULL,
886 /* must/cannot opts */ NULL, NULL,
887 /* option proc */ doOptX509crlfile,
888 /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, X509CRLFILE_name,
889 /* disablement strs */ NULL, NULL },
891 { /* entry idx, value */ 23, VALUE_OPT_PGPKEYFILE,
892 /* equiv idx, value */ 23, VALUE_OPT_PGPKEYFILE,
893 /* equivalenced to */ NO_EQUIVALENT,
894 /* min, max, act ct */ 0, 1, 0,
895 /* opt state flags */ PGPKEYFILE_FLAGS, 0,
896 /* last opt argumnt */ { NULL }, /* --pgpkeyfile */
897 /* arg list/cookie */ NULL,
898 /* must/cannot opts */ NULL, NULL,
899 /* option proc */ doOptPgpkeyfile,
900 /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name,
901 /* disablement strs */ NULL, NULL },
903 { /* entry idx, value */ 24, VALUE_OPT_PGPKEYRING,
904 /* equiv idx, value */ 24, VALUE_OPT_PGPKEYRING,
905 /* equivalenced to */ NO_EQUIVALENT,
906 /* min, max, act ct */ 0, 1, 0,
907 /* opt state flags */ PGPKEYRING_FLAGS, 0,
908 /* last opt argumnt */ { NULL }, /* --pgpkeyring */
909 /* arg list/cookie */ NULL,
910 /* must/cannot opts */ NULL, NULL,
911 /* option proc */ doOptPgpkeyring,
912 /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name,
913 /* disablement strs */ NULL, NULL },
915 { /* entry idx, value */ 25, VALUE_OPT_PGPCERTFILE,
916 /* equiv idx, value */ 25, VALUE_OPT_PGPCERTFILE,
917 /* equivalenced to */ NO_EQUIVALENT,
918 /* min, max, act ct */ 0, 1, 0,
919 /* opt state flags */ PGPCERTFILE_FLAGS, 0,
920 /* last opt argumnt */ { NULL }, /* --pgpcertfile */
921 /* arg list/cookie */ NULL,
922 /* must/cannot opts */ NULL, NULL,
923 /* option proc */ doOptPgpcertfile,
924 /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, PGPCERTFILE_name,
925 /* disablement strs */ NULL, NULL },
927 { /* entry idx, value */ 26, VALUE_OPT_X509KEYFILE,
928 /* equiv idx, value */ 26, VALUE_OPT_X509KEYFILE,
929 /* equivalenced to */ NO_EQUIVALENT,
930 /* min, max, act ct */ 0, 1, 0,
931 /* opt state flags */ X509KEYFILE_FLAGS, 0,
932 /* last opt argumnt */ { NULL }, /* --x509keyfile */
933 /* arg list/cookie */ NULL,
934 /* must/cannot opts */ NULL, NULL,
935 /* option proc */ NULL,
936 /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, X509KEYFILE_name,
937 /* disablement strs */ NULL, NULL },
939 { /* entry idx, value */ 27, VALUE_OPT_X509CERTFILE,
940 /* equiv idx, value */ 27, VALUE_OPT_X509CERTFILE,
941 /* equivalenced to */ NO_EQUIVALENT,
942 /* min, max, act ct */ 0, 1, 0,
943 /* opt state flags */ X509CERTFILE_FLAGS, 0,
944 /* last opt argumnt */ { NULL }, /* --x509certfile */
945 /* arg list/cookie */ NULL,
946 /* must/cannot opts */ NULL, NULL,
947 /* option proc */ NULL,
948 /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, X509CERTFILE_name,
949 /* disablement strs */ NULL, NULL },
951 { /* entry idx, value */ 28, VALUE_OPT_PGPSUBKEY,
952 /* equiv idx, value */ 28, VALUE_OPT_PGPSUBKEY,
953 /* equivalenced to */ NO_EQUIVALENT,
954 /* min, max, act ct */ 0, 1, 0,
955 /* opt state flags */ PGPSUBKEY_FLAGS, 0,
956 /* last opt argumnt */ { NULL }, /* --pgpsubkey */
957 /* arg list/cookie */ NULL,
958 /* must/cannot opts */ NULL, NULL,
959 /* option proc */ NULL,
960 /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name,
961 /* disablement strs */ NULL, NULL },
963 { /* entry idx, value */ 29, VALUE_OPT_SRPUSERNAME,
964 /* equiv idx, value */ 29, VALUE_OPT_SRPUSERNAME,
965 /* equivalenced to */ NO_EQUIVALENT,
966 /* min, max, act ct */ 0, 1, 0,
967 /* opt state flags */ SRPUSERNAME_FLAGS, 0,
968 /* last opt argumnt */ { NULL }, /* --srpusername */
969 /* arg list/cookie */ NULL,
970 /* must/cannot opts */ NULL, NULL,
971 /* option proc */ NULL,
972 /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, SRPUSERNAME_name,
973 /* disablement strs */ NULL, NULL },
975 { /* entry idx, value */ 30, VALUE_OPT_SRPPASSWD,
976 /* equiv idx, value */ 30, VALUE_OPT_SRPPASSWD,
977 /* equivalenced to */ NO_EQUIVALENT,
978 /* min, max, act ct */ 0, 1, 0,
979 /* opt state flags */ SRPPASSWD_FLAGS, 0,
980 /* last opt argumnt */ { NULL }, /* --srppasswd */
981 /* arg list/cookie */ NULL,
982 /* must/cannot opts */ NULL, NULL,
983 /* option proc */ NULL,
984 /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name,
985 /* disablement strs */ NULL, NULL },
987 { /* entry idx, value */ 31, VALUE_OPT_PSKUSERNAME,
988 /* equiv idx, value */ 31, VALUE_OPT_PSKUSERNAME,
989 /* equivalenced to */ NO_EQUIVALENT,
990 /* min, max, act ct */ 0, 1, 0,
991 /* opt state flags */ PSKUSERNAME_FLAGS, 0,
992 /* last opt argumnt */ { NULL }, /* --pskusername */
993 /* arg list/cookie */ NULL,
994 /* must/cannot opts */ NULL, NULL,
995 /* option proc */ NULL,
996 /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, PSKUSERNAME_name,
997 /* disablement strs */ NULL, NULL },
999 { /* entry idx, value */ 32, VALUE_OPT_PSKKEY,
1000 /* equiv idx, value */ 32, VALUE_OPT_PSKKEY,
1001 /* equivalenced to */ NO_EQUIVALENT,
1002 /* min, max, act ct */ 0, 1, 0,
1003 /* opt state flags */ PSKKEY_FLAGS, 0,
1004 /* last opt argumnt */ { NULL }, /* --pskkey */
1005 /* arg list/cookie */ NULL,
1006 /* must/cannot opts */ NULL, NULL,
1007 /* option proc */ NULL,
1008 /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name,
1009 /* disablement strs */ NULL, NULL },
1011 { /* entry idx, value */ 33, VALUE_OPT_PORT,
1012 /* equiv idx, value */ 33, VALUE_OPT_PORT,
1013 /* equivalenced to */ NO_EQUIVALENT,
1014 /* min, max, act ct */ 0, 1, 0,
1015 /* opt state flags */ PORT_FLAGS, 0,
1016 /* last opt argumnt */ { NULL }, /* --port */
1017 /* arg list/cookie */ NULL,
1018 /* must/cannot opts */ NULL, NULL,
1019 /* option proc */ NULL,
1020 /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
1021 /* disablement strs */ NULL, NULL },
1023 { /* entry idx, value */ 34, VALUE_OPT_INSECURE,
1024 /* equiv idx, value */ 34, VALUE_OPT_INSECURE,
1025 /* equivalenced to */ NO_EQUIVALENT,
1026 /* min, max, act ct */ 0, 1, 0,
1027 /* opt state flags */ INSECURE_FLAGS, 0,
1028 /* last opt argumnt */ { NULL }, /* --insecure */
1029 /* arg list/cookie */ NULL,
1030 /* must/cannot opts */ NULL, NULL,
1031 /* option proc */ NULL,
1032 /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name,
1033 /* disablement strs */ NULL, NULL },
1035 { /* entry idx, value */ 35, VALUE_OPT_BENCHMARK_CIPHERS,
1036 /* equiv idx, value */ 35, VALUE_OPT_BENCHMARK_CIPHERS,
1037 /* equivalenced to */ NO_EQUIVALENT,
1038 /* min, max, act ct */ 0, 1, 0,
1039 /* opt state flags */ BENCHMARK_CIPHERS_FLAGS, 0,
1040 /* last opt argumnt */ { NULL }, /* --benchmark-ciphers */
1041 /* arg list/cookie */ NULL,
1042 /* must/cannot opts */ NULL, NULL,
1043 /* option proc */ NULL,
1044 /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, BENCHMARK_CIPHERS_name,
1045 /* disablement strs */ NULL, NULL },
1047 { /* entry idx, value */ 36, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
1048 /* equiv idx, value */ 36, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
1049 /* equivalenced to */ NO_EQUIVALENT,
1050 /* min, max, act ct */ 0, 1, 0,
1051 /* opt state flags */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0,
1052 /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */
1053 /* arg list/cookie */ NULL,
1054 /* must/cannot opts */ NULL, NULL,
1055 /* option proc */ NULL,
1056 /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name,
1057 /* disablement strs */ NULL, NULL },
1059 { /* entry idx, value */ 37, VALUE_OPT_BENCHMARK_TLS_KX,
1060 /* equiv idx, value */ 37, VALUE_OPT_BENCHMARK_TLS_KX,
1061 /* equivalenced to */ NO_EQUIVALENT,
1062 /* min, max, act ct */ 0, 1, 0,
1063 /* opt state flags */ BENCHMARK_TLS_KX_FLAGS, 0,
1064 /* last opt argumnt */ { NULL }, /* --benchmark-tls-kx */
1065 /* arg list/cookie */ NULL,
1066 /* must/cannot opts */ NULL, NULL,
1067 /* option proc */ NULL,
1068 /* desc, NAME, name */ BENCHMARK_TLS_KX_DESC, BENCHMARK_TLS_KX_NAME, BENCHMARK_TLS_KX_name,
1069 /* disablement strs */ NULL, NULL },
1071 { /* entry idx, value */ 38, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
1072 /* equiv idx, value */ 38, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
1073 /* equivalenced to */ NO_EQUIVALENT,
1074 /* min, max, act ct */ 0, 1, 0,
1075 /* opt state flags */ BENCHMARK_TLS_CIPHERS_FLAGS, 0,
1076 /* last opt argumnt */ { NULL }, /* --benchmark-tls-ciphers */
1077 /* arg list/cookie */ NULL,
1078 /* must/cannot opts */ NULL, NULL,
1079 /* option proc */ NULL,
1080 /* desc, NAME, name */ BENCHMARK_TLS_CIPHERS_DESC, BENCHMARK_TLS_CIPHERS_NAME, BENCHMARK_TLS_CIPHERS_name,
1081 /* disablement strs */ NULL, NULL },
1083 { /* entry idx, value */ 39, VALUE_OPT_LIST,
1084 /* equiv idx, value */ 39, VALUE_OPT_LIST,
1085 /* equivalenced to */ NO_EQUIVALENT,
1086 /* min, max, act ct */ 0, 1, 0,
1087 /* opt state flags */ LIST_FLAGS, 0,
1088 /* last opt argumnt */ { NULL }, /* --list */
1089 /* arg list/cookie */ NULL,
1090 /* must/cannot opts */ NULL, NULL,
1091 /* option proc */ NULL,
1092 /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name,
1093 /* disablement strs */ NULL, NULL },
1095 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
1096 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
1097 /* equivalenced to */ NO_EQUIVALENT,
1098 /* min, max, act ct */ 0, 1, 0,
1099 /* opt state flags */ VER_FLAGS, 0,
1100 /* last opt argumnt */ { NULL },
1101 /* arg list/cookie */ NULL,
1102 /* must/cannot opts */ NULL, NULL,
1103 /* option proc */ VER_PROC,
1104 /* desc, NAME, name */ VER_DESC, NULL, VER_name,
1105 /* disablement strs */ NULL, NULL },
1109 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
1110 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
1111 /* equivalenced to */ NO_EQUIVALENT,
1112 /* min, max, act ct */ 0, 1, 0,
1113 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
1114 /* last opt argumnt */ { NULL },
1115 /* arg list/cookie */ NULL,
1116 /* must/cannot opts */ NULL, NULL,
1117 /* option proc */ doUsageOpt,
1118 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
1119 /* disablement strs */ NULL, NULL },
1121 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
1122 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
1123 /* equivalenced to */ NO_EQUIVALENT,
1124 /* min, max, act ct */ 0, 1, 0,
1125 /* opt state flags */ MORE_HELP_FLAGS, 0,
1126 /* last opt argumnt */ { NULL },
1127 /* arg list/cookie */ NULL,
1128 /* must/cannot opts */ NULL, NULL,
1129 /* option proc */ optionPagedUsage,
1130 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
1131 /* disablement strs */ NULL, NULL }
1135 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1137 * Define the gnutls-cli Option Environment
1139 #define zPROGNAME (gnutls_cli_opt_strs+3236)
1140 #define zUsageTitle (gnutls_cli_opt_strs+3247)
1141 #define zRcName NULL
1142 #define apzHomeList NULL
1143 #define zBugsAddr (gnutls_cli_opt_strs+3360)
1144 #define zExplain (gnutls_cli_opt_strs+3379)
1145 #define zDetail (gnutls_cli_opt_strs+3382)
1146 #define zFullVersion (gnutls_cli_opt_strs+3566)
1147 /* extracted from optcode.tlib near line 350 */
1149 #if defined(ENABLE_NLS)
1150 # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
1151 static tOptionXlateProc translate_option_strings;
1152 #else
1153 # define OPTPROC_BASE OPTPROC_NONE
1154 # define translate_option_strings NULL
1155 #endif /* ENABLE_NLS */
1158 #define gnutls_cli_full_usage (NULL)
1160 #define gnutls_cli_short_usage (gnutls_cli_opt_strs+3587)
1162 #endif /* not defined __doxygen__ */
1165 * Create the static procedure(s) declared above.
1168 * The callout function that invokes the optionUsage function.
1170 * @param pOptions the AutoOpts option description structure
1171 * @param pOptDesc the descriptor for the "help" (usage) option.
1172 * @noreturn
1174 static void
1175 doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
1177 optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS);
1178 /* NOTREACHED */
1179 (void)pOptDesc;
1180 (void)pOptions;
1183 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1185 * Code to handle the debug option.
1187 * @param pOptions the gnutls-cli options data structure
1188 * @param pOptDesc the option descriptor for this option.
1190 static void
1191 doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
1193 static struct {long rmin, rmax;} const rng[1] = {
1194 { 0 , 9999 } };
1195 int ix;
1197 if (pOptions <= OPTPROC_EMIT_LIMIT)
1198 goto emit_ranges;
1199 optionNumericVal(pOptions, pOptDesc);
1201 for (ix = 0; ix < 1; ix++) {
1202 if (pOptDesc->optArg.argInt < rng[ix].rmin)
1203 continue; /* ranges need not be ordered. */
1204 if (pOptDesc->optArg.argInt == rng[ix].rmin)
1205 return;
1206 if (rng[ix].rmax == LONG_MIN)
1207 continue;
1208 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1209 return;
1212 option_usage_fp = stderr;
1214 emit_ranges:
1216 optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1219 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1221 * Code to handle the mtu option.
1223 * @param pOptions the gnutls-cli options data structure
1224 * @param pOptDesc the option descriptor for this option.
1226 static void
1227 doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc)
1229 static struct {long rmin, rmax;} const rng[1] = {
1230 { 0, 17000 } };
1231 int ix;
1233 if (pOptions <= OPTPROC_EMIT_LIMIT)
1234 goto emit_ranges;
1235 optionNumericVal(pOptions, pOptDesc);
1237 for (ix = 0; ix < 1; ix++) {
1238 if (pOptDesc->optArg.argInt < rng[ix].rmin)
1239 continue; /* ranges need not be ordered. */
1240 if (pOptDesc->optArg.argInt == rng[ix].rmin)
1241 return;
1242 if (rng[ix].rmax == LONG_MIN)
1243 continue;
1244 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1245 return;
1248 option_usage_fp = stderr;
1250 emit_ranges:
1252 optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1255 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1257 * Code to handle the recordsize option.
1259 * @param pOptions the gnutls-cli options data structure
1260 * @param pOptDesc the option descriptor for this option.
1262 static void
1263 doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc)
1265 static struct {long rmin, rmax;} const rng[1] = {
1266 { 0, 4096 } };
1267 int ix;
1269 if (pOptions <= OPTPROC_EMIT_LIMIT)
1270 goto emit_ranges;
1271 optionNumericVal(pOptions, pOptDesc);
1273 for (ix = 0; ix < 1; ix++) {
1274 if (pOptDesc->optArg.argInt < rng[ix].rmin)
1275 continue; /* ranges need not be ordered. */
1276 if (pOptDesc->optArg.argInt == rng[ix].rmin)
1277 return;
1278 if (rng[ix].rmax == LONG_MIN)
1279 continue;
1280 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1281 return;
1284 option_usage_fp = stderr;
1286 emit_ranges:
1288 optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1291 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1293 * Code to handle the x509crlfile option.
1295 * @param pOptions the gnutls-cli options data structure
1296 * @param pOptDesc the option descriptor for this option.
1298 static void
1299 doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc)
1301 static teOptFileType const type =
1302 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1303 static tuFileMode mode;
1304 #ifndef O_CLOEXEC
1305 # define O_CLOEXEC 0
1306 #endif
1307 mode.file_flags = O_CLOEXEC;
1309 optionFileCheck(pOptions, pOptDesc, type, mode);
1312 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1314 * Code to handle the pgpkeyfile option.
1316 * @param pOptions the gnutls-cli options data structure
1317 * @param pOptDesc the option descriptor for this option.
1319 static void
1320 doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
1322 static teOptFileType const type =
1323 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1324 static tuFileMode mode;
1325 #ifndef O_CLOEXEC
1326 # define O_CLOEXEC 0
1327 #endif
1328 mode.file_flags = O_CLOEXEC;
1330 optionFileCheck(pOptions, pOptDesc, type, mode);
1333 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1335 * Code to handle the pgpkeyring option.
1337 * @param pOptions the gnutls-cli options data structure
1338 * @param pOptDesc the option descriptor for this option.
1340 static void
1341 doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc)
1343 static teOptFileType const type =
1344 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1345 static tuFileMode mode;
1346 #ifndef O_CLOEXEC
1347 # define O_CLOEXEC 0
1348 #endif
1349 mode.file_flags = O_CLOEXEC;
1351 optionFileCheck(pOptions, pOptDesc, type, mode);
1354 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1356 * Code to handle the pgpcertfile option.
1358 * @param pOptions the gnutls-cli options data structure
1359 * @param pOptDesc the option descriptor for this option.
1361 static void
1362 doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc)
1364 static teOptFileType const type =
1365 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1366 static tuFileMode mode;
1367 #ifndef O_CLOEXEC
1368 # define O_CLOEXEC 0
1369 #endif
1370 mode.file_flags = O_CLOEXEC;
1372 optionFileCheck(pOptions, pOptDesc, type, mode);
1374 /* extracted from optmain.tlib near line 1113 */
1377 * The directory containing the data associated with gnutls-cli.
1379 #ifndef PKGDATADIR
1380 # define PKGDATADIR ""
1381 #endif
1384 * Information about the person or institution that packaged gnutls-cli
1385 * for the current distribution.
1387 #ifndef WITH_PACKAGER
1388 # define gnutls_cli_packager_info NULL
1389 #else
1390 static char const gnutls_cli_packager_info[] =
1391 "Packaged by " WITH_PACKAGER
1393 # ifdef WITH_PACKAGER_VERSION
1394 " ("WITH_PACKAGER_VERSION")"
1395 # endif
1397 # ifdef WITH_PACKAGER_BUG_REPORTS
1398 "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS
1399 # endif
1400 "\n";
1401 #endif
1402 #ifndef __doxygen__
1404 #endif /* __doxygen__ */
1406 * The option definitions for gnutls-cli. The one structure that
1407 * binds them all.
1409 tOptions gnutls_cliOptions = {
1410 OPTIONS_STRUCT_VERSION,
1411 0, NULL, /* original argc + argv */
1412 ( OPTPROC_BASE
1413 + OPTPROC_ERRSTOP
1414 + OPTPROC_SHORTOPT
1415 + OPTPROC_LONGOPT
1416 + OPTPROC_NO_REQ_OPT
1417 + OPTPROC_NEGATIONS
1418 + OPTPROC_REORDER
1419 + OPTPROC_GNUUSAGE
1420 + OPTPROC_MISUSE ),
1421 0, NULL, /* current option index, current option */
1422 NULL, NULL, zPROGNAME,
1423 zRcName, zCopyright, zLicenseDescrip,
1424 zFullVersion, apzHomeList, zUsageTitle,
1425 zExplain, zDetail, optDesc,
1426 zBugsAddr, /* address to send bugs to */
1427 NULL, NULL, /* extensions/saved state */
1428 optionUsage, /* usage procedure */
1429 translate_option_strings, /* translation procedure */
1431 * Indexes to special options
1433 { INDEX_OPT_MORE_HELP, /* more-help option index */
1434 NO_EQUIVALENT, /* save option index */
1435 NO_EQUIVALENT, /* '-#' option index */
1436 NO_EQUIVALENT /* index of default opt */
1438 43 /* full option count */, 40 /* user option count */,
1439 gnutls_cli_full_usage, gnutls_cli_short_usage,
1440 NULL, NULL,
1441 PKGDATADIR, gnutls_cli_packager_info
1444 #if ENABLE_NLS
1445 #include <stdio.h>
1446 #include <stdlib.h>
1447 #include <string.h>
1448 #include <unistd.h>
1449 #include <autoopts/usage-txt.h>
1451 static char* AO_gettext(char const* pz);
1452 static void coerce_it(void** s);
1455 * AutoGen specific wrapper function for gettext.
1456 * It relies on the macro _() to convert from English to the target
1457 * language, then strdup-duplicates the result string.
1459 * @param[in] pz the input text used as a lookup key.
1460 * @returns the translated text (if there is one),
1461 * or the original text (if not).
1463 static char *
1464 AO_gettext(char const* pz)
1466 char* pzRes;
1467 if (pz == NULL)
1468 return NULL;
1469 pzRes = _(pz);
1470 if (pzRes == pz)
1471 return pzRes;
1472 pzRes = strdup(pzRes);
1473 if (pzRes == NULL) {
1474 fputs(_("No memory for duping translated strings\n"), stderr);
1475 exit(GNUTLS_CLI_EXIT_FAILURE);
1477 return pzRes;
1480 static void coerce_it(void** s) { *s = AO_gettext(*s);
1484 * Translate all the translatable strings in the gnutls_cliOptions
1485 * structure defined above. This is done only once.
1487 static void
1488 translate_option_strings(void)
1490 tOptions * const pOpt = &gnutls_cliOptions;
1493 * Guard against re-translation. It won't work. The strings will have
1494 * been changed by the first pass through this code. One shot only.
1496 if (option_usage_text.field_ct != 0) {
1498 * Do the translations. The first pointer follows the field count
1499 * field. The field count field is the size of a pointer.
1501 tOptDesc * pOD = pOpt->pOptDesc;
1502 char ** ppz = (char**)(void*)&(option_usage_text);
1503 int ix = option_usage_text.field_ct;
1505 do {
1506 ppz++;
1507 *ppz = AO_gettext(*ppz);
1508 } while (--ix > 0);
1510 coerce_it((void*)&(pOpt->pzCopyright));
1511 coerce_it((void*)&(pOpt->pzCopyNotice));
1512 coerce_it((void*)&(pOpt->pzFullVersion));
1513 coerce_it((void*)&(pOpt->pzUsageTitle));
1514 coerce_it((void*)&(pOpt->pzExplain));
1515 coerce_it((void*)&(pOpt->pzDetail));
1516 coerce_it((void*)&(pOpt->pzPackager));
1517 coerce_it((void*)&(pOpt->pzShortUsage));
1518 option_usage_text.field_ct = 0;
1520 for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
1521 coerce_it((void*)&(pOD->pzText));
1524 if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
1525 tOptDesc * pOD = pOpt->pOptDesc;
1526 int ix;
1528 for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
1529 coerce_it((void*)&(pOD->pz_Name));
1530 coerce_it((void*)&(pOD->pz_DisableName));
1531 coerce_it((void*)&(pOD->pz_DisablePfx));
1533 /* prevent re-translation */
1534 gnutls_cliOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
1538 #endif /* ENABLE_NLS */
1540 #ifdef __cplusplus
1542 #endif
1543 /* cli-args.c ends here */