updated documentation.
[gnutls.git] / src / certtool-args.c
blobb4b7f61b2318a8e7f7827454c4002341f93ef306
1 /* -*- buffer-read-only: t -*- vi: set ro:
2 *
3 * DO NOT EDIT THIS FILE (certtool-args.c)
4 *
5 * It has been AutoGen-ed November 28, 2012 at 11:56:25 PM by AutoGen 5.16
6 * From the definitions certtool-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 certtool 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 certtool 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 * certtool 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 * certtool 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 "certtool-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 (certtool_opt_strs+0)
60 #define zLicenseDescrip (certtool_opt_strs+279)
63 #ifndef NULL
64 # define NULL 0
65 #endif
68 * certtool option static const strings
70 static char const certtool_opt_strs[4794] =
71 /* 0 */ "certtool @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 /* 279 */ "certtool 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 "certtool is distributed in the hope that it will be useful, but WITHOUT ANY\n"
82 "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
83 "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n"
84 "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 /* 884 */ "Enable debugging.\0"
88 /* 902 */ "DEBUG\0"
89 /* 908 */ "debug\0"
90 /* 914 */ "More verbose output\0"
91 /* 934 */ "VERBOSE\0"
92 /* 942 */ "verbose\0"
93 /* 950 */ "Input file\0"
94 /* 961 */ "INFILE\0"
95 /* 968 */ "infile\0"
96 /* 975 */ "Output file\0"
97 /* 987 */ "OUTFILE\0"
98 /* 995 */ "outfile\0"
99 /* 1003 */ "Generate a self-signed certificate\0"
100 /* 1038 */ "GENERATE_SELF_SIGNED\0"
101 /* 1059 */ "generate-self-signed\0"
102 /* 1080 */ "Generate a signed certificate\0"
103 /* 1110 */ "GENERATE_CERTIFICATE\0"
104 /* 1131 */ "generate-certificate\0"
105 /* 1152 */ "Generates a proxy certificate\0"
106 /* 1182 */ "GENERATE_PROXY\0"
107 /* 1197 */ "generate-proxy\0"
108 /* 1212 */ "Generate a CRL\0"
109 /* 1227 */ "GENERATE_CRL\0"
110 /* 1240 */ "generate-crl\0"
111 /* 1253 */ "Update a signed certificate\0"
112 /* 1281 */ "UPDATE_CERTIFICATE\0"
113 /* 1300 */ "update-certificate\0"
114 /* 1319 */ "Generate a private key\0"
115 /* 1342 */ "GENERATE_PRIVKEY\0"
116 /* 1359 */ "generate-privkey\0"
117 /* 1376 */ "Generate a PKCS #10 certificate request\0"
118 /* 1416 */ "GENERATE_REQUEST\0"
119 /* 1433 */ "generate-request\0"
120 /* 1450 */ "Verify a PEM encoded certificate chain.\0"
121 /* 1490 */ "VERIFY_CHAIN\0"
122 /* 1503 */ "verify-chain\0"
123 /* 1516 */ "Verify a PEM encoded certificate chain using a trusted list.\0"
124 /* 1577 */ "VERIFY\0"
125 /* 1584 */ "verify\0"
126 /* 1591 */ "Verify a CRL using a trusted list.\0"
127 /* 1626 */ "VERIFY_CRL\0"
128 /* 1637 */ "verify-crl\0"
129 /* 1648 */ "Generate PKCS #3 encoded Diffie-Hellman parameters.\0"
130 /* 1700 */ "GENERATE_DH_PARAMS\0"
131 /* 1719 */ "generate-dh-params\0"
132 /* 1738 */ "Get the included PKCS #3 encoded Diffie-Hellman parameters.\0"
133 /* 1798 */ "GET_DH_PARAMS\0"
134 /* 1812 */ "get-dh-params\0"
135 /* 1826 */ "Print information PKCS #3 encoded Diffie-Hellman parameters\0"
136 /* 1886 */ "DH_INFO\0"
137 /* 1894 */ "dh-info\0"
138 /* 1902 */ "Loads a private key file\0"
139 /* 1927 */ "LOAD_PRIVKEY\0"
140 /* 1940 */ "load-privkey\0"
141 /* 1953 */ "Loads a public key file\0"
142 /* 1977 */ "LOAD_PUBKEY\0"
143 /* 1989 */ "load-pubkey\0"
144 /* 2001 */ "Loads a certificate request file\0"
145 /* 2034 */ "LOAD_REQUEST\0"
146 /* 2047 */ "load-request\0"
147 /* 2060 */ "Loads a certificate file\0"
148 /* 2085 */ "LOAD_CERTIFICATE\0"
149 /* 2102 */ "load-certificate\0"
150 /* 2119 */ "Loads the certificate authority's private key file\0"
151 /* 2170 */ "LOAD_CA_PRIVKEY\0"
152 /* 2186 */ "load-ca-privkey\0"
153 /* 2202 */ "Loads the certificate authority's certificate file\0"
154 /* 2253 */ "LOAD_CA_CERTIFICATE\0"
155 /* 2273 */ "load-ca-certificate\0"
156 /* 2293 */ "Password to use\0"
157 /* 2309 */ "PASSWORD\0"
158 /* 2318 */ "password\0"
159 /* 2327 */ "Print big number in an easier format to parse\0"
160 /* 2373 */ "HEX_NUMBERS\0"
161 /* 2385 */ "hex-numbers\0"
162 /* 2397 */ "Enforce a NULL password\0"
163 /* 2421 */ "NULL_PASSWORD\0"
164 /* 2435 */ "null-password\0"
165 /* 2449 */ "Print information on the given certificate\0"
166 /* 2492 */ "CERTIFICATE_INFO\0"
167 /* 2509 */ "certificate-info\0"
168 /* 2526 */ "Print certificate's public key\0"
169 /* 2557 */ "CERTIFICATE_PUBKEY\0"
170 /* 2576 */ "certificate-pubkey\0"
171 /* 2595 */ "Print information on the given OpenPGP certificate\0"
172 /* 2646 */ "PGP_CERTIFICATE_INFO\0"
173 /* 2667 */ "pgp-certificate-info\0"
174 /* 2688 */ "Print information on the given OpenPGP keyring structure\0"
175 /* 2745 */ "PGP_RING_INFO\0"
176 /* 2759 */ "pgp-ring-info\0"
177 /* 2773 */ "Print information on the given CRL structure\0"
178 /* 2818 */ "CRL_INFO\0"
179 /* 2827 */ "crl-info\0"
180 /* 2836 */ "Print information on the given certificate request\0"
181 /* 2887 */ "CRQ_INFO\0"
182 /* 2896 */ "crq-info\0"
183 /* 2905 */ "Do not use extensions in certificate requests\0"
184 /* 2951 */ "NO_CRQ_EXTENSIONS\0"
185 /* 2969 */ "no-crq-extensions\0"
186 /* 2987 */ "Print information on a PKCS #12 structure\0"
187 /* 3029 */ "P12_INFO\0"
188 /* 3038 */ "p12-info\0"
189 /* 3047 */ "Print information on a PKCS #7 structure\0"
190 /* 3088 */ "P7_INFO\0"
191 /* 3096 */ "p7-info\0"
192 /* 3104 */ "Convert S/MIME to PKCS #7 structure\0"
193 /* 3140 */ "SMIME_TO_P7\0"
194 /* 3152 */ "smime-to-p7\0"
195 /* 3164 */ "Print information on a private key\0"
196 /* 3199 */ "KEY_INFO\0"
197 /* 3208 */ "key-info\0"
198 /* 3217 */ "Print information on an OpenPGP private key\0"
199 /* 3261 */ "PGP_KEY_INFO\0"
200 /* 3274 */ "pgp-key-info\0"
201 /* 3287 */ "Print information on a public key\0"
202 /* 3321 */ "PUBKEY_INFO\0"
203 /* 3333 */ "pubkey-info\0"
204 /* 3345 */ "Generate an X.509 version 1 certificate (with no extensions)\0"
205 /* 3406 */ "V1\0"
206 /* 3409 */ "v1\0"
207 /* 3412 */ "Generate a PKCS #12 structure\0"
208 /* 3442 */ "TO_P12\0"
209 /* 3449 */ "to-p12\0"
210 /* 3456 */ "Generate a PKCS #8 structure\0"
211 /* 3485 */ "TO_P8\0"
212 /* 3491 */ "to-p8\0"
213 /* 3497 */ "Use PKCS #8 format for private keys\0"
214 /* 3533 */ "PKCS8\0"
215 /* 3539 */ "pkcs8\0"
216 /* 3545 */ "Generate RSA key\0"
217 /* 3562 */ "RSA\0"
218 /* 3566 */ "rsa\0"
219 /* 3570 */ "Generate DSA key\0"
220 /* 3587 */ "DSA\0"
221 /* 3591 */ "dsa\0"
222 /* 3595 */ "Generate ECC (ECDSA) key\0"
223 /* 3620 */ "ECC\0"
224 /* 3624 */ "ecc\0"
225 /* 3628 */ "This is an alias for 'ecc'\0"
226 /* 3655 */ "ecdsa\0"
227 /* 3661 */ "Hash algorithm to use for signing.\0"
228 /* 3696 */ "HASH\0"
229 /* 3701 */ "hash\0"
230 /* 3706 */ "Use DER format for input certificates and private keys.\0"
231 /* 3762 */ "INDER\0"
232 /* 3768 */ "no-inder\0"
233 /* 3777 */ "no\0"
234 /* 3780 */ "This is an alias for 'inder'\0"
235 /* 3809 */ "inraw\0"
236 /* 3815 */ "Use DER format for output certificates and private keys\0"
237 /* 3871 */ "OUTDER\0"
238 /* 3878 */ "no-outder\0"
239 /* 3888 */ "This is an alias for 'outder'\0"
240 /* 3918 */ "outraw\0"
241 /* 3925 */ "Specify the number of bits for key generate\0"
242 /* 3969 */ "BITS\0"
243 /* 3974 */ "bits\0"
244 /* 3979 */ "Specify the security level [low, legacy, normal, high, ultra].\0"
245 /* 4042 */ "SEC_PARAM\0"
246 /* 4052 */ "sec-param\0"
247 /* 4062 */ "No effect\0"
248 /* 4072 */ "DISABLE_QUICK_RANDOM\0"
249 /* 4093 */ "disable-quick-random\0"
250 /* 4114 */ "Template file to use for non-interactive operation\0"
251 /* 4165 */ "TEMPLATE\0"
252 /* 4174 */ "template\0"
253 /* 4183 */ "Cipher to use for PKCS #8 and #12 operations\0"
254 /* 4228 */ "PKCS_CIPHER\0"
255 /* 4240 */ "pkcs-cipher\0"
256 /* 4252 */ "Display extended usage information and exit\0"
257 /* 4296 */ "help\0"
258 /* 4301 */ "Extended usage information passed thru pager\0"
259 /* 4346 */ "more-help\0"
260 /* 4356 */ "Output version information and exit\0"
261 /* 4392 */ "version\0"
262 /* 4400 */ "CERTTOOL\0"
263 /* 4409 */ "certtool - GnuTLS certificate tool - Ver. @VERSION@\n"
264 "USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
265 /* 4519 */ "bug-gnutls@gnu.org\0"
266 /* 4538 */ "\n\n\0"
267 /* 4541 */ "\n"
268 "Tool to parse and generate X.509 certificates, requests and private keys.\n"
269 "It can be used interactively or non interactively by specifying the\n"
270 "template command line option.\n\0"
271 /* 4715 */ "certtool @VERSION@\0"
272 /* 4734 */ "certtool [options]\n"
273 "certtool --help for usage instructions.\n";
276 * debug option description:
278 #define DEBUG_DESC (certtool_opt_strs+884)
279 #define DEBUG_NAME (certtool_opt_strs+902)
280 #define DEBUG_name (certtool_opt_strs+908)
281 #define DEBUG_FLAGS (OPTST_DISABLED \
282 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
285 * verbose option description:
287 #define VERBOSE_DESC (certtool_opt_strs+914)
288 #define VERBOSE_NAME (certtool_opt_strs+934)
289 #define VERBOSE_name (certtool_opt_strs+942)
290 #define VERBOSE_FLAGS (OPTST_DISABLED)
293 * infile option description:
295 #define INFILE_DESC (certtool_opt_strs+950)
296 #define INFILE_NAME (certtool_opt_strs+961)
297 #define INFILE_name (certtool_opt_strs+968)
298 #define INFILE_FLAGS (OPTST_DISABLED \
299 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
302 * outfile option description:
304 #define OUTFILE_DESC (certtool_opt_strs+975)
305 #define OUTFILE_NAME (certtool_opt_strs+987)
306 #define OUTFILE_name (certtool_opt_strs+995)
307 #define OUTFILE_FLAGS (OPTST_DISABLED \
308 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
311 * generate-self-signed option description:
313 #define GENERATE_SELF_SIGNED_DESC (certtool_opt_strs+1003)
314 #define GENERATE_SELF_SIGNED_NAME (certtool_opt_strs+1038)
315 #define GENERATE_SELF_SIGNED_name (certtool_opt_strs+1059)
316 #define GENERATE_SELF_SIGNED_FLAGS (OPTST_DISABLED)
319 * generate-certificate option description:
321 #define GENERATE_CERTIFICATE_DESC (certtool_opt_strs+1080)
322 #define GENERATE_CERTIFICATE_NAME (certtool_opt_strs+1110)
323 #define GENERATE_CERTIFICATE_name (certtool_opt_strs+1131)
324 #define GENERATE_CERTIFICATE_FLAGS (OPTST_DISABLED)
327 * generate-proxy option description:
329 #define GENERATE_PROXY_DESC (certtool_opt_strs+1152)
330 #define GENERATE_PROXY_NAME (certtool_opt_strs+1182)
331 #define GENERATE_PROXY_name (certtool_opt_strs+1197)
332 #define GENERATE_PROXY_FLAGS (OPTST_DISABLED)
335 * generate-crl option description:
337 #define GENERATE_CRL_DESC (certtool_opt_strs+1212)
338 #define GENERATE_CRL_NAME (certtool_opt_strs+1227)
339 #define GENERATE_CRL_name (certtool_opt_strs+1240)
340 #define GENERATE_CRL_FLAGS (OPTST_DISABLED)
343 * update-certificate option description:
345 #define UPDATE_CERTIFICATE_DESC (certtool_opt_strs+1253)
346 #define UPDATE_CERTIFICATE_NAME (certtool_opt_strs+1281)
347 #define UPDATE_CERTIFICATE_name (certtool_opt_strs+1300)
348 #define UPDATE_CERTIFICATE_FLAGS (OPTST_DISABLED)
351 * generate-privkey option description:
353 #define GENERATE_PRIVKEY_DESC (certtool_opt_strs+1319)
354 #define GENERATE_PRIVKEY_NAME (certtool_opt_strs+1342)
355 #define GENERATE_PRIVKEY_name (certtool_opt_strs+1359)
356 #define GENERATE_PRIVKEY_FLAGS (OPTST_DISABLED)
359 * generate-request option description:
361 #define GENERATE_REQUEST_DESC (certtool_opt_strs+1376)
362 #define GENERATE_REQUEST_NAME (certtool_opt_strs+1416)
363 #define GENERATE_REQUEST_name (certtool_opt_strs+1433)
364 #define GENERATE_REQUEST_FLAGS (OPTST_DISABLED)
367 * verify-chain option description:
369 #define VERIFY_CHAIN_DESC (certtool_opt_strs+1450)
370 #define VERIFY_CHAIN_NAME (certtool_opt_strs+1490)
371 #define VERIFY_CHAIN_name (certtool_opt_strs+1503)
372 #define VERIFY_CHAIN_FLAGS (OPTST_DISABLED)
375 * verify option description with
376 * "Must also have options" and "Incompatible options":
378 #define VERIFY_DESC (certtool_opt_strs+1516)
379 #define VERIFY_NAME (certtool_opt_strs+1577)
380 #define VERIFY_name (certtool_opt_strs+1584)
381 static int const aVerifyMustList[] = {
382 INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
383 #define VERIFY_FLAGS (OPTST_DISABLED)
386 * verify-crl option description with
387 * "Must also have options" and "Incompatible options":
389 #define VERIFY_CRL_DESC (certtool_opt_strs+1591)
390 #define VERIFY_CRL_NAME (certtool_opt_strs+1626)
391 #define VERIFY_CRL_name (certtool_opt_strs+1637)
392 static int const aVerify_CrlMustList[] = {
393 INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
394 #define VERIFY_CRL_FLAGS (OPTST_DISABLED)
397 * generate-dh-params option description:
399 #define GENERATE_DH_PARAMS_DESC (certtool_opt_strs+1648)
400 #define GENERATE_DH_PARAMS_NAME (certtool_opt_strs+1700)
401 #define GENERATE_DH_PARAMS_name (certtool_opt_strs+1719)
402 #define GENERATE_DH_PARAMS_FLAGS (OPTST_DISABLED)
405 * get-dh-params option description:
407 #define GET_DH_PARAMS_DESC (certtool_opt_strs+1738)
408 #define GET_DH_PARAMS_NAME (certtool_opt_strs+1798)
409 #define GET_DH_PARAMS_name (certtool_opt_strs+1812)
410 #define GET_DH_PARAMS_FLAGS (OPTST_DISABLED)
413 * dh-info option description:
415 #define DH_INFO_DESC (certtool_opt_strs+1826)
416 #define DH_INFO_NAME (certtool_opt_strs+1886)
417 #define DH_INFO_name (certtool_opt_strs+1894)
418 #define DH_INFO_FLAGS (OPTST_DISABLED)
421 * load-privkey option description:
423 #define LOAD_PRIVKEY_DESC (certtool_opt_strs+1902)
424 #define LOAD_PRIVKEY_NAME (certtool_opt_strs+1927)
425 #define LOAD_PRIVKEY_name (certtool_opt_strs+1940)
426 #define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \
427 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
430 * load-pubkey option description:
432 #define LOAD_PUBKEY_DESC (certtool_opt_strs+1953)
433 #define LOAD_PUBKEY_NAME (certtool_opt_strs+1977)
434 #define LOAD_PUBKEY_name (certtool_opt_strs+1989)
435 #define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \
436 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
439 * load-request option description:
441 #define LOAD_REQUEST_DESC (certtool_opt_strs+2001)
442 #define LOAD_REQUEST_NAME (certtool_opt_strs+2034)
443 #define LOAD_REQUEST_name (certtool_opt_strs+2047)
444 #define LOAD_REQUEST_FLAGS (OPTST_DISABLED \
445 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
448 * load-certificate option description:
450 #define LOAD_CERTIFICATE_DESC (certtool_opt_strs+2060)
451 #define LOAD_CERTIFICATE_NAME (certtool_opt_strs+2085)
452 #define LOAD_CERTIFICATE_name (certtool_opt_strs+2102)
453 #define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \
454 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
457 * load-ca-privkey option description:
459 #define LOAD_CA_PRIVKEY_DESC (certtool_opt_strs+2119)
460 #define LOAD_CA_PRIVKEY_NAME (certtool_opt_strs+2170)
461 #define LOAD_CA_PRIVKEY_name (certtool_opt_strs+2186)
462 #define LOAD_CA_PRIVKEY_FLAGS (OPTST_DISABLED \
463 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
466 * load-ca-certificate option description:
468 #define LOAD_CA_CERTIFICATE_DESC (certtool_opt_strs+2202)
469 #define LOAD_CA_CERTIFICATE_NAME (certtool_opt_strs+2253)
470 #define LOAD_CA_CERTIFICATE_name (certtool_opt_strs+2273)
471 #define LOAD_CA_CERTIFICATE_FLAGS (OPTST_DISABLED \
472 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
475 * password option description:
477 #define PASSWORD_DESC (certtool_opt_strs+2293)
478 #define PASSWORD_NAME (certtool_opt_strs+2309)
479 #define PASSWORD_name (certtool_opt_strs+2318)
480 #define PASSWORD_FLAGS (OPTST_DISABLED \
481 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
484 * hex-numbers option description:
486 #define HEX_NUMBERS_DESC (certtool_opt_strs+2327)
487 #define HEX_NUMBERS_NAME (certtool_opt_strs+2373)
488 #define HEX_NUMBERS_name (certtool_opt_strs+2385)
489 #define HEX_NUMBERS_FLAGS (OPTST_DISABLED)
492 * null-password option description:
494 #define NULL_PASSWORD_DESC (certtool_opt_strs+2397)
495 #define NULL_PASSWORD_NAME (certtool_opt_strs+2421)
496 #define NULL_PASSWORD_name (certtool_opt_strs+2435)
497 #define NULL_PASSWORD_FLAGS (OPTST_DISABLED)
500 * certificate-info option description:
502 #define CERTIFICATE_INFO_DESC (certtool_opt_strs+2449)
503 #define CERTIFICATE_INFO_NAME (certtool_opt_strs+2492)
504 #define CERTIFICATE_INFO_name (certtool_opt_strs+2509)
505 #define CERTIFICATE_INFO_FLAGS (OPTST_DISABLED)
508 * certificate-pubkey option description:
510 #define CERTIFICATE_PUBKEY_DESC (certtool_opt_strs+2526)
511 #define CERTIFICATE_PUBKEY_NAME (certtool_opt_strs+2557)
512 #define CERTIFICATE_PUBKEY_name (certtool_opt_strs+2576)
513 #define CERTIFICATE_PUBKEY_FLAGS (OPTST_DISABLED)
516 * pgp-certificate-info option description:
518 #define PGP_CERTIFICATE_INFO_DESC (certtool_opt_strs+2595)
519 #define PGP_CERTIFICATE_INFO_NAME (certtool_opt_strs+2646)
520 #define PGP_CERTIFICATE_INFO_name (certtool_opt_strs+2667)
521 #define PGP_CERTIFICATE_INFO_FLAGS (OPTST_DISABLED)
524 * pgp-ring-info option description:
526 #define PGP_RING_INFO_DESC (certtool_opt_strs+2688)
527 #define PGP_RING_INFO_NAME (certtool_opt_strs+2745)
528 #define PGP_RING_INFO_name (certtool_opt_strs+2759)
529 #define PGP_RING_INFO_FLAGS (OPTST_DISABLED)
532 * crl-info option description:
534 #define CRL_INFO_DESC (certtool_opt_strs+2773)
535 #define CRL_INFO_NAME (certtool_opt_strs+2818)
536 #define CRL_INFO_name (certtool_opt_strs+2827)
537 #define CRL_INFO_FLAGS (OPTST_DISABLED)
540 * crq-info option description:
542 #define CRQ_INFO_DESC (certtool_opt_strs+2836)
543 #define CRQ_INFO_NAME (certtool_opt_strs+2887)
544 #define CRQ_INFO_name (certtool_opt_strs+2896)
545 #define CRQ_INFO_FLAGS (OPTST_DISABLED)
548 * no-crq-extensions option description:
550 #define NO_CRQ_EXTENSIONS_DESC (certtool_opt_strs+2905)
551 #define NO_CRQ_EXTENSIONS_NAME (certtool_opt_strs+2951)
552 #define NO_CRQ_EXTENSIONS_name (certtool_opt_strs+2969)
553 #define NO_CRQ_EXTENSIONS_FLAGS (OPTST_DISABLED)
556 * p12-info option description:
558 #define P12_INFO_DESC (certtool_opt_strs+2987)
559 #define P12_INFO_NAME (certtool_opt_strs+3029)
560 #define P12_INFO_name (certtool_opt_strs+3038)
561 #define P12_INFO_FLAGS (OPTST_DISABLED)
564 * p7-info option description:
566 #define P7_INFO_DESC (certtool_opt_strs+3047)
567 #define P7_INFO_NAME (certtool_opt_strs+3088)
568 #define P7_INFO_name (certtool_opt_strs+3096)
569 #define P7_INFO_FLAGS (OPTST_DISABLED)
572 * smime-to-p7 option description:
574 #define SMIME_TO_P7_DESC (certtool_opt_strs+3104)
575 #define SMIME_TO_P7_NAME (certtool_opt_strs+3140)
576 #define SMIME_TO_P7_name (certtool_opt_strs+3152)
577 #define SMIME_TO_P7_FLAGS (OPTST_DISABLED)
580 * key-info option description:
582 #define KEY_INFO_DESC (certtool_opt_strs+3164)
583 #define KEY_INFO_NAME (certtool_opt_strs+3199)
584 #define KEY_INFO_name (certtool_opt_strs+3208)
585 #define KEY_INFO_FLAGS (OPTST_DISABLED)
588 * pgp-key-info option description:
590 #define PGP_KEY_INFO_DESC (certtool_opt_strs+3217)
591 #define PGP_KEY_INFO_NAME (certtool_opt_strs+3261)
592 #define PGP_KEY_INFO_name (certtool_opt_strs+3274)
593 #define PGP_KEY_INFO_FLAGS (OPTST_DISABLED)
596 * pubkey-info option description:
598 #define PUBKEY_INFO_DESC (certtool_opt_strs+3287)
599 #define PUBKEY_INFO_NAME (certtool_opt_strs+3321)
600 #define PUBKEY_INFO_name (certtool_opt_strs+3333)
601 #define PUBKEY_INFO_FLAGS (OPTST_DISABLED)
604 * v1 option description:
606 #define V1_DESC (certtool_opt_strs+3345)
607 #define V1_NAME (certtool_opt_strs+3406)
608 #define V1_name (certtool_opt_strs+3409)
609 #define V1_FLAGS (OPTST_DISABLED)
612 * to-p12 option description with
613 * "Must also have options" and "Incompatible options":
615 #define TO_P12_DESC (certtool_opt_strs+3412)
616 #define TO_P12_NAME (certtool_opt_strs+3442)
617 #define TO_P12_name (certtool_opt_strs+3449)
618 static int const aTo_P12MustList[] = {
619 INDEX_OPT_LOAD_CERTIFICATE, NO_EQUIVALENT };
620 #define TO_P12_FLAGS (OPTST_DISABLED)
623 * to-p8 option description:
625 #define TO_P8_DESC (certtool_opt_strs+3456)
626 #define TO_P8_NAME (certtool_opt_strs+3485)
627 #define TO_P8_name (certtool_opt_strs+3491)
628 #define TO_P8_FLAGS (OPTST_DISABLED)
631 * pkcs8 option description:
633 #define PKCS8_DESC (certtool_opt_strs+3497)
634 #define PKCS8_NAME (certtool_opt_strs+3533)
635 #define PKCS8_name (certtool_opt_strs+3539)
636 #define PKCS8_FLAGS (OPTST_DISABLED)
639 * rsa option description:
641 #define RSA_DESC (certtool_opt_strs+3545)
642 #define RSA_NAME (certtool_opt_strs+3562)
643 #define RSA_name (certtool_opt_strs+3566)
644 #define RSA_FLAGS (OPTST_DISABLED)
647 * dsa option description:
649 #define DSA_DESC (certtool_opt_strs+3570)
650 #define DSA_NAME (certtool_opt_strs+3587)
651 #define DSA_name (certtool_opt_strs+3591)
652 #define DSA_FLAGS (OPTST_DISABLED)
655 * ecc option description:
657 #define ECC_DESC (certtool_opt_strs+3595)
658 #define ECC_NAME (certtool_opt_strs+3620)
659 #define ECC_name (certtool_opt_strs+3624)
660 #define ECC_FLAGS (OPTST_DISABLED)
663 * ecdsa option description:
665 #define ECDSA_DESC (certtool_opt_strs+3628)
666 #define ECDSA_NAME NULL
667 #define ECDSA_name (certtool_opt_strs+3655)
668 #define ECDSA_FLAGS (ECC_FLAGS | OPTST_ALIAS)
671 * hash option description:
673 #define HASH_DESC (certtool_opt_strs+3661)
674 #define HASH_NAME (certtool_opt_strs+3696)
675 #define HASH_name (certtool_opt_strs+3701)
676 #define HASH_FLAGS (OPTST_DISABLED \
677 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
680 * inder option description:
682 #define INDER_DESC (certtool_opt_strs+3706)
683 #define INDER_NAME (certtool_opt_strs+3762)
684 #define NOT_INDER_name (certtool_opt_strs+3768)
685 #define NOT_INDER_PFX (certtool_opt_strs+3777)
686 #define INDER_name (NOT_INDER_name + 3)
687 #define INDER_FLAGS (OPTST_DISABLED)
690 * inraw option description:
692 #define INRAW_DESC (certtool_opt_strs+3780)
693 #define INRAW_NAME NULL
694 #define INRAW_name (certtool_opt_strs+3809)
695 #define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS)
698 * outder option description:
700 #define OUTDER_DESC (certtool_opt_strs+3815)
701 #define OUTDER_NAME (certtool_opt_strs+3871)
702 #define NOT_OUTDER_name (certtool_opt_strs+3878)
703 #define NOT_OUTDER_PFX (certtool_opt_strs+3777)
704 #define OUTDER_name (NOT_OUTDER_name + 3)
705 #define OUTDER_FLAGS (OPTST_DISABLED)
708 * outraw option description:
710 #define OUTRAW_DESC (certtool_opt_strs+3888)
711 #define OUTRAW_NAME NULL
712 #define OUTRAW_name (certtool_opt_strs+3918)
713 #define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS)
716 * bits option description:
718 #define BITS_DESC (certtool_opt_strs+3925)
719 #define BITS_NAME (certtool_opt_strs+3969)
720 #define BITS_name (certtool_opt_strs+3974)
721 #define BITS_FLAGS (OPTST_DISABLED \
722 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
725 * sec-param option description:
727 #define SEC_PARAM_DESC (certtool_opt_strs+3979)
728 #define SEC_PARAM_NAME (certtool_opt_strs+4042)
729 #define SEC_PARAM_name (certtool_opt_strs+4052)
730 #define SEC_PARAM_FLAGS (OPTST_DISABLED \
731 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
734 * disable-quick-random option description:
736 #define DISABLE_QUICK_RANDOM_DESC (certtool_opt_strs+4062)
737 #define DISABLE_QUICK_RANDOM_NAME (certtool_opt_strs+4072)
738 #define DISABLE_QUICK_RANDOM_name (certtool_opt_strs+4093)
739 #define DISABLE_QUICK_RANDOM_FLAGS (OPTST_DISABLED)
742 * template option description:
744 #define TEMPLATE_DESC (certtool_opt_strs+4114)
745 #define TEMPLATE_NAME (certtool_opt_strs+4165)
746 #define TEMPLATE_name (certtool_opt_strs+4174)
747 #define TEMPLATE_FLAGS (OPTST_DISABLED \
748 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
751 * pkcs-cipher option description:
753 #define PKCS_CIPHER_DESC (certtool_opt_strs+4183)
754 #define PKCS_CIPHER_NAME (certtool_opt_strs+4228)
755 #define PKCS_CIPHER_name (certtool_opt_strs+4240)
756 #define PKCS_CIPHER_FLAGS (OPTST_DISABLED \
757 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
760 * Help/More_Help/Version option descriptions:
762 #define HELP_DESC (certtool_opt_strs+4252)
763 #define HELP_name (certtool_opt_strs+4296)
764 #ifdef HAVE_WORKING_FORK
765 #define MORE_HELP_DESC (certtool_opt_strs+4301)
766 #define MORE_HELP_name (certtool_opt_strs+4346)
767 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
768 #else
769 #define MORE_HELP_DESC NULL
770 #define MORE_HELP_name NULL
771 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
772 #endif
773 #ifdef NO_OPTIONAL_OPT_ARGS
774 # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
775 #else
776 # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
777 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
778 #endif
779 #define VER_DESC (certtool_opt_strs+4356)
780 #define VER_name (certtool_opt_strs+4392)
782 * Declare option callback procedures
784 extern tOptProc
785 optionBooleanVal, optionNestedVal, optionNumericVal,
786 optionPagedUsage, optionPrintVersion, optionResetOpt,
787 optionStackArg, optionTimeDate, optionTimeVal,
788 optionUnstackArg, optionVendorOption;
789 static tOptProc
790 doOptDebug, doOptEcdsa, doOptInfile,
791 doOptInraw, doOptLoad_Request, doOptOutraw,
792 doOptTemplate, doUsageOpt;
793 #define VER_PROC optionPrintVersion
795 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
797 * Define the certtool Option Descriptions.
798 * This is an array of OPTION_CT entries, one for each
799 * option that the certtool program responds to.
801 static tOptDesc optDesc[OPTION_CT] = {
802 { /* entry idx, value */ 0, VALUE_OPT_DEBUG,
803 /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
804 /* equivalenced to */ NO_EQUIVALENT,
805 /* min, max, act ct */ 0, 1, 0,
806 /* opt state flags */ DEBUG_FLAGS, 0,
807 /* last opt argumnt */ { NULL }, /* --debug */
808 /* arg list/cookie */ NULL,
809 /* must/cannot opts */ NULL, NULL,
810 /* option proc */ doOptDebug,
811 /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
812 /* disablement strs */ NULL, NULL },
814 { /* entry idx, value */ 1, VALUE_OPT_VERBOSE,
815 /* equiv idx, value */ 1, VALUE_OPT_VERBOSE,
816 /* equivalenced to */ NO_EQUIVALENT,
817 /* min, max, act ct */ 0, NOLIMIT, 0,
818 /* opt state flags */ VERBOSE_FLAGS, 0,
819 /* last opt argumnt */ { NULL }, /* --verbose */
820 /* arg list/cookie */ NULL,
821 /* must/cannot opts */ NULL, NULL,
822 /* option proc */ NULL,
823 /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
824 /* disablement strs */ NULL, NULL },
826 { /* entry idx, value */ 2, VALUE_OPT_INFILE,
827 /* equiv idx, value */ 2, VALUE_OPT_INFILE,
828 /* equivalenced to */ NO_EQUIVALENT,
829 /* min, max, act ct */ 0, 1, 0,
830 /* opt state flags */ INFILE_FLAGS, 0,
831 /* last opt argumnt */ { NULL }, /* --infile */
832 /* arg list/cookie */ NULL,
833 /* must/cannot opts */ NULL, NULL,
834 /* option proc */ doOptInfile,
835 /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
836 /* disablement strs */ NULL, NULL },
838 { /* entry idx, value */ 3, VALUE_OPT_OUTFILE,
839 /* equiv idx, value */ 3, VALUE_OPT_OUTFILE,
840 /* equivalenced to */ NO_EQUIVALENT,
841 /* min, max, act ct */ 0, 1, 0,
842 /* opt state flags */ OUTFILE_FLAGS, 0,
843 /* last opt argumnt */ { NULL }, /* --outfile */
844 /* arg list/cookie */ NULL,
845 /* must/cannot opts */ NULL, NULL,
846 /* option proc */ NULL,
847 /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
848 /* disablement strs */ NULL, NULL },
850 { /* entry idx, value */ 4, VALUE_OPT_GENERATE_SELF_SIGNED,
851 /* equiv idx, value */ 4, VALUE_OPT_GENERATE_SELF_SIGNED,
852 /* equivalenced to */ NO_EQUIVALENT,
853 /* min, max, act ct */ 0, 1, 0,
854 /* opt state flags */ GENERATE_SELF_SIGNED_FLAGS, 0,
855 /* last opt argumnt */ { NULL }, /* --generate-self-signed */
856 /* arg list/cookie */ NULL,
857 /* must/cannot opts */ NULL, NULL,
858 /* option proc */ NULL,
859 /* desc, NAME, name */ GENERATE_SELF_SIGNED_DESC, GENERATE_SELF_SIGNED_NAME, GENERATE_SELF_SIGNED_name,
860 /* disablement strs */ NULL, NULL },
862 { /* entry idx, value */ 5, VALUE_OPT_GENERATE_CERTIFICATE,
863 /* equiv idx, value */ 5, VALUE_OPT_GENERATE_CERTIFICATE,
864 /* equivalenced to */ NO_EQUIVALENT,
865 /* min, max, act ct */ 0, 1, 0,
866 /* opt state flags */ GENERATE_CERTIFICATE_FLAGS, 0,
867 /* last opt argumnt */ { NULL }, /* --generate-certificate */
868 /* arg list/cookie */ NULL,
869 /* must/cannot opts */ NULL, NULL,
870 /* option proc */ NULL,
871 /* desc, NAME, name */ GENERATE_CERTIFICATE_DESC, GENERATE_CERTIFICATE_NAME, GENERATE_CERTIFICATE_name,
872 /* disablement strs */ NULL, NULL },
874 { /* entry idx, value */ 6, VALUE_OPT_GENERATE_PROXY,
875 /* equiv idx, value */ 6, VALUE_OPT_GENERATE_PROXY,
876 /* equivalenced to */ NO_EQUIVALENT,
877 /* min, max, act ct */ 0, 1, 0,
878 /* opt state flags */ GENERATE_PROXY_FLAGS, 0,
879 /* last opt argumnt */ { NULL }, /* --generate-proxy */
880 /* arg list/cookie */ NULL,
881 /* must/cannot opts */ NULL, NULL,
882 /* option proc */ NULL,
883 /* desc, NAME, name */ GENERATE_PROXY_DESC, GENERATE_PROXY_NAME, GENERATE_PROXY_name,
884 /* disablement strs */ NULL, NULL },
886 { /* entry idx, value */ 7, VALUE_OPT_GENERATE_CRL,
887 /* equiv idx, value */ 7, VALUE_OPT_GENERATE_CRL,
888 /* equivalenced to */ NO_EQUIVALENT,
889 /* min, max, act ct */ 0, 1, 0,
890 /* opt state flags */ GENERATE_CRL_FLAGS, 0,
891 /* last opt argumnt */ { NULL }, /* --generate-crl */
892 /* arg list/cookie */ NULL,
893 /* must/cannot opts */ NULL, NULL,
894 /* option proc */ NULL,
895 /* desc, NAME, name */ GENERATE_CRL_DESC, GENERATE_CRL_NAME, GENERATE_CRL_name,
896 /* disablement strs */ NULL, NULL },
898 { /* entry idx, value */ 8, VALUE_OPT_UPDATE_CERTIFICATE,
899 /* equiv idx, value */ 8, VALUE_OPT_UPDATE_CERTIFICATE,
900 /* equivalenced to */ NO_EQUIVALENT,
901 /* min, max, act ct */ 0, 1, 0,
902 /* opt state flags */ UPDATE_CERTIFICATE_FLAGS, 0,
903 /* last opt argumnt */ { NULL }, /* --update-certificate */
904 /* arg list/cookie */ NULL,
905 /* must/cannot opts */ NULL, NULL,
906 /* option proc */ NULL,
907 /* desc, NAME, name */ UPDATE_CERTIFICATE_DESC, UPDATE_CERTIFICATE_NAME, UPDATE_CERTIFICATE_name,
908 /* disablement strs */ NULL, NULL },
910 { /* entry idx, value */ 9, VALUE_OPT_GENERATE_PRIVKEY,
911 /* equiv idx, value */ 9, VALUE_OPT_GENERATE_PRIVKEY,
912 /* equivalenced to */ NO_EQUIVALENT,
913 /* min, max, act ct */ 0, 1, 0,
914 /* opt state flags */ GENERATE_PRIVKEY_FLAGS, 0,
915 /* last opt argumnt */ { NULL }, /* --generate-privkey */
916 /* arg list/cookie */ NULL,
917 /* must/cannot opts */ NULL, NULL,
918 /* option proc */ NULL,
919 /* desc, NAME, name */ GENERATE_PRIVKEY_DESC, GENERATE_PRIVKEY_NAME, GENERATE_PRIVKEY_name,
920 /* disablement strs */ NULL, NULL },
922 { /* entry idx, value */ 10, VALUE_OPT_GENERATE_REQUEST,
923 /* equiv idx, value */ 10, VALUE_OPT_GENERATE_REQUEST,
924 /* equivalenced to */ NO_EQUIVALENT,
925 /* min, max, act ct */ 0, 1, 0,
926 /* opt state flags */ GENERATE_REQUEST_FLAGS, 0,
927 /* last opt argumnt */ { NULL }, /* --generate-request */
928 /* arg list/cookie */ NULL,
929 /* must/cannot opts */ NULL, NULL,
930 /* option proc */ NULL,
931 /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, GENERATE_REQUEST_name,
932 /* disablement strs */ NULL, NULL },
934 { /* entry idx, value */ 11, VALUE_OPT_VERIFY_CHAIN,
935 /* equiv idx, value */ 11, VALUE_OPT_VERIFY_CHAIN,
936 /* equivalenced to */ NO_EQUIVALENT,
937 /* min, max, act ct */ 0, 1, 0,
938 /* opt state flags */ VERIFY_CHAIN_FLAGS, 0,
939 /* last opt argumnt */ { NULL }, /* --verify-chain */
940 /* arg list/cookie */ NULL,
941 /* must/cannot opts */ NULL, NULL,
942 /* option proc */ NULL,
943 /* desc, NAME, name */ VERIFY_CHAIN_DESC, VERIFY_CHAIN_NAME, VERIFY_CHAIN_name,
944 /* disablement strs */ NULL, NULL },
946 { /* entry idx, value */ 12, VALUE_OPT_VERIFY,
947 /* equiv idx, value */ 12, VALUE_OPT_VERIFY,
948 /* equivalenced to */ NO_EQUIVALENT,
949 /* min, max, act ct */ 0, 1, 0,
950 /* opt state flags */ VERIFY_FLAGS, 0,
951 /* last opt argumnt */ { NULL }, /* --verify */
952 /* arg list/cookie */ NULL,
953 /* must/cannot opts */ aVerifyMustList, NULL,
954 /* option proc */ NULL,
955 /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name,
956 /* disablement strs */ NULL, NULL },
958 { /* entry idx, value */ 13, VALUE_OPT_VERIFY_CRL,
959 /* equiv idx, value */ 13, VALUE_OPT_VERIFY_CRL,
960 /* equivalenced to */ NO_EQUIVALENT,
961 /* min, max, act ct */ 0, 1, 0,
962 /* opt state flags */ VERIFY_CRL_FLAGS, 0,
963 /* last opt argumnt */ { NULL }, /* --verify-crl */
964 /* arg list/cookie */ NULL,
965 /* must/cannot opts */ aVerify_CrlMustList, NULL,
966 /* option proc */ NULL,
967 /* desc, NAME, name */ VERIFY_CRL_DESC, VERIFY_CRL_NAME, VERIFY_CRL_name,
968 /* disablement strs */ NULL, NULL },
970 { /* entry idx, value */ 14, VALUE_OPT_GENERATE_DH_PARAMS,
971 /* equiv idx, value */ 14, VALUE_OPT_GENERATE_DH_PARAMS,
972 /* equivalenced to */ NO_EQUIVALENT,
973 /* min, max, act ct */ 0, 1, 0,
974 /* opt state flags */ GENERATE_DH_PARAMS_FLAGS, 0,
975 /* last opt argumnt */ { NULL }, /* --generate-dh-params */
976 /* arg list/cookie */ NULL,
977 /* must/cannot opts */ NULL, NULL,
978 /* option proc */ NULL,
979 /* desc, NAME, name */ GENERATE_DH_PARAMS_DESC, GENERATE_DH_PARAMS_NAME, GENERATE_DH_PARAMS_name,
980 /* disablement strs */ NULL, NULL },
982 { /* entry idx, value */ 15, VALUE_OPT_GET_DH_PARAMS,
983 /* equiv idx, value */ 15, VALUE_OPT_GET_DH_PARAMS,
984 /* equivalenced to */ NO_EQUIVALENT,
985 /* min, max, act ct */ 0, 1, 0,
986 /* opt state flags */ GET_DH_PARAMS_FLAGS, 0,
987 /* last opt argumnt */ { NULL }, /* --get-dh-params */
988 /* arg list/cookie */ NULL,
989 /* must/cannot opts */ NULL, NULL,
990 /* option proc */ NULL,
991 /* desc, NAME, name */ GET_DH_PARAMS_DESC, GET_DH_PARAMS_NAME, GET_DH_PARAMS_name,
992 /* disablement strs */ NULL, NULL },
994 { /* entry idx, value */ 16, VALUE_OPT_DH_INFO,
995 /* equiv idx, value */ 16, VALUE_OPT_DH_INFO,
996 /* equivalenced to */ NO_EQUIVALENT,
997 /* min, max, act ct */ 0, 1, 0,
998 /* opt state flags */ DH_INFO_FLAGS, 0,
999 /* last opt argumnt */ { NULL }, /* --dh-info */
1000 /* arg list/cookie */ NULL,
1001 /* must/cannot opts */ NULL, NULL,
1002 /* option proc */ NULL,
1003 /* desc, NAME, name */ DH_INFO_DESC, DH_INFO_NAME, DH_INFO_name,
1004 /* disablement strs */ NULL, NULL },
1006 { /* entry idx, value */ 17, VALUE_OPT_LOAD_PRIVKEY,
1007 /* equiv idx, value */ 17, VALUE_OPT_LOAD_PRIVKEY,
1008 /* equivalenced to */ NO_EQUIVALENT,
1009 /* min, max, act ct */ 0, 1, 0,
1010 /* opt state flags */ LOAD_PRIVKEY_FLAGS, 0,
1011 /* last opt argumnt */ { NULL }, /* --load-privkey */
1012 /* arg list/cookie */ NULL,
1013 /* must/cannot opts */ NULL, NULL,
1014 /* option proc */ NULL,
1015 /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, LOAD_PRIVKEY_name,
1016 /* disablement strs */ NULL, NULL },
1018 { /* entry idx, value */ 18, VALUE_OPT_LOAD_PUBKEY,
1019 /* equiv idx, value */ 18, VALUE_OPT_LOAD_PUBKEY,
1020 /* equivalenced to */ NO_EQUIVALENT,
1021 /* min, max, act ct */ 0, 1, 0,
1022 /* opt state flags */ LOAD_PUBKEY_FLAGS, 0,
1023 /* last opt argumnt */ { NULL }, /* --load-pubkey */
1024 /* arg list/cookie */ NULL,
1025 /* must/cannot opts */ NULL, NULL,
1026 /* option proc */ NULL,
1027 /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, LOAD_PUBKEY_name,
1028 /* disablement strs */ NULL, NULL },
1030 { /* entry idx, value */ 19, VALUE_OPT_LOAD_REQUEST,
1031 /* equiv idx, value */ 19, VALUE_OPT_LOAD_REQUEST,
1032 /* equivalenced to */ NO_EQUIVALENT,
1033 /* min, max, act ct */ 0, 1, 0,
1034 /* opt state flags */ LOAD_REQUEST_FLAGS, 0,
1035 /* last opt argumnt */ { NULL }, /* --load-request */
1036 /* arg list/cookie */ NULL,
1037 /* must/cannot opts */ NULL, NULL,
1038 /* option proc */ doOptLoad_Request,
1039 /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, LOAD_REQUEST_name,
1040 /* disablement strs */ NULL, NULL },
1042 { /* entry idx, value */ 20, VALUE_OPT_LOAD_CERTIFICATE,
1043 /* equiv idx, value */ 20, VALUE_OPT_LOAD_CERTIFICATE,
1044 /* equivalenced to */ NO_EQUIVALENT,
1045 /* min, max, act ct */ 0, 1, 0,
1046 /* opt state flags */ LOAD_CERTIFICATE_FLAGS, 0,
1047 /* last opt argumnt */ { NULL }, /* --load-certificate */
1048 /* arg list/cookie */ NULL,
1049 /* must/cannot opts */ NULL, NULL,
1050 /* option proc */ NULL,
1051 /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, LOAD_CERTIFICATE_name,
1052 /* disablement strs */ NULL, NULL },
1054 { /* entry idx, value */ 21, VALUE_OPT_LOAD_CA_PRIVKEY,
1055 /* equiv idx, value */ 21, VALUE_OPT_LOAD_CA_PRIVKEY,
1056 /* equivalenced to */ NO_EQUIVALENT,
1057 /* min, max, act ct */ 0, 1, 0,
1058 /* opt state flags */ LOAD_CA_PRIVKEY_FLAGS, 0,
1059 /* last opt argumnt */ { NULL }, /* --load-ca-privkey */
1060 /* arg list/cookie */ NULL,
1061 /* must/cannot opts */ NULL, NULL,
1062 /* option proc */ NULL,
1063 /* desc, NAME, name */ LOAD_CA_PRIVKEY_DESC, LOAD_CA_PRIVKEY_NAME, LOAD_CA_PRIVKEY_name,
1064 /* disablement strs */ NULL, NULL },
1066 { /* entry idx, value */ 22, VALUE_OPT_LOAD_CA_CERTIFICATE,
1067 /* equiv idx, value */ 22, VALUE_OPT_LOAD_CA_CERTIFICATE,
1068 /* equivalenced to */ NO_EQUIVALENT,
1069 /* min, max, act ct */ 0, 1, 0,
1070 /* opt state flags */ LOAD_CA_CERTIFICATE_FLAGS, 0,
1071 /* last opt argumnt */ { NULL }, /* --load-ca-certificate */
1072 /* arg list/cookie */ NULL,
1073 /* must/cannot opts */ NULL, NULL,
1074 /* option proc */ NULL,
1075 /* desc, NAME, name */ LOAD_CA_CERTIFICATE_DESC, LOAD_CA_CERTIFICATE_NAME, LOAD_CA_CERTIFICATE_name,
1076 /* disablement strs */ NULL, NULL },
1078 { /* entry idx, value */ 23, VALUE_OPT_PASSWORD,
1079 /* equiv idx, value */ 23, VALUE_OPT_PASSWORD,
1080 /* equivalenced to */ NO_EQUIVALENT,
1081 /* min, max, act ct */ 0, 1, 0,
1082 /* opt state flags */ PASSWORD_FLAGS, 0,
1083 /* last opt argumnt */ { NULL }, /* --password */
1084 /* arg list/cookie */ NULL,
1085 /* must/cannot opts */ NULL, NULL,
1086 /* option proc */ NULL,
1087 /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
1088 /* disablement strs */ NULL, NULL },
1090 { /* entry idx, value */ 24, VALUE_OPT_HEX_NUMBERS,
1091 /* equiv idx, value */ 24, VALUE_OPT_HEX_NUMBERS,
1092 /* equivalenced to */ NO_EQUIVALENT,
1093 /* min, max, act ct */ 0, 1, 0,
1094 /* opt state flags */ HEX_NUMBERS_FLAGS, 0,
1095 /* last opt argumnt */ { NULL }, /* --hex-numbers */
1096 /* arg list/cookie */ NULL,
1097 /* must/cannot opts */ NULL, NULL,
1098 /* option proc */ NULL,
1099 /* desc, NAME, name */ HEX_NUMBERS_DESC, HEX_NUMBERS_NAME, HEX_NUMBERS_name,
1100 /* disablement strs */ NULL, NULL },
1102 { /* entry idx, value */ 25, VALUE_OPT_NULL_PASSWORD,
1103 /* equiv idx, value */ 25, VALUE_OPT_NULL_PASSWORD,
1104 /* equivalenced to */ NO_EQUIVALENT,
1105 /* min, max, act ct */ 0, 1, 0,
1106 /* opt state flags */ NULL_PASSWORD_FLAGS, 0,
1107 /* last opt argumnt */ { NULL }, /* --null-password */
1108 /* arg list/cookie */ NULL,
1109 /* must/cannot opts */ NULL, NULL,
1110 /* option proc */ NULL,
1111 /* desc, NAME, name */ NULL_PASSWORD_DESC, NULL_PASSWORD_NAME, NULL_PASSWORD_name,
1112 /* disablement strs */ NULL, NULL },
1114 { /* entry idx, value */ 26, VALUE_OPT_CERTIFICATE_INFO,
1115 /* equiv idx, value */ 26, VALUE_OPT_CERTIFICATE_INFO,
1116 /* equivalenced to */ NO_EQUIVALENT,
1117 /* min, max, act ct */ 0, 1, 0,
1118 /* opt state flags */ CERTIFICATE_INFO_FLAGS, 0,
1119 /* last opt argumnt */ { NULL }, /* --certificate-info */
1120 /* arg list/cookie */ NULL,
1121 /* must/cannot opts */ NULL, NULL,
1122 /* option proc */ NULL,
1123 /* desc, NAME, name */ CERTIFICATE_INFO_DESC, CERTIFICATE_INFO_NAME, CERTIFICATE_INFO_name,
1124 /* disablement strs */ NULL, NULL },
1126 { /* entry idx, value */ 27, VALUE_OPT_CERTIFICATE_PUBKEY,
1127 /* equiv idx, value */ 27, VALUE_OPT_CERTIFICATE_PUBKEY,
1128 /* equivalenced to */ NO_EQUIVALENT,
1129 /* min, max, act ct */ 0, 1, 0,
1130 /* opt state flags */ CERTIFICATE_PUBKEY_FLAGS, 0,
1131 /* last opt argumnt */ { NULL }, /* --certificate-pubkey */
1132 /* arg list/cookie */ NULL,
1133 /* must/cannot opts */ NULL, NULL,
1134 /* option proc */ NULL,
1135 /* desc, NAME, name */ CERTIFICATE_PUBKEY_DESC, CERTIFICATE_PUBKEY_NAME, CERTIFICATE_PUBKEY_name,
1136 /* disablement strs */ NULL, NULL },
1138 { /* entry idx, value */ 28, VALUE_OPT_PGP_CERTIFICATE_INFO,
1139 /* equiv idx, value */ 28, VALUE_OPT_PGP_CERTIFICATE_INFO,
1140 /* equivalenced to */ NO_EQUIVALENT,
1141 /* min, max, act ct */ 0, 1, 0,
1142 /* opt state flags */ PGP_CERTIFICATE_INFO_FLAGS, 0,
1143 /* last opt argumnt */ { NULL }, /* --pgp-certificate-info */
1144 /* arg list/cookie */ NULL,
1145 /* must/cannot opts */ NULL, NULL,
1146 /* option proc */ NULL,
1147 /* desc, NAME, name */ PGP_CERTIFICATE_INFO_DESC, PGP_CERTIFICATE_INFO_NAME, PGP_CERTIFICATE_INFO_name,
1148 /* disablement strs */ NULL, NULL },
1150 { /* entry idx, value */ 29, VALUE_OPT_PGP_RING_INFO,
1151 /* equiv idx, value */ 29, VALUE_OPT_PGP_RING_INFO,
1152 /* equivalenced to */ NO_EQUIVALENT,
1153 /* min, max, act ct */ 0, 1, 0,
1154 /* opt state flags */ PGP_RING_INFO_FLAGS, 0,
1155 /* last opt argumnt */ { NULL }, /* --pgp-ring-info */
1156 /* arg list/cookie */ NULL,
1157 /* must/cannot opts */ NULL, NULL,
1158 /* option proc */ NULL,
1159 /* desc, NAME, name */ PGP_RING_INFO_DESC, PGP_RING_INFO_NAME, PGP_RING_INFO_name,
1160 /* disablement strs */ NULL, NULL },
1162 { /* entry idx, value */ 30, VALUE_OPT_CRL_INFO,
1163 /* equiv idx, value */ 30, VALUE_OPT_CRL_INFO,
1164 /* equivalenced to */ NO_EQUIVALENT,
1165 /* min, max, act ct */ 0, 1, 0,
1166 /* opt state flags */ CRL_INFO_FLAGS, 0,
1167 /* last opt argumnt */ { NULL }, /* --crl-info */
1168 /* arg list/cookie */ NULL,
1169 /* must/cannot opts */ NULL, NULL,
1170 /* option proc */ NULL,
1171 /* desc, NAME, name */ CRL_INFO_DESC, CRL_INFO_NAME, CRL_INFO_name,
1172 /* disablement strs */ NULL, NULL },
1174 { /* entry idx, value */ 31, VALUE_OPT_CRQ_INFO,
1175 /* equiv idx, value */ 31, VALUE_OPT_CRQ_INFO,
1176 /* equivalenced to */ NO_EQUIVALENT,
1177 /* min, max, act ct */ 0, 1, 0,
1178 /* opt state flags */ CRQ_INFO_FLAGS, 0,
1179 /* last opt argumnt */ { NULL }, /* --crq-info */
1180 /* arg list/cookie */ NULL,
1181 /* must/cannot opts */ NULL, NULL,
1182 /* option proc */ NULL,
1183 /* desc, NAME, name */ CRQ_INFO_DESC, CRQ_INFO_NAME, CRQ_INFO_name,
1184 /* disablement strs */ NULL, NULL },
1186 { /* entry idx, value */ 32, VALUE_OPT_NO_CRQ_EXTENSIONS,
1187 /* equiv idx, value */ 32, VALUE_OPT_NO_CRQ_EXTENSIONS,
1188 /* equivalenced to */ NO_EQUIVALENT,
1189 /* min, max, act ct */ 0, 1, 0,
1190 /* opt state flags */ NO_CRQ_EXTENSIONS_FLAGS, 0,
1191 /* last opt argumnt */ { NULL }, /* --no-crq-extensions */
1192 /* arg list/cookie */ NULL,
1193 /* must/cannot opts */ NULL, NULL,
1194 /* option proc */ NULL,
1195 /* desc, NAME, name */ NO_CRQ_EXTENSIONS_DESC, NO_CRQ_EXTENSIONS_NAME, NO_CRQ_EXTENSIONS_name,
1196 /* disablement strs */ NULL, NULL },
1198 { /* entry idx, value */ 33, VALUE_OPT_P12_INFO,
1199 /* equiv idx, value */ 33, VALUE_OPT_P12_INFO,
1200 /* equivalenced to */ NO_EQUIVALENT,
1201 /* min, max, act ct */ 0, 1, 0,
1202 /* opt state flags */ P12_INFO_FLAGS, 0,
1203 /* last opt argumnt */ { NULL }, /* --p12-info */
1204 /* arg list/cookie */ NULL,
1205 /* must/cannot opts */ NULL, NULL,
1206 /* option proc */ NULL,
1207 /* desc, NAME, name */ P12_INFO_DESC, P12_INFO_NAME, P12_INFO_name,
1208 /* disablement strs */ NULL, NULL },
1210 { /* entry idx, value */ 34, VALUE_OPT_P7_INFO,
1211 /* equiv idx, value */ 34, VALUE_OPT_P7_INFO,
1212 /* equivalenced to */ NO_EQUIVALENT,
1213 /* min, max, act ct */ 0, 1, 0,
1214 /* opt state flags */ P7_INFO_FLAGS, 0,
1215 /* last opt argumnt */ { NULL }, /* --p7-info */
1216 /* arg list/cookie */ NULL,
1217 /* must/cannot opts */ NULL, NULL,
1218 /* option proc */ NULL,
1219 /* desc, NAME, name */ P7_INFO_DESC, P7_INFO_NAME, P7_INFO_name,
1220 /* disablement strs */ NULL, NULL },
1222 { /* entry idx, value */ 35, VALUE_OPT_SMIME_TO_P7,
1223 /* equiv idx, value */ 35, VALUE_OPT_SMIME_TO_P7,
1224 /* equivalenced to */ NO_EQUIVALENT,
1225 /* min, max, act ct */ 0, 1, 0,
1226 /* opt state flags */ SMIME_TO_P7_FLAGS, 0,
1227 /* last opt argumnt */ { NULL }, /* --smime-to-p7 */
1228 /* arg list/cookie */ NULL,
1229 /* must/cannot opts */ NULL, NULL,
1230 /* option proc */ NULL,
1231 /* desc, NAME, name */ SMIME_TO_P7_DESC, SMIME_TO_P7_NAME, SMIME_TO_P7_name,
1232 /* disablement strs */ NULL, NULL },
1234 { /* entry idx, value */ 36, VALUE_OPT_KEY_INFO,
1235 /* equiv idx, value */ 36, VALUE_OPT_KEY_INFO,
1236 /* equivalenced to */ NO_EQUIVALENT,
1237 /* min, max, act ct */ 0, 1, 0,
1238 /* opt state flags */ KEY_INFO_FLAGS, 0,
1239 /* last opt argumnt */ { NULL }, /* --key-info */
1240 /* arg list/cookie */ NULL,
1241 /* must/cannot opts */ NULL, NULL,
1242 /* option proc */ NULL,
1243 /* desc, NAME, name */ KEY_INFO_DESC, KEY_INFO_NAME, KEY_INFO_name,
1244 /* disablement strs */ NULL, NULL },
1246 { /* entry idx, value */ 37, VALUE_OPT_PGP_KEY_INFO,
1247 /* equiv idx, value */ 37, VALUE_OPT_PGP_KEY_INFO,
1248 /* equivalenced to */ NO_EQUIVALENT,
1249 /* min, max, act ct */ 0, 1, 0,
1250 /* opt state flags */ PGP_KEY_INFO_FLAGS, 0,
1251 /* last opt argumnt */ { NULL }, /* --pgp-key-info */
1252 /* arg list/cookie */ NULL,
1253 /* must/cannot opts */ NULL, NULL,
1254 /* option proc */ NULL,
1255 /* desc, NAME, name */ PGP_KEY_INFO_DESC, PGP_KEY_INFO_NAME, PGP_KEY_INFO_name,
1256 /* disablement strs */ NULL, NULL },
1258 { /* entry idx, value */ 38, VALUE_OPT_PUBKEY_INFO,
1259 /* equiv idx, value */ 38, VALUE_OPT_PUBKEY_INFO,
1260 /* equivalenced to */ NO_EQUIVALENT,
1261 /* min, max, act ct */ 0, 1, 0,
1262 /* opt state flags */ PUBKEY_INFO_FLAGS, 0,
1263 /* last opt argumnt */ { NULL }, /* --pubkey-info */
1264 /* arg list/cookie */ NULL,
1265 /* must/cannot opts */ NULL, NULL,
1266 /* option proc */ NULL,
1267 /* desc, NAME, name */ PUBKEY_INFO_DESC, PUBKEY_INFO_NAME, PUBKEY_INFO_name,
1268 /* disablement strs */ NULL, NULL },
1270 { /* entry idx, value */ 39, VALUE_OPT_V1,
1271 /* equiv idx, value */ 39, VALUE_OPT_V1,
1272 /* equivalenced to */ NO_EQUIVALENT,
1273 /* min, max, act ct */ 0, 1, 0,
1274 /* opt state flags */ V1_FLAGS, 0,
1275 /* last opt argumnt */ { NULL }, /* --v1 */
1276 /* arg list/cookie */ NULL,
1277 /* must/cannot opts */ NULL, NULL,
1278 /* option proc */ NULL,
1279 /* desc, NAME, name */ V1_DESC, V1_NAME, V1_name,
1280 /* disablement strs */ NULL, NULL },
1282 { /* entry idx, value */ 40, VALUE_OPT_TO_P12,
1283 /* equiv idx, value */ 40, VALUE_OPT_TO_P12,
1284 /* equivalenced to */ NO_EQUIVALENT,
1285 /* min, max, act ct */ 0, 1, 0,
1286 /* opt state flags */ TO_P12_FLAGS, 0,
1287 /* last opt argumnt */ { NULL }, /* --to-p12 */
1288 /* arg list/cookie */ NULL,
1289 /* must/cannot opts */ aTo_P12MustList, NULL,
1290 /* option proc */ NULL,
1291 /* desc, NAME, name */ TO_P12_DESC, TO_P12_NAME, TO_P12_name,
1292 /* disablement strs */ NULL, NULL },
1294 { /* entry idx, value */ 41, VALUE_OPT_TO_P8,
1295 /* equiv idx, value */ 41, VALUE_OPT_TO_P8,
1296 /* equivalenced to */ NO_EQUIVALENT,
1297 /* min, max, act ct */ 0, 1, 0,
1298 /* opt state flags */ TO_P8_FLAGS, 0,
1299 /* last opt argumnt */ { NULL }, /* --to-p8 */
1300 /* arg list/cookie */ NULL,
1301 /* must/cannot opts */ NULL, NULL,
1302 /* option proc */ NULL,
1303 /* desc, NAME, name */ TO_P8_DESC, TO_P8_NAME, TO_P8_name,
1304 /* disablement strs */ NULL, NULL },
1306 { /* entry idx, value */ 42, VALUE_OPT_PKCS8,
1307 /* equiv idx, value */ 42, VALUE_OPT_PKCS8,
1308 /* equivalenced to */ NO_EQUIVALENT,
1309 /* min, max, act ct */ 0, 1, 0,
1310 /* opt state flags */ PKCS8_FLAGS, 0,
1311 /* last opt argumnt */ { NULL }, /* --pkcs8 */
1312 /* arg list/cookie */ NULL,
1313 /* must/cannot opts */ NULL, NULL,
1314 /* option proc */ NULL,
1315 /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name,
1316 /* disablement strs */ NULL, NULL },
1318 { /* entry idx, value */ 43, VALUE_OPT_RSA,
1319 /* equiv idx, value */ 43, VALUE_OPT_RSA,
1320 /* equivalenced to */ NO_EQUIVALENT,
1321 /* min, max, act ct */ 0, 1, 0,
1322 /* opt state flags */ RSA_FLAGS, 0,
1323 /* last opt argumnt */ { NULL }, /* --rsa */
1324 /* arg list/cookie */ NULL,
1325 /* must/cannot opts */ NULL, NULL,
1326 /* option proc */ NULL,
1327 /* desc, NAME, name */ RSA_DESC, RSA_NAME, RSA_name,
1328 /* disablement strs */ NULL, NULL },
1330 { /* entry idx, value */ 44, VALUE_OPT_DSA,
1331 /* equiv idx, value */ 44, VALUE_OPT_DSA,
1332 /* equivalenced to */ NO_EQUIVALENT,
1333 /* min, max, act ct */ 0, 1, 0,
1334 /* opt state flags */ DSA_FLAGS, 0,
1335 /* last opt argumnt */ { NULL }, /* --dsa */
1336 /* arg list/cookie */ NULL,
1337 /* must/cannot opts */ NULL, NULL,
1338 /* option proc */ NULL,
1339 /* desc, NAME, name */ DSA_DESC, DSA_NAME, DSA_name,
1340 /* disablement strs */ NULL, NULL },
1342 { /* entry idx, value */ 45, VALUE_OPT_ECC,
1343 /* equiv idx, value */ 45, VALUE_OPT_ECC,
1344 /* equivalenced to */ NO_EQUIVALENT,
1345 /* min, max, act ct */ 0, 1, 0,
1346 /* opt state flags */ ECC_FLAGS, 0,
1347 /* last opt argumnt */ { NULL }, /* --ecc */
1348 /* arg list/cookie */ NULL,
1349 /* must/cannot opts */ NULL, NULL,
1350 /* option proc */ NULL,
1351 /* desc, NAME, name */ ECC_DESC, ECC_NAME, ECC_name,
1352 /* disablement strs */ NULL, NULL },
1354 { /* entry idx, value */ 46, VALUE_OPT_ECDSA,
1355 /* equiv idx, value */ 46, VALUE_OPT_ECDSA,
1356 /* equivalenced to */ NO_EQUIVALENT,
1357 /* min, max, act ct */ 0, 1, 0,
1358 /* opt state flags */ ECDSA_FLAGS, 0,
1359 /* last opt argumnt */ { NULL }, /* --ecdsa */
1360 /* arg list/cookie */ NULL,
1361 /* must/cannot opts */ NULL, NULL,
1362 /* option proc */ doOptEcdsa,
1363 /* desc, NAME, name */ ECDSA_DESC, ECDSA_NAME, ECDSA_name,
1364 /* disablement strs */ 0, 0 },
1366 { /* entry idx, value */ 47, VALUE_OPT_HASH,
1367 /* equiv idx, value */ 47, VALUE_OPT_HASH,
1368 /* equivalenced to */ NO_EQUIVALENT,
1369 /* min, max, act ct */ 0, 1, 0,
1370 /* opt state flags */ HASH_FLAGS, 0,
1371 /* last opt argumnt */ { NULL }, /* --hash */
1372 /* arg list/cookie */ NULL,
1373 /* must/cannot opts */ NULL, NULL,
1374 /* option proc */ NULL,
1375 /* desc, NAME, name */ HASH_DESC, HASH_NAME, HASH_name,
1376 /* disablement strs */ NULL, NULL },
1378 { /* entry idx, value */ 48, VALUE_OPT_INDER,
1379 /* equiv idx, value */ 48, VALUE_OPT_INDER,
1380 /* equivalenced to */ NO_EQUIVALENT,
1381 /* min, max, act ct */ 0, 1, 0,
1382 /* opt state flags */ INDER_FLAGS, 0,
1383 /* last opt argumnt */ { NULL }, /* --inder */
1384 /* arg list/cookie */ NULL,
1385 /* must/cannot opts */ NULL, NULL,
1386 /* option proc */ NULL,
1387 /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
1388 /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
1390 { /* entry idx, value */ 49, VALUE_OPT_INRAW,
1391 /* equiv idx, value */ 49, VALUE_OPT_INRAW,
1392 /* equivalenced to */ NO_EQUIVALENT,
1393 /* min, max, act ct */ 0, 1, 0,
1394 /* opt state flags */ INRAW_FLAGS, 0,
1395 /* last opt argumnt */ { NULL }, /* --inraw */
1396 /* arg list/cookie */ NULL,
1397 /* must/cannot opts */ NULL, NULL,
1398 /* option proc */ doOptInraw,
1399 /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name,
1400 /* disablement strs */ 0, 0 },
1402 { /* entry idx, value */ 50, VALUE_OPT_OUTDER,
1403 /* equiv idx, value */ 50, VALUE_OPT_OUTDER,
1404 /* equivalenced to */ NO_EQUIVALENT,
1405 /* min, max, act ct */ 0, 1, 0,
1406 /* opt state flags */ OUTDER_FLAGS, 0,
1407 /* last opt argumnt */ { NULL }, /* --outder */
1408 /* arg list/cookie */ NULL,
1409 /* must/cannot opts */ NULL, NULL,
1410 /* option proc */ NULL,
1411 /* desc, NAME, name */ OUTDER_DESC, OUTDER_NAME, OUTDER_name,
1412 /* disablement strs */ NOT_OUTDER_name, NOT_OUTDER_PFX },
1414 { /* entry idx, value */ 51, VALUE_OPT_OUTRAW,
1415 /* equiv idx, value */ 51, VALUE_OPT_OUTRAW,
1416 /* equivalenced to */ NO_EQUIVALENT,
1417 /* min, max, act ct */ 0, 1, 0,
1418 /* opt state flags */ OUTRAW_FLAGS, 0,
1419 /* last opt argumnt */ { NULL }, /* --outraw */
1420 /* arg list/cookie */ NULL,
1421 /* must/cannot opts */ NULL, NULL,
1422 /* option proc */ doOptOutraw,
1423 /* desc, NAME, name */ OUTRAW_DESC, OUTRAW_NAME, OUTRAW_name,
1424 /* disablement strs */ 0, 0 },
1426 { /* entry idx, value */ 52, VALUE_OPT_BITS,
1427 /* equiv idx, value */ 52, VALUE_OPT_BITS,
1428 /* equivalenced to */ NO_EQUIVALENT,
1429 /* min, max, act ct */ 0, 1, 0,
1430 /* opt state flags */ BITS_FLAGS, 0,
1431 /* last opt argumnt */ { NULL }, /* --bits */
1432 /* arg list/cookie */ NULL,
1433 /* must/cannot opts */ NULL, NULL,
1434 /* option proc */ optionNumericVal,
1435 /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name,
1436 /* disablement strs */ NULL, NULL },
1438 { /* entry idx, value */ 53, VALUE_OPT_SEC_PARAM,
1439 /* equiv idx, value */ 53, VALUE_OPT_SEC_PARAM,
1440 /* equivalenced to */ NO_EQUIVALENT,
1441 /* min, max, act ct */ 0, 1, 0,
1442 /* opt state flags */ SEC_PARAM_FLAGS, 0,
1443 /* last opt argumnt */ { NULL }, /* --sec-param */
1444 /* arg list/cookie */ NULL,
1445 /* must/cannot opts */ NULL, NULL,
1446 /* option proc */ NULL,
1447 /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name,
1448 /* disablement strs */ NULL, NULL },
1450 { /* entry idx, value */ 54, VALUE_OPT_DISABLE_QUICK_RANDOM,
1451 /* equiv idx, value */ 54, VALUE_OPT_DISABLE_QUICK_RANDOM,
1452 /* equivalenced to */ NO_EQUIVALENT,
1453 /* min, max, act ct */ 0, 1, 0,
1454 /* opt state flags */ DISABLE_QUICK_RANDOM_FLAGS, 0,
1455 /* last opt argumnt */ { NULL }, /* --disable-quick-random */
1456 /* arg list/cookie */ NULL,
1457 /* must/cannot opts */ NULL, NULL,
1458 /* option proc */ NULL,
1459 /* desc, NAME, name */ DISABLE_QUICK_RANDOM_DESC, DISABLE_QUICK_RANDOM_NAME, DISABLE_QUICK_RANDOM_name,
1460 /* disablement strs */ NULL, NULL },
1462 { /* entry idx, value */ 55, VALUE_OPT_TEMPLATE,
1463 /* equiv idx, value */ 55, VALUE_OPT_TEMPLATE,
1464 /* equivalenced to */ NO_EQUIVALENT,
1465 /* min, max, act ct */ 0, 1, 0,
1466 /* opt state flags */ TEMPLATE_FLAGS, 0,
1467 /* last opt argumnt */ { NULL }, /* --template */
1468 /* arg list/cookie */ NULL,
1469 /* must/cannot opts */ NULL, NULL,
1470 /* option proc */ doOptTemplate,
1471 /* desc, NAME, name */ TEMPLATE_DESC, TEMPLATE_NAME, TEMPLATE_name,
1472 /* disablement strs */ NULL, NULL },
1474 { /* entry idx, value */ 56, VALUE_OPT_PKCS_CIPHER,
1475 /* equiv idx, value */ 56, VALUE_OPT_PKCS_CIPHER,
1476 /* equivalenced to */ NO_EQUIVALENT,
1477 /* min, max, act ct */ 0, 1, 0,
1478 /* opt state flags */ PKCS_CIPHER_FLAGS, 0,
1479 /* last opt argumnt */ { NULL }, /* --pkcs-cipher */
1480 /* arg list/cookie */ NULL,
1481 /* must/cannot opts */ NULL, NULL,
1482 /* option proc */ NULL,
1483 /* desc, NAME, name */ PKCS_CIPHER_DESC, PKCS_CIPHER_NAME, PKCS_CIPHER_name,
1484 /* disablement strs */ NULL, NULL },
1486 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
1487 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
1488 /* equivalenced to */ NO_EQUIVALENT,
1489 /* min, max, act ct */ 0, 1, 0,
1490 /* opt state flags */ VER_FLAGS, 0,
1491 /* last opt argumnt */ { NULL },
1492 /* arg list/cookie */ NULL,
1493 /* must/cannot opts */ NULL, NULL,
1494 /* option proc */ VER_PROC,
1495 /* desc, NAME, name */ VER_DESC, NULL, VER_name,
1496 /* disablement strs */ NULL, NULL },
1500 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
1501 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
1502 /* equivalenced to */ NO_EQUIVALENT,
1503 /* min, max, act ct */ 0, 1, 0,
1504 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
1505 /* last opt argumnt */ { NULL },
1506 /* arg list/cookie */ NULL,
1507 /* must/cannot opts */ NULL, NULL,
1508 /* option proc */ doUsageOpt,
1509 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
1510 /* disablement strs */ NULL, NULL },
1512 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
1513 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
1514 /* equivalenced to */ NO_EQUIVALENT,
1515 /* min, max, act ct */ 0, 1, 0,
1516 /* opt state flags */ MORE_HELP_FLAGS, 0,
1517 /* last opt argumnt */ { NULL },
1518 /* arg list/cookie */ NULL,
1519 /* must/cannot opts */ NULL, NULL,
1520 /* option proc */ optionPagedUsage,
1521 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
1522 /* disablement strs */ NULL, NULL }
1526 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1528 * Define the certtool Option Environment
1530 #define zPROGNAME (certtool_opt_strs+4400)
1531 #define zUsageTitle (certtool_opt_strs+4409)
1532 #define zRcName NULL
1533 #define apzHomeList NULL
1534 #define zBugsAddr (certtool_opt_strs+4519)
1535 #define zExplain (certtool_opt_strs+4538)
1536 #define zDetail (certtool_opt_strs+4541)
1537 #define zFullVersion (certtool_opt_strs+4715)
1538 /* extracted from optcode.tlib near line 350 */
1540 #if defined(ENABLE_NLS)
1541 # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
1542 static tOptionXlateProc translate_option_strings;
1543 #else
1544 # define OPTPROC_BASE OPTPROC_NONE
1545 # define translate_option_strings NULL
1546 #endif /* ENABLE_NLS */
1549 #define certtool_full_usage (NULL)
1551 #define certtool_short_usage (certtool_opt_strs+4734)
1553 #endif /* not defined __doxygen__ */
1556 * Create the static procedure(s) declared above.
1559 * The callout function that invokes the optionUsage function.
1561 * @param pOptions the AutoOpts option description structure
1562 * @param pOptDesc the descriptor for the "help" (usage) option.
1563 * @noreturn
1565 static void
1566 doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
1568 optionUsage(&certtoolOptions, CERTTOOL_EXIT_SUCCESS);
1569 /* NOTREACHED */
1570 (void)pOptDesc;
1571 (void)pOptions;
1574 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1576 * Code to handle the debug option.
1578 * @param pOptions the certtool options data structure
1579 * @param pOptDesc the option descriptor for this option.
1581 static void
1582 doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
1584 static struct {long rmin, rmax;} const rng[1] = {
1585 { 0 , 9999 } };
1586 int ix;
1588 if (pOptions <= OPTPROC_EMIT_LIMIT)
1589 goto emit_ranges;
1590 optionNumericVal(pOptions, pOptDesc);
1592 for (ix = 0; ix < 1; ix++) {
1593 if (pOptDesc->optArg.argInt < rng[ix].rmin)
1594 continue; /* ranges need not be ordered. */
1595 if (pOptDesc->optArg.argInt == rng[ix].rmin)
1596 return;
1597 if (rng[ix].rmax == LONG_MIN)
1598 continue;
1599 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1600 return;
1603 option_usage_fp = stderr;
1605 emit_ranges:
1607 optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1610 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1612 * Code to handle the infile option.
1614 * @param pOptions the certtool options data structure
1615 * @param pOptDesc the option descriptor for this option.
1617 static void
1618 doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc)
1620 static teOptFileType const type =
1621 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1622 static tuFileMode mode;
1623 #ifndef O_CLOEXEC
1624 # define O_CLOEXEC 0
1625 #endif
1626 mode.file_flags = O_CLOEXEC;
1628 optionFileCheck(pOptions, pOptDesc, type, mode);
1631 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1633 * Code to handle the load-request option.
1635 * @param pOptions the certtool options data structure
1636 * @param pOptDesc the option descriptor for this option.
1638 static void
1639 doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc)
1641 static teOptFileType const type =
1642 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1643 static tuFileMode mode;
1644 #ifndef O_CLOEXEC
1645 # define O_CLOEXEC 0
1646 #endif
1647 mode.file_flags = O_CLOEXEC;
1649 optionFileCheck(pOptions, pOptDesc, type, mode);
1652 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1654 * Code to handle the ecdsa option.
1656 * @param pOptions the certtool options data structure
1657 * @param pOptDesc the option descriptor for this option.
1659 static void
1660 doOptEcdsa(tOptions* pOptions, tOptDesc* pOptDesc)
1662 int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_ECC);
1663 if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1664 USAGE(CERTTOOL_EXIT_FAILURE);
1668 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1670 * Code to handle the inraw option.
1672 * @param pOptions the certtool options data structure
1673 * @param pOptDesc the option descriptor for this option.
1675 static void
1676 doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc)
1678 int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER);
1679 if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1680 USAGE(CERTTOOL_EXIT_FAILURE);
1684 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1686 * Code to handle the outraw option.
1688 * @param pOptions the certtool options data structure
1689 * @param pOptDesc the option descriptor for this option.
1691 static void
1692 doOptOutraw(tOptions* pOptions, tOptDesc* pOptDesc)
1694 int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_OUTDER);
1695 if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1696 USAGE(CERTTOOL_EXIT_FAILURE);
1700 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1702 * Code to handle the template option.
1704 * @param pOptions the certtool options data structure
1705 * @param pOptDesc the option descriptor for this option.
1707 static void
1708 doOptTemplate(tOptions* pOptions, tOptDesc* pOptDesc)
1710 static teOptFileType const type =
1711 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1712 static tuFileMode mode;
1713 #ifndef O_CLOEXEC
1714 # define O_CLOEXEC 0
1715 #endif
1716 mode.file_flags = O_CLOEXEC;
1718 optionFileCheck(pOptions, pOptDesc, type, mode);
1720 /* extracted from optmain.tlib near line 1113 */
1723 * The directory containing the data associated with certtool.
1725 #ifndef PKGDATADIR
1726 # define PKGDATADIR ""
1727 #endif
1730 * Information about the person or institution that packaged certtool
1731 * for the current distribution.
1733 #ifndef WITH_PACKAGER
1734 # define certtool_packager_info NULL
1735 #else
1736 static char const certtool_packager_info[] =
1737 "Packaged by " WITH_PACKAGER
1739 # ifdef WITH_PACKAGER_VERSION
1740 " ("WITH_PACKAGER_VERSION")"
1741 # endif
1743 # ifdef WITH_PACKAGER_BUG_REPORTS
1744 "\nReport certtool bugs to " WITH_PACKAGER_BUG_REPORTS
1745 # endif
1746 "\n";
1747 #endif
1748 #ifndef __doxygen__
1750 #endif /* __doxygen__ */
1752 * The option definitions for certtool. The one structure that
1753 * binds them all.
1755 tOptions certtoolOptions = {
1756 OPTIONS_STRUCT_VERSION,
1757 0, NULL, /* original argc + argv */
1758 ( OPTPROC_BASE
1759 + OPTPROC_ERRSTOP
1760 + OPTPROC_SHORTOPT
1761 + OPTPROC_LONGOPT
1762 + OPTPROC_NO_REQ_OPT
1763 + OPTPROC_NEGATIONS
1764 + OPTPROC_NO_ARGS
1765 + OPTPROC_GNUUSAGE
1766 + OPTPROC_MISUSE ),
1767 0, NULL, /* current option index, current option */
1768 NULL, NULL, zPROGNAME,
1769 zRcName, zCopyright, zLicenseDescrip,
1770 zFullVersion, apzHomeList, zUsageTitle,
1771 zExplain, zDetail, optDesc,
1772 zBugsAddr, /* address to send bugs to */
1773 NULL, NULL, /* extensions/saved state */
1774 optionUsage, /* usage procedure */
1775 translate_option_strings, /* translation procedure */
1777 * Indexes to special options
1779 { INDEX_OPT_MORE_HELP, /* more-help option index */
1780 NO_EQUIVALENT, /* save option index */
1781 NO_EQUIVALENT, /* '-#' option index */
1782 NO_EQUIVALENT /* index of default opt */
1784 60 /* full option count */, 57 /* user option count */,
1785 certtool_full_usage, certtool_short_usage,
1786 NULL, NULL,
1787 PKGDATADIR, certtool_packager_info
1790 #if ENABLE_NLS
1791 #include <stdio.h>
1792 #include <stdlib.h>
1793 #include <string.h>
1794 #include <unistd.h>
1795 #include <autoopts/usage-txt.h>
1797 static char* AO_gettext(char const* pz);
1798 static void coerce_it(void** s);
1801 * AutoGen specific wrapper function for gettext.
1802 * It relies on the macro _() to convert from English to the target
1803 * language, then strdup-duplicates the result string.
1805 * @param[in] pz the input text used as a lookup key.
1806 * @returns the translated text (if there is one),
1807 * or the original text (if not).
1809 static char *
1810 AO_gettext(char const* pz)
1812 char* pzRes;
1813 if (pz == NULL)
1814 return NULL;
1815 pzRes = _(pz);
1816 if (pzRes == pz)
1817 return pzRes;
1818 pzRes = strdup(pzRes);
1819 if (pzRes == NULL) {
1820 fputs(_("No memory for duping translated strings\n"), stderr);
1821 exit(CERTTOOL_EXIT_FAILURE);
1823 return pzRes;
1826 static void coerce_it(void** s) { *s = AO_gettext(*s);
1830 * Translate all the translatable strings in the certtoolOptions
1831 * structure defined above. This is done only once.
1833 static void
1834 translate_option_strings(void)
1836 tOptions * const pOpt = &certtoolOptions;
1839 * Guard against re-translation. It won't work. The strings will have
1840 * been changed by the first pass through this code. One shot only.
1842 if (option_usage_text.field_ct != 0) {
1844 * Do the translations. The first pointer follows the field count
1845 * field. The field count field is the size of a pointer.
1847 tOptDesc * pOD = pOpt->pOptDesc;
1848 char ** ppz = (char**)(void*)&(option_usage_text);
1849 int ix = option_usage_text.field_ct;
1851 do {
1852 ppz++;
1853 *ppz = AO_gettext(*ppz);
1854 } while (--ix > 0);
1856 coerce_it((void*)&(pOpt->pzCopyright));
1857 coerce_it((void*)&(pOpt->pzCopyNotice));
1858 coerce_it((void*)&(pOpt->pzFullVersion));
1859 coerce_it((void*)&(pOpt->pzUsageTitle));
1860 coerce_it((void*)&(pOpt->pzExplain));
1861 coerce_it((void*)&(pOpt->pzDetail));
1862 coerce_it((void*)&(pOpt->pzPackager));
1863 coerce_it((void*)&(pOpt->pzShortUsage));
1864 option_usage_text.field_ct = 0;
1866 for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
1867 coerce_it((void*)&(pOD->pzText));
1870 if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
1871 tOptDesc * pOD = pOpt->pOptDesc;
1872 int ix;
1874 for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
1875 coerce_it((void*)&(pOD->pz_Name));
1876 coerce_it((void*)&(pOD->pz_DisableName));
1877 coerce_it((void*)&(pOD->pz_DisablePfx));
1879 /* prevent re-translation */
1880 certtoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
1884 #endif /* ENABLE_NLS */
1886 #ifdef __cplusplus
1888 #endif
1889 /* certtool-args.c ends here */