Use hash-pjw-bare instead of asn1_bhash().
[gnutls.git] / src / certtool-args.c
blob269adc5138415657f79cd9bb9cc09381ea67bc4e
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 August 4, 2012 at 12:13:08 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[4658] =
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 */ "Input file\0"
91 /* 925 */ "INFILE\0"
92 /* 932 */ "infile\0"
93 /* 939 */ "Output file\0"
94 /* 951 */ "OUTFILE\0"
95 /* 959 */ "outfile\0"
96 /* 967 */ "Generate a self-signed certificate\0"
97 /* 1002 */ "GENERATE_SELF_SIGNED\0"
98 /* 1023 */ "generate-self-signed\0"
99 /* 1044 */ "Generate a signed certificate\0"
100 /* 1074 */ "GENERATE_CERTIFICATE\0"
101 /* 1095 */ "generate-certificate\0"
102 /* 1116 */ "Generates a proxy certificate\0"
103 /* 1146 */ "GENERATE_PROXY\0"
104 /* 1161 */ "generate-proxy\0"
105 /* 1176 */ "Generate a CRL\0"
106 /* 1191 */ "GENERATE_CRL\0"
107 /* 1204 */ "generate-crl\0"
108 /* 1217 */ "Update a signed certificate\0"
109 /* 1245 */ "UPDATE_CERTIFICATE\0"
110 /* 1264 */ "update-certificate\0"
111 /* 1283 */ "Generate a private key\0"
112 /* 1306 */ "GENERATE_PRIVKEY\0"
113 /* 1323 */ "generate-privkey\0"
114 /* 1340 */ "Generate a PKCS #10 certificate request\0"
115 /* 1380 */ "GENERATE_REQUEST\0"
116 /* 1397 */ "generate-request\0"
117 /* 1414 */ "Verify a PEM encoded certificate chain.\0"
118 /* 1454 */ "VERIFY_CHAIN\0"
119 /* 1467 */ "verify-chain\0"
120 /* 1480 */ "Verify a PEM encoded certificate chain using a trusted list.\0"
121 /* 1541 */ "VERIFY\0"
122 /* 1548 */ "verify\0"
123 /* 1555 */ "Verify a CRL using a trusted list.\0"
124 /* 1590 */ "VERIFY_CRL\0"
125 /* 1601 */ "verify-crl\0"
126 /* 1612 */ "Generate PKCS #3 encoded Diffie-Hellman parameters.\0"
127 /* 1664 */ "GENERATE_DH_PARAMS\0"
128 /* 1683 */ "generate-dh-params\0"
129 /* 1702 */ "Get the included PKCS #3 encoded Diffie-Hellman parameters.\0"
130 /* 1762 */ "GET_DH_PARAMS\0"
131 /* 1776 */ "get-dh-params\0"
132 /* 1790 */ "Print information PKCS #3 encoded Diffie-Hellman parameters\0"
133 /* 1850 */ "DH_INFO\0"
134 /* 1858 */ "dh-info\0"
135 /* 1866 */ "Loads a private key file\0"
136 /* 1891 */ "LOAD_PRIVKEY\0"
137 /* 1904 */ "load-privkey\0"
138 /* 1917 */ "Loads a public key file\0"
139 /* 1941 */ "LOAD_PUBKEY\0"
140 /* 1953 */ "load-pubkey\0"
141 /* 1965 */ "Loads a certificate request file\0"
142 /* 1998 */ "LOAD_REQUEST\0"
143 /* 2011 */ "load-request\0"
144 /* 2024 */ "Loads a certificate file\0"
145 /* 2049 */ "LOAD_CERTIFICATE\0"
146 /* 2066 */ "load-certificate\0"
147 /* 2083 */ "Loads the certificate authority's private key file\0"
148 /* 2134 */ "LOAD_CA_PRIVKEY\0"
149 /* 2150 */ "load-ca-privkey\0"
150 /* 2166 */ "Loads the certificate authority's certificate file\0"
151 /* 2217 */ "LOAD_CA_CERTIFICATE\0"
152 /* 2237 */ "load-ca-certificate\0"
153 /* 2257 */ "Password to use\0"
154 /* 2273 */ "PASSWORD\0"
155 /* 2282 */ "password\0"
156 /* 2291 */ "Enforce a NULL password\0"
157 /* 2315 */ "NULL_PASSWORD\0"
158 /* 2329 */ "null-password\0"
159 /* 2343 */ "Print information on the given certificate\0"
160 /* 2386 */ "CERTIFICATE_INFO\0"
161 /* 2403 */ "certificate-info\0"
162 /* 2420 */ "Print certificate's public key\0"
163 /* 2451 */ "CERTIFICATE_PUBKEY\0"
164 /* 2470 */ "certificate-pubkey\0"
165 /* 2489 */ "Print information on the given OpenPGP certificate\0"
166 /* 2540 */ "PGP_CERTIFICATE_INFO\0"
167 /* 2561 */ "pgp-certificate-info\0"
168 /* 2582 */ "Print information on the given OpenPGP keyring structure\0"
169 /* 2639 */ "PGP_RING_INFO\0"
170 /* 2653 */ "pgp-ring-info\0"
171 /* 2667 */ "Print information on the given CRL structure\0"
172 /* 2712 */ "CRL_INFO\0"
173 /* 2721 */ "crl-info\0"
174 /* 2730 */ "Print information on the given certificate request\0"
175 /* 2781 */ "CRQ_INFO\0"
176 /* 2790 */ "crq-info\0"
177 /* 2799 */ "Do not use extensions in certificate requests\0"
178 /* 2845 */ "NO_CRQ_EXTENSIONS\0"
179 /* 2863 */ "no-crq-extensions\0"
180 /* 2881 */ "Print information on a PKCS #12 structure\0"
181 /* 2923 */ "P12_INFO\0"
182 /* 2932 */ "p12-info\0"
183 /* 2941 */ "Print information on a PKCS #7 structure\0"
184 /* 2982 */ "P7_INFO\0"
185 /* 2990 */ "p7-info\0"
186 /* 2998 */ "Convert S/MIME to PKCS #7 structure\0"
187 /* 3034 */ "SMIME_TO_P7\0"
188 /* 3046 */ "smime-to-p7\0"
189 /* 3058 */ "Print information on a private key\0"
190 /* 3093 */ "KEY_INFO\0"
191 /* 3102 */ "key-info\0"
192 /* 3111 */ "Print information on an OpenPGP private key\0"
193 /* 3155 */ "PGP_KEY_INFO\0"
194 /* 3168 */ "pgp-key-info\0"
195 /* 3181 */ "Print information on a public key\0"
196 /* 3215 */ "PUBKEY_INFO\0"
197 /* 3227 */ "pubkey-info\0"
198 /* 3239 */ "Generate an X.509 version 1 certificate (with no extensions)\0"
199 /* 3300 */ "V1\0"
200 /* 3303 */ "v1\0"
201 /* 3306 */ "Generate a PKCS #12 structure\0"
202 /* 3336 */ "TO_P12\0"
203 /* 3343 */ "to-p12\0"
204 /* 3350 */ "Generate a PKCS #8 structure\0"
205 /* 3379 */ "TO_P8\0"
206 /* 3385 */ "to-p8\0"
207 /* 3391 */ "Use PKCS #8 format for private keys\0"
208 /* 3427 */ "PKCS8\0"
209 /* 3433 */ "pkcs8\0"
210 /* 3439 */ "Generate RSA key\0"
211 /* 3456 */ "RSA\0"
212 /* 3460 */ "rsa\0"
213 /* 3464 */ "Generate DSA key\0"
214 /* 3481 */ "DSA\0"
215 /* 3485 */ "dsa\0"
216 /* 3489 */ "Generate ECC (ECDSA) key\0"
217 /* 3514 */ "ECC\0"
218 /* 3518 */ "ecc\0"
219 /* 3522 */ "Hash algorithm to use for signing.\0"
220 /* 3557 */ "HASH\0"
221 /* 3562 */ "hash\0"
222 /* 3567 */ "Use DER format for input certificates and private keys.\0"
223 /* 3623 */ "INDER\0"
224 /* 3629 */ "no-inder\0"
225 /* 3638 */ "no\0"
226 /* 3641 */ "This is an alias for 'inder'\0"
227 /* 3670 */ "inraw\0"
228 /* 3676 */ "Use DER format for output certificates and private keys\0"
229 /* 3732 */ "OUTDER\0"
230 /* 3739 */ "no-outder\0"
231 /* 3749 */ "This is an alias for 'outder'\0"
232 /* 3779 */ "outraw\0"
233 /* 3786 */ "Specify the number of bits for key generate\0"
234 /* 3830 */ "BITS\0"
235 /* 3835 */ "bits\0"
236 /* 3840 */ "Specify the security level [low, legacy, normal, high, ultra].\0"
237 /* 3903 */ "SEC_PARAM\0"
238 /* 3913 */ "sec-param\0"
239 /* 3923 */ "No effect\0"
240 /* 3933 */ "DISABLE_QUICK_RANDOM\0"
241 /* 3954 */ "disable-quick-random\0"
242 /* 3975 */ "Template file to use for non-interactive operation\0"
243 /* 4026 */ "TEMPLATE\0"
244 /* 4035 */ "template\0"
245 /* 4044 */ "Cipher to use for PKCS #8 and #12 operations\0"
246 /* 4089 */ "PKCS_CIPHER\0"
247 /* 4101 */ "pkcs-cipher\0"
248 /* 4113 */ "Display extended usage information and exit\0"
249 /* 4157 */ "help\0"
250 /* 4162 */ "Extended usage information passed thru pager\0"
251 /* 4207 */ "more-help\0"
252 /* 4217 */ "Output version information and exit\0"
253 /* 4253 */ "version\0"
254 /* 4261 */ "CERTTOOL\0"
255 /* 4270 */ "certtool - GnuTLS PKCS #11 tool - Ver. @VERSION@\n"
256 "USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
257 /* 4377 */ "bug-gnutls@gnu.org\0"
258 /* 4396 */ "\n\n\0"
259 /* 4399 */ "\n"
260 "Tool to parse and generate X.509 certificates, requests and private keys.\n"
261 "It can be used interactively or non interactively by specifying the\n"
262 "template command line option.\n\0"
263 /* 4573 */ "certtool @VERSION@\0"
264 /* 4592 */ "certtool [options] [url]\n"
265 "certtool --help for usage instructions.\n";
268 * debug option description:
270 #define DEBUG_DESC (certtool_opt_strs+884)
271 #define DEBUG_NAME (certtool_opt_strs+902)
272 #define DEBUG_name (certtool_opt_strs+908)
273 #define DEBUG_FLAGS (OPTST_DISABLED \
274 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
277 * infile option description:
279 #define INFILE_DESC (certtool_opt_strs+914)
280 #define INFILE_NAME (certtool_opt_strs+925)
281 #define INFILE_name (certtool_opt_strs+932)
282 #define INFILE_FLAGS (OPTST_DISABLED \
283 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
286 * outfile option description:
288 #define OUTFILE_DESC (certtool_opt_strs+939)
289 #define OUTFILE_NAME (certtool_opt_strs+951)
290 #define OUTFILE_name (certtool_opt_strs+959)
291 #define OUTFILE_FLAGS (OPTST_DISABLED \
292 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
295 * generate-self-signed option description:
297 #define GENERATE_SELF_SIGNED_DESC (certtool_opt_strs+967)
298 #define GENERATE_SELF_SIGNED_NAME (certtool_opt_strs+1002)
299 #define GENERATE_SELF_SIGNED_name (certtool_opt_strs+1023)
300 #define GENERATE_SELF_SIGNED_FLAGS (OPTST_DISABLED)
303 * generate-certificate option description:
305 #define GENERATE_CERTIFICATE_DESC (certtool_opt_strs+1044)
306 #define GENERATE_CERTIFICATE_NAME (certtool_opt_strs+1074)
307 #define GENERATE_CERTIFICATE_name (certtool_opt_strs+1095)
308 #define GENERATE_CERTIFICATE_FLAGS (OPTST_DISABLED)
311 * generate-proxy option description:
313 #define GENERATE_PROXY_DESC (certtool_opt_strs+1116)
314 #define GENERATE_PROXY_NAME (certtool_opt_strs+1146)
315 #define GENERATE_PROXY_name (certtool_opt_strs+1161)
316 #define GENERATE_PROXY_FLAGS (OPTST_DISABLED)
319 * generate-crl option description:
321 #define GENERATE_CRL_DESC (certtool_opt_strs+1176)
322 #define GENERATE_CRL_NAME (certtool_opt_strs+1191)
323 #define GENERATE_CRL_name (certtool_opt_strs+1204)
324 #define GENERATE_CRL_FLAGS (OPTST_DISABLED)
327 * update-certificate option description:
329 #define UPDATE_CERTIFICATE_DESC (certtool_opt_strs+1217)
330 #define UPDATE_CERTIFICATE_NAME (certtool_opt_strs+1245)
331 #define UPDATE_CERTIFICATE_name (certtool_opt_strs+1264)
332 #define UPDATE_CERTIFICATE_FLAGS (OPTST_DISABLED)
335 * generate-privkey option description:
337 #define GENERATE_PRIVKEY_DESC (certtool_opt_strs+1283)
338 #define GENERATE_PRIVKEY_NAME (certtool_opt_strs+1306)
339 #define GENERATE_PRIVKEY_name (certtool_opt_strs+1323)
340 #define GENERATE_PRIVKEY_FLAGS (OPTST_DISABLED)
343 * generate-request option description:
345 #define GENERATE_REQUEST_DESC (certtool_opt_strs+1340)
346 #define GENERATE_REQUEST_NAME (certtool_opt_strs+1380)
347 #define GENERATE_REQUEST_name (certtool_opt_strs+1397)
348 #define GENERATE_REQUEST_FLAGS (OPTST_DISABLED)
351 * verify-chain option description:
353 #define VERIFY_CHAIN_DESC (certtool_opt_strs+1414)
354 #define VERIFY_CHAIN_NAME (certtool_opt_strs+1454)
355 #define VERIFY_CHAIN_name (certtool_opt_strs+1467)
356 #define VERIFY_CHAIN_FLAGS (OPTST_DISABLED)
359 * verify option description with
360 * "Must also have options" and "Incompatible options":
362 #define VERIFY_DESC (certtool_opt_strs+1480)
363 #define VERIFY_NAME (certtool_opt_strs+1541)
364 #define VERIFY_name (certtool_opt_strs+1548)
365 static int const aVerifyMustList[] = {
366 INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
367 #define VERIFY_FLAGS (OPTST_DISABLED)
370 * verify-crl option description with
371 * "Must also have options" and "Incompatible options":
373 #define VERIFY_CRL_DESC (certtool_opt_strs+1555)
374 #define VERIFY_CRL_NAME (certtool_opt_strs+1590)
375 #define VERIFY_CRL_name (certtool_opt_strs+1601)
376 static int const aVerify_CrlMustList[] = {
377 INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
378 #define VERIFY_CRL_FLAGS (OPTST_DISABLED)
381 * generate-dh-params option description:
383 #define GENERATE_DH_PARAMS_DESC (certtool_opt_strs+1612)
384 #define GENERATE_DH_PARAMS_NAME (certtool_opt_strs+1664)
385 #define GENERATE_DH_PARAMS_name (certtool_opt_strs+1683)
386 #define GENERATE_DH_PARAMS_FLAGS (OPTST_DISABLED)
389 * get-dh-params option description:
391 #define GET_DH_PARAMS_DESC (certtool_opt_strs+1702)
392 #define GET_DH_PARAMS_NAME (certtool_opt_strs+1762)
393 #define GET_DH_PARAMS_name (certtool_opt_strs+1776)
394 #define GET_DH_PARAMS_FLAGS (OPTST_DISABLED)
397 * dh-info option description:
399 #define DH_INFO_DESC (certtool_opt_strs+1790)
400 #define DH_INFO_NAME (certtool_opt_strs+1850)
401 #define DH_INFO_name (certtool_opt_strs+1858)
402 #define DH_INFO_FLAGS (OPTST_DISABLED)
405 * load-privkey option description:
407 #define LOAD_PRIVKEY_DESC (certtool_opt_strs+1866)
408 #define LOAD_PRIVKEY_NAME (certtool_opt_strs+1891)
409 #define LOAD_PRIVKEY_name (certtool_opt_strs+1904)
410 #define LOAD_PRIVKEY_FLAGS (OPTST_DISABLED \
411 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
414 * load-pubkey option description:
416 #define LOAD_PUBKEY_DESC (certtool_opt_strs+1917)
417 #define LOAD_PUBKEY_NAME (certtool_opt_strs+1941)
418 #define LOAD_PUBKEY_name (certtool_opt_strs+1953)
419 #define LOAD_PUBKEY_FLAGS (OPTST_DISABLED \
420 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
423 * load-request option description:
425 #define LOAD_REQUEST_DESC (certtool_opt_strs+1965)
426 #define LOAD_REQUEST_NAME (certtool_opt_strs+1998)
427 #define LOAD_REQUEST_name (certtool_opt_strs+2011)
428 #define LOAD_REQUEST_FLAGS (OPTST_DISABLED \
429 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
432 * load-certificate option description:
434 #define LOAD_CERTIFICATE_DESC (certtool_opt_strs+2024)
435 #define LOAD_CERTIFICATE_NAME (certtool_opt_strs+2049)
436 #define LOAD_CERTIFICATE_name (certtool_opt_strs+2066)
437 #define LOAD_CERTIFICATE_FLAGS (OPTST_DISABLED \
438 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
441 * load-ca-privkey option description:
443 #define LOAD_CA_PRIVKEY_DESC (certtool_opt_strs+2083)
444 #define LOAD_CA_PRIVKEY_NAME (certtool_opt_strs+2134)
445 #define LOAD_CA_PRIVKEY_name (certtool_opt_strs+2150)
446 #define LOAD_CA_PRIVKEY_FLAGS (OPTST_DISABLED \
447 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
450 * load-ca-certificate option description:
452 #define LOAD_CA_CERTIFICATE_DESC (certtool_opt_strs+2166)
453 #define LOAD_CA_CERTIFICATE_NAME (certtool_opt_strs+2217)
454 #define LOAD_CA_CERTIFICATE_name (certtool_opt_strs+2237)
455 #define LOAD_CA_CERTIFICATE_FLAGS (OPTST_DISABLED \
456 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
459 * password option description:
461 #define PASSWORD_DESC (certtool_opt_strs+2257)
462 #define PASSWORD_NAME (certtool_opt_strs+2273)
463 #define PASSWORD_name (certtool_opt_strs+2282)
464 #define PASSWORD_FLAGS (OPTST_DISABLED \
465 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
468 * null-password option description:
470 #define NULL_PASSWORD_DESC (certtool_opt_strs+2291)
471 #define NULL_PASSWORD_NAME (certtool_opt_strs+2315)
472 #define NULL_PASSWORD_name (certtool_opt_strs+2329)
473 #define NULL_PASSWORD_FLAGS (OPTST_DISABLED)
476 * certificate-info option description:
478 #define CERTIFICATE_INFO_DESC (certtool_opt_strs+2343)
479 #define CERTIFICATE_INFO_NAME (certtool_opt_strs+2386)
480 #define CERTIFICATE_INFO_name (certtool_opt_strs+2403)
481 #define CERTIFICATE_INFO_FLAGS (OPTST_DISABLED)
484 * certificate-pubkey option description:
486 #define CERTIFICATE_PUBKEY_DESC (certtool_opt_strs+2420)
487 #define CERTIFICATE_PUBKEY_NAME (certtool_opt_strs+2451)
488 #define CERTIFICATE_PUBKEY_name (certtool_opt_strs+2470)
489 #define CERTIFICATE_PUBKEY_FLAGS (OPTST_DISABLED)
492 * pgp-certificate-info option description:
494 #define PGP_CERTIFICATE_INFO_DESC (certtool_opt_strs+2489)
495 #define PGP_CERTIFICATE_INFO_NAME (certtool_opt_strs+2540)
496 #define PGP_CERTIFICATE_INFO_name (certtool_opt_strs+2561)
497 #define PGP_CERTIFICATE_INFO_FLAGS (OPTST_DISABLED)
500 * pgp-ring-info option description:
502 #define PGP_RING_INFO_DESC (certtool_opt_strs+2582)
503 #define PGP_RING_INFO_NAME (certtool_opt_strs+2639)
504 #define PGP_RING_INFO_name (certtool_opt_strs+2653)
505 #define PGP_RING_INFO_FLAGS (OPTST_DISABLED)
508 * crl-info option description:
510 #define CRL_INFO_DESC (certtool_opt_strs+2667)
511 #define CRL_INFO_NAME (certtool_opt_strs+2712)
512 #define CRL_INFO_name (certtool_opt_strs+2721)
513 #define CRL_INFO_FLAGS (OPTST_DISABLED)
516 * crq-info option description:
518 #define CRQ_INFO_DESC (certtool_opt_strs+2730)
519 #define CRQ_INFO_NAME (certtool_opt_strs+2781)
520 #define CRQ_INFO_name (certtool_opt_strs+2790)
521 #define CRQ_INFO_FLAGS (OPTST_DISABLED)
524 * no-crq-extensions option description:
526 #define NO_CRQ_EXTENSIONS_DESC (certtool_opt_strs+2799)
527 #define NO_CRQ_EXTENSIONS_NAME (certtool_opt_strs+2845)
528 #define NO_CRQ_EXTENSIONS_name (certtool_opt_strs+2863)
529 #define NO_CRQ_EXTENSIONS_FLAGS (OPTST_DISABLED)
532 * p12-info option description:
534 #define P12_INFO_DESC (certtool_opt_strs+2881)
535 #define P12_INFO_NAME (certtool_opt_strs+2923)
536 #define P12_INFO_name (certtool_opt_strs+2932)
537 #define P12_INFO_FLAGS (OPTST_DISABLED)
540 * p7-info option description:
542 #define P7_INFO_DESC (certtool_opt_strs+2941)
543 #define P7_INFO_NAME (certtool_opt_strs+2982)
544 #define P7_INFO_name (certtool_opt_strs+2990)
545 #define P7_INFO_FLAGS (OPTST_DISABLED)
548 * smime-to-p7 option description:
550 #define SMIME_TO_P7_DESC (certtool_opt_strs+2998)
551 #define SMIME_TO_P7_NAME (certtool_opt_strs+3034)
552 #define SMIME_TO_P7_name (certtool_opt_strs+3046)
553 #define SMIME_TO_P7_FLAGS (OPTST_DISABLED)
556 * key-info option description:
558 #define KEY_INFO_DESC (certtool_opt_strs+3058)
559 #define KEY_INFO_NAME (certtool_opt_strs+3093)
560 #define KEY_INFO_name (certtool_opt_strs+3102)
561 #define KEY_INFO_FLAGS (OPTST_DISABLED)
564 * pgp-key-info option description:
566 #define PGP_KEY_INFO_DESC (certtool_opt_strs+3111)
567 #define PGP_KEY_INFO_NAME (certtool_opt_strs+3155)
568 #define PGP_KEY_INFO_name (certtool_opt_strs+3168)
569 #define PGP_KEY_INFO_FLAGS (OPTST_DISABLED)
572 * pubkey-info option description:
574 #define PUBKEY_INFO_DESC (certtool_opt_strs+3181)
575 #define PUBKEY_INFO_NAME (certtool_opt_strs+3215)
576 #define PUBKEY_INFO_name (certtool_opt_strs+3227)
577 #define PUBKEY_INFO_FLAGS (OPTST_DISABLED)
580 * v1 option description:
582 #define V1_DESC (certtool_opt_strs+3239)
583 #define V1_NAME (certtool_opt_strs+3300)
584 #define V1_name (certtool_opt_strs+3303)
585 #define V1_FLAGS (OPTST_DISABLED)
588 * to-p12 option description with
589 * "Must also have options" and "Incompatible options":
591 #define TO_P12_DESC (certtool_opt_strs+3306)
592 #define TO_P12_NAME (certtool_opt_strs+3336)
593 #define TO_P12_name (certtool_opt_strs+3343)
594 static int const aTo_P12MustList[] = {
595 INDEX_OPT_LOAD_CERTIFICATE, NO_EQUIVALENT };
596 #define TO_P12_FLAGS (OPTST_DISABLED)
599 * to-p8 option description:
601 #define TO_P8_DESC (certtool_opt_strs+3350)
602 #define TO_P8_NAME (certtool_opt_strs+3379)
603 #define TO_P8_name (certtool_opt_strs+3385)
604 #define TO_P8_FLAGS (OPTST_DISABLED)
607 * pkcs8 option description:
609 #define PKCS8_DESC (certtool_opt_strs+3391)
610 #define PKCS8_NAME (certtool_opt_strs+3427)
611 #define PKCS8_name (certtool_opt_strs+3433)
612 #define PKCS8_FLAGS (OPTST_DISABLED)
615 * rsa option description:
617 #define RSA_DESC (certtool_opt_strs+3439)
618 #define RSA_NAME (certtool_opt_strs+3456)
619 #define RSA_name (certtool_opt_strs+3460)
620 #define RSA_FLAGS (OPTST_DISABLED)
623 * dsa option description:
625 #define DSA_DESC (certtool_opt_strs+3464)
626 #define DSA_NAME (certtool_opt_strs+3481)
627 #define DSA_name (certtool_opt_strs+3485)
628 #define DSA_FLAGS (OPTST_DISABLED)
631 * ecc option description:
633 #define ECC_DESC (certtool_opt_strs+3489)
634 #define ECC_NAME (certtool_opt_strs+3514)
635 #define ECC_name (certtool_opt_strs+3518)
636 #define ECC_FLAGS (OPTST_DISABLED)
639 * hash option description:
641 #define HASH_DESC (certtool_opt_strs+3522)
642 #define HASH_NAME (certtool_opt_strs+3557)
643 #define HASH_name (certtool_opt_strs+3562)
644 #define HASH_FLAGS (OPTST_DISABLED \
645 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
648 * inder option description:
650 #define INDER_DESC (certtool_opt_strs+3567)
651 #define INDER_NAME (certtool_opt_strs+3623)
652 #define NOT_INDER_name (certtool_opt_strs+3629)
653 #define NOT_INDER_PFX (certtool_opt_strs+3638)
654 #define INDER_name (NOT_INDER_name + 3)
655 #define INDER_FLAGS (OPTST_DISABLED)
658 * inraw option description:
660 #define INRAW_DESC (certtool_opt_strs+3641)
661 #define INRAW_NAME NULL
662 #define INRAW_name (certtool_opt_strs+3670)
663 #define INRAW_FLAGS (INDER_FLAGS | OPTST_ALIAS)
666 * outder option description:
668 #define OUTDER_DESC (certtool_opt_strs+3676)
669 #define OUTDER_NAME (certtool_opt_strs+3732)
670 #define NOT_OUTDER_name (certtool_opt_strs+3739)
671 #define NOT_OUTDER_PFX (certtool_opt_strs+3638)
672 #define OUTDER_name (NOT_OUTDER_name + 3)
673 #define OUTDER_FLAGS (OPTST_DISABLED)
676 * outraw option description:
678 #define OUTRAW_DESC (certtool_opt_strs+3749)
679 #define OUTRAW_NAME NULL
680 #define OUTRAW_name (certtool_opt_strs+3779)
681 #define OUTRAW_FLAGS (OUTDER_FLAGS | OPTST_ALIAS)
684 * bits option description:
686 #define BITS_DESC (certtool_opt_strs+3786)
687 #define BITS_NAME (certtool_opt_strs+3830)
688 #define BITS_name (certtool_opt_strs+3835)
689 #define BITS_FLAGS (OPTST_DISABLED \
690 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
693 * sec-param option description:
695 #define SEC_PARAM_DESC (certtool_opt_strs+3840)
696 #define SEC_PARAM_NAME (certtool_opt_strs+3903)
697 #define SEC_PARAM_name (certtool_opt_strs+3913)
698 #define SEC_PARAM_FLAGS (OPTST_DISABLED \
699 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
702 * disable-quick-random option description:
704 #define DISABLE_QUICK_RANDOM_DESC (certtool_opt_strs+3923)
705 #define DISABLE_QUICK_RANDOM_NAME (certtool_opt_strs+3933)
706 #define DISABLE_QUICK_RANDOM_name (certtool_opt_strs+3954)
707 #define DISABLE_QUICK_RANDOM_FLAGS (OPTST_DISABLED)
710 * template option description:
712 #define TEMPLATE_DESC (certtool_opt_strs+3975)
713 #define TEMPLATE_NAME (certtool_opt_strs+4026)
714 #define TEMPLATE_name (certtool_opt_strs+4035)
715 #define TEMPLATE_FLAGS (OPTST_DISABLED \
716 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
719 * pkcs-cipher option description:
721 #define PKCS_CIPHER_DESC (certtool_opt_strs+4044)
722 #define PKCS_CIPHER_NAME (certtool_opt_strs+4089)
723 #define PKCS_CIPHER_name (certtool_opt_strs+4101)
724 #define PKCS_CIPHER_FLAGS (OPTST_DISABLED \
725 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
728 * Help/More_Help/Version option descriptions:
730 #define HELP_DESC (certtool_opt_strs+4113)
731 #define HELP_name (certtool_opt_strs+4157)
732 #ifdef HAVE_WORKING_FORK
733 #define MORE_HELP_DESC (certtool_opt_strs+4162)
734 #define MORE_HELP_name (certtool_opt_strs+4207)
735 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
736 #else
737 #define MORE_HELP_DESC NULL
738 #define MORE_HELP_name NULL
739 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
740 #endif
741 #ifdef NO_OPTIONAL_OPT_ARGS
742 # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
743 #else
744 # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
745 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
746 #endif
747 #define VER_DESC (certtool_opt_strs+4217)
748 #define VER_name (certtool_opt_strs+4253)
750 * Declare option callback procedures
752 extern tOptProc
753 optionBooleanVal, optionNestedVal, optionNumericVal,
754 optionPagedUsage, optionPrintVersion, optionResetOpt,
755 optionStackArg, optionTimeDate, optionTimeVal,
756 optionUnstackArg, optionVendorOption;
757 static tOptProc
758 doOptDebug, doOptInfile, doOptInraw,
759 doOptLoad_Request, doOptOutraw, doOptTemplate,
760 doUsageOpt;
761 #define VER_PROC optionPrintVersion
763 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
765 * Define the certtool Option Descriptions.
766 * This is an array of OPTION_CT entries, one for each
767 * option that the certtool program responds to.
769 static tOptDesc optDesc[OPTION_CT] = {
770 { /* entry idx, value */ 0, VALUE_OPT_DEBUG,
771 /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
772 /* equivalenced to */ NO_EQUIVALENT,
773 /* min, max, act ct */ 0, 1, 0,
774 /* opt state flags */ DEBUG_FLAGS, 0,
775 /* last opt argumnt */ { NULL }, /* --debug */
776 /* arg list/cookie */ NULL,
777 /* must/cannot opts */ NULL, NULL,
778 /* option proc */ doOptDebug,
779 /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
780 /* disablement strs */ NULL, NULL },
782 { /* entry idx, value */ 1, VALUE_OPT_INFILE,
783 /* equiv idx, value */ 1, VALUE_OPT_INFILE,
784 /* equivalenced to */ NO_EQUIVALENT,
785 /* min, max, act ct */ 0, 1, 0,
786 /* opt state flags */ INFILE_FLAGS, 0,
787 /* last opt argumnt */ { NULL }, /* --infile */
788 /* arg list/cookie */ NULL,
789 /* must/cannot opts */ NULL, NULL,
790 /* option proc */ doOptInfile,
791 /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
792 /* disablement strs */ NULL, NULL },
794 { /* entry idx, value */ 2, VALUE_OPT_OUTFILE,
795 /* equiv idx, value */ 2, VALUE_OPT_OUTFILE,
796 /* equivalenced to */ NO_EQUIVALENT,
797 /* min, max, act ct */ 0, 1, 0,
798 /* opt state flags */ OUTFILE_FLAGS, 0,
799 /* last opt argumnt */ { NULL }, /* --outfile */
800 /* arg list/cookie */ NULL,
801 /* must/cannot opts */ NULL, NULL,
802 /* option proc */ NULL,
803 /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
804 /* disablement strs */ NULL, NULL },
806 { /* entry idx, value */ 3, VALUE_OPT_GENERATE_SELF_SIGNED,
807 /* equiv idx, value */ 3, VALUE_OPT_GENERATE_SELF_SIGNED,
808 /* equivalenced to */ NO_EQUIVALENT,
809 /* min, max, act ct */ 0, 1, 0,
810 /* opt state flags */ GENERATE_SELF_SIGNED_FLAGS, 0,
811 /* last opt argumnt */ { NULL }, /* --generate-self-signed */
812 /* arg list/cookie */ NULL,
813 /* must/cannot opts */ NULL, NULL,
814 /* option proc */ NULL,
815 /* desc, NAME, name */ GENERATE_SELF_SIGNED_DESC, GENERATE_SELF_SIGNED_NAME, GENERATE_SELF_SIGNED_name,
816 /* disablement strs */ NULL, NULL },
818 { /* entry idx, value */ 4, VALUE_OPT_GENERATE_CERTIFICATE,
819 /* equiv idx, value */ 4, VALUE_OPT_GENERATE_CERTIFICATE,
820 /* equivalenced to */ NO_EQUIVALENT,
821 /* min, max, act ct */ 0, 1, 0,
822 /* opt state flags */ GENERATE_CERTIFICATE_FLAGS, 0,
823 /* last opt argumnt */ { NULL }, /* --generate-certificate */
824 /* arg list/cookie */ NULL,
825 /* must/cannot opts */ NULL, NULL,
826 /* option proc */ NULL,
827 /* desc, NAME, name */ GENERATE_CERTIFICATE_DESC, GENERATE_CERTIFICATE_NAME, GENERATE_CERTIFICATE_name,
828 /* disablement strs */ NULL, NULL },
830 { /* entry idx, value */ 5, VALUE_OPT_GENERATE_PROXY,
831 /* equiv idx, value */ 5, VALUE_OPT_GENERATE_PROXY,
832 /* equivalenced to */ NO_EQUIVALENT,
833 /* min, max, act ct */ 0, 1, 0,
834 /* opt state flags */ GENERATE_PROXY_FLAGS, 0,
835 /* last opt argumnt */ { NULL }, /* --generate-proxy */
836 /* arg list/cookie */ NULL,
837 /* must/cannot opts */ NULL, NULL,
838 /* option proc */ NULL,
839 /* desc, NAME, name */ GENERATE_PROXY_DESC, GENERATE_PROXY_NAME, GENERATE_PROXY_name,
840 /* disablement strs */ NULL, NULL },
842 { /* entry idx, value */ 6, VALUE_OPT_GENERATE_CRL,
843 /* equiv idx, value */ 6, VALUE_OPT_GENERATE_CRL,
844 /* equivalenced to */ NO_EQUIVALENT,
845 /* min, max, act ct */ 0, 1, 0,
846 /* opt state flags */ GENERATE_CRL_FLAGS, 0,
847 /* last opt argumnt */ { NULL }, /* --generate-crl */
848 /* arg list/cookie */ NULL,
849 /* must/cannot opts */ NULL, NULL,
850 /* option proc */ NULL,
851 /* desc, NAME, name */ GENERATE_CRL_DESC, GENERATE_CRL_NAME, GENERATE_CRL_name,
852 /* disablement strs */ NULL, NULL },
854 { /* entry idx, value */ 7, VALUE_OPT_UPDATE_CERTIFICATE,
855 /* equiv idx, value */ 7, VALUE_OPT_UPDATE_CERTIFICATE,
856 /* equivalenced to */ NO_EQUIVALENT,
857 /* min, max, act ct */ 0, 1, 0,
858 /* opt state flags */ UPDATE_CERTIFICATE_FLAGS, 0,
859 /* last opt argumnt */ { NULL }, /* --update-certificate */
860 /* arg list/cookie */ NULL,
861 /* must/cannot opts */ NULL, NULL,
862 /* option proc */ NULL,
863 /* desc, NAME, name */ UPDATE_CERTIFICATE_DESC, UPDATE_CERTIFICATE_NAME, UPDATE_CERTIFICATE_name,
864 /* disablement strs */ NULL, NULL },
866 { /* entry idx, value */ 8, VALUE_OPT_GENERATE_PRIVKEY,
867 /* equiv idx, value */ 8, VALUE_OPT_GENERATE_PRIVKEY,
868 /* equivalenced to */ NO_EQUIVALENT,
869 /* min, max, act ct */ 0, 1, 0,
870 /* opt state flags */ GENERATE_PRIVKEY_FLAGS, 0,
871 /* last opt argumnt */ { NULL }, /* --generate-privkey */
872 /* arg list/cookie */ NULL,
873 /* must/cannot opts */ NULL, NULL,
874 /* option proc */ NULL,
875 /* desc, NAME, name */ GENERATE_PRIVKEY_DESC, GENERATE_PRIVKEY_NAME, GENERATE_PRIVKEY_name,
876 /* disablement strs */ NULL, NULL },
878 { /* entry idx, value */ 9, VALUE_OPT_GENERATE_REQUEST,
879 /* equiv idx, value */ 9, VALUE_OPT_GENERATE_REQUEST,
880 /* equivalenced to */ NO_EQUIVALENT,
881 /* min, max, act ct */ 0, 1, 0,
882 /* opt state flags */ GENERATE_REQUEST_FLAGS, 0,
883 /* last opt argumnt */ { NULL }, /* --generate-request */
884 /* arg list/cookie */ NULL,
885 /* must/cannot opts */ NULL, NULL,
886 /* option proc */ NULL,
887 /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, GENERATE_REQUEST_name,
888 /* disablement strs */ NULL, NULL },
890 { /* entry idx, value */ 10, VALUE_OPT_VERIFY_CHAIN,
891 /* equiv idx, value */ 10, VALUE_OPT_VERIFY_CHAIN,
892 /* equivalenced to */ NO_EQUIVALENT,
893 /* min, max, act ct */ 0, 1, 0,
894 /* opt state flags */ VERIFY_CHAIN_FLAGS, 0,
895 /* last opt argumnt */ { NULL }, /* --verify-chain */
896 /* arg list/cookie */ NULL,
897 /* must/cannot opts */ NULL, NULL,
898 /* option proc */ NULL,
899 /* desc, NAME, name */ VERIFY_CHAIN_DESC, VERIFY_CHAIN_NAME, VERIFY_CHAIN_name,
900 /* disablement strs */ NULL, NULL },
902 { /* entry idx, value */ 11, VALUE_OPT_VERIFY,
903 /* equiv idx, value */ 11, VALUE_OPT_VERIFY,
904 /* equivalenced to */ NO_EQUIVALENT,
905 /* min, max, act ct */ 0, 1, 0,
906 /* opt state flags */ VERIFY_FLAGS, 0,
907 /* last opt argumnt */ { NULL }, /* --verify */
908 /* arg list/cookie */ NULL,
909 /* must/cannot opts */ aVerifyMustList, NULL,
910 /* option proc */ NULL,
911 /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name,
912 /* disablement strs */ NULL, NULL },
914 { /* entry idx, value */ 12, VALUE_OPT_VERIFY_CRL,
915 /* equiv idx, value */ 12, VALUE_OPT_VERIFY_CRL,
916 /* equivalenced to */ NO_EQUIVALENT,
917 /* min, max, act ct */ 0, 1, 0,
918 /* opt state flags */ VERIFY_CRL_FLAGS, 0,
919 /* last opt argumnt */ { NULL }, /* --verify-crl */
920 /* arg list/cookie */ NULL,
921 /* must/cannot opts */ aVerify_CrlMustList, NULL,
922 /* option proc */ NULL,
923 /* desc, NAME, name */ VERIFY_CRL_DESC, VERIFY_CRL_NAME, VERIFY_CRL_name,
924 /* disablement strs */ NULL, NULL },
926 { /* entry idx, value */ 13, VALUE_OPT_GENERATE_DH_PARAMS,
927 /* equiv idx, value */ 13, VALUE_OPT_GENERATE_DH_PARAMS,
928 /* equivalenced to */ NO_EQUIVALENT,
929 /* min, max, act ct */ 0, 1, 0,
930 /* opt state flags */ GENERATE_DH_PARAMS_FLAGS, 0,
931 /* last opt argumnt */ { NULL }, /* --generate-dh-params */
932 /* arg list/cookie */ NULL,
933 /* must/cannot opts */ NULL, NULL,
934 /* option proc */ NULL,
935 /* desc, NAME, name */ GENERATE_DH_PARAMS_DESC, GENERATE_DH_PARAMS_NAME, GENERATE_DH_PARAMS_name,
936 /* disablement strs */ NULL, NULL },
938 { /* entry idx, value */ 14, VALUE_OPT_GET_DH_PARAMS,
939 /* equiv idx, value */ 14, VALUE_OPT_GET_DH_PARAMS,
940 /* equivalenced to */ NO_EQUIVALENT,
941 /* min, max, act ct */ 0, 1, 0,
942 /* opt state flags */ GET_DH_PARAMS_FLAGS, 0,
943 /* last opt argumnt */ { NULL }, /* --get-dh-params */
944 /* arg list/cookie */ NULL,
945 /* must/cannot opts */ NULL, NULL,
946 /* option proc */ NULL,
947 /* desc, NAME, name */ GET_DH_PARAMS_DESC, GET_DH_PARAMS_NAME, GET_DH_PARAMS_name,
948 /* disablement strs */ NULL, NULL },
950 { /* entry idx, value */ 15, VALUE_OPT_DH_INFO,
951 /* equiv idx, value */ 15, VALUE_OPT_DH_INFO,
952 /* equivalenced to */ NO_EQUIVALENT,
953 /* min, max, act ct */ 0, 1, 0,
954 /* opt state flags */ DH_INFO_FLAGS, 0,
955 /* last opt argumnt */ { NULL }, /* --dh-info */
956 /* arg list/cookie */ NULL,
957 /* must/cannot opts */ NULL, NULL,
958 /* option proc */ NULL,
959 /* desc, NAME, name */ DH_INFO_DESC, DH_INFO_NAME, DH_INFO_name,
960 /* disablement strs */ NULL, NULL },
962 { /* entry idx, value */ 16, VALUE_OPT_LOAD_PRIVKEY,
963 /* equiv idx, value */ 16, VALUE_OPT_LOAD_PRIVKEY,
964 /* equivalenced to */ NO_EQUIVALENT,
965 /* min, max, act ct */ 0, 1, 0,
966 /* opt state flags */ LOAD_PRIVKEY_FLAGS, 0,
967 /* last opt argumnt */ { NULL }, /* --load-privkey */
968 /* arg list/cookie */ NULL,
969 /* must/cannot opts */ NULL, NULL,
970 /* option proc */ NULL,
971 /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, LOAD_PRIVKEY_name,
972 /* disablement strs */ NULL, NULL },
974 { /* entry idx, value */ 17, VALUE_OPT_LOAD_PUBKEY,
975 /* equiv idx, value */ 17, VALUE_OPT_LOAD_PUBKEY,
976 /* equivalenced to */ NO_EQUIVALENT,
977 /* min, max, act ct */ 0, 1, 0,
978 /* opt state flags */ LOAD_PUBKEY_FLAGS, 0,
979 /* last opt argumnt */ { NULL }, /* --load-pubkey */
980 /* arg list/cookie */ NULL,
981 /* must/cannot opts */ NULL, NULL,
982 /* option proc */ NULL,
983 /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, LOAD_PUBKEY_name,
984 /* disablement strs */ NULL, NULL },
986 { /* entry idx, value */ 18, VALUE_OPT_LOAD_REQUEST,
987 /* equiv idx, value */ 18, VALUE_OPT_LOAD_REQUEST,
988 /* equivalenced to */ NO_EQUIVALENT,
989 /* min, max, act ct */ 0, 1, 0,
990 /* opt state flags */ LOAD_REQUEST_FLAGS, 0,
991 /* last opt argumnt */ { NULL }, /* --load-request */
992 /* arg list/cookie */ NULL,
993 /* must/cannot opts */ NULL, NULL,
994 /* option proc */ doOptLoad_Request,
995 /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, LOAD_REQUEST_name,
996 /* disablement strs */ NULL, NULL },
998 { /* entry idx, value */ 19, VALUE_OPT_LOAD_CERTIFICATE,
999 /* equiv idx, value */ 19, VALUE_OPT_LOAD_CERTIFICATE,
1000 /* equivalenced to */ NO_EQUIVALENT,
1001 /* min, max, act ct */ 0, 1, 0,
1002 /* opt state flags */ LOAD_CERTIFICATE_FLAGS, 0,
1003 /* last opt argumnt */ { NULL }, /* --load-certificate */
1004 /* arg list/cookie */ NULL,
1005 /* must/cannot opts */ NULL, NULL,
1006 /* option proc */ NULL,
1007 /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, LOAD_CERTIFICATE_name,
1008 /* disablement strs */ NULL, NULL },
1010 { /* entry idx, value */ 20, VALUE_OPT_LOAD_CA_PRIVKEY,
1011 /* equiv idx, value */ 20, VALUE_OPT_LOAD_CA_PRIVKEY,
1012 /* equivalenced to */ NO_EQUIVALENT,
1013 /* min, max, act ct */ 0, 1, 0,
1014 /* opt state flags */ LOAD_CA_PRIVKEY_FLAGS, 0,
1015 /* last opt argumnt */ { NULL }, /* --load-ca-privkey */
1016 /* arg list/cookie */ NULL,
1017 /* must/cannot opts */ NULL, NULL,
1018 /* option proc */ NULL,
1019 /* desc, NAME, name */ LOAD_CA_PRIVKEY_DESC, LOAD_CA_PRIVKEY_NAME, LOAD_CA_PRIVKEY_name,
1020 /* disablement strs */ NULL, NULL },
1022 { /* entry idx, value */ 21, VALUE_OPT_LOAD_CA_CERTIFICATE,
1023 /* equiv idx, value */ 21, VALUE_OPT_LOAD_CA_CERTIFICATE,
1024 /* equivalenced to */ NO_EQUIVALENT,
1025 /* min, max, act ct */ 0, 1, 0,
1026 /* opt state flags */ LOAD_CA_CERTIFICATE_FLAGS, 0,
1027 /* last opt argumnt */ { NULL }, /* --load-ca-certificate */
1028 /* arg list/cookie */ NULL,
1029 /* must/cannot opts */ NULL, NULL,
1030 /* option proc */ NULL,
1031 /* desc, NAME, name */ LOAD_CA_CERTIFICATE_DESC, LOAD_CA_CERTIFICATE_NAME, LOAD_CA_CERTIFICATE_name,
1032 /* disablement strs */ NULL, NULL },
1034 { /* entry idx, value */ 22, VALUE_OPT_PASSWORD,
1035 /* equiv idx, value */ 22, VALUE_OPT_PASSWORD,
1036 /* equivalenced to */ NO_EQUIVALENT,
1037 /* min, max, act ct */ 0, 1, 0,
1038 /* opt state flags */ PASSWORD_FLAGS, 0,
1039 /* last opt argumnt */ { NULL }, /* --password */
1040 /* arg list/cookie */ NULL,
1041 /* must/cannot opts */ NULL, NULL,
1042 /* option proc */ NULL,
1043 /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
1044 /* disablement strs */ NULL, NULL },
1046 { /* entry idx, value */ 23, VALUE_OPT_NULL_PASSWORD,
1047 /* equiv idx, value */ 23, VALUE_OPT_NULL_PASSWORD,
1048 /* equivalenced to */ NO_EQUIVALENT,
1049 /* min, max, act ct */ 0, 1, 0,
1050 /* opt state flags */ NULL_PASSWORD_FLAGS, 0,
1051 /* last opt argumnt */ { NULL }, /* --null-password */
1052 /* arg list/cookie */ NULL,
1053 /* must/cannot opts */ NULL, NULL,
1054 /* option proc */ NULL,
1055 /* desc, NAME, name */ NULL_PASSWORD_DESC, NULL_PASSWORD_NAME, NULL_PASSWORD_name,
1056 /* disablement strs */ NULL, NULL },
1058 { /* entry idx, value */ 24, VALUE_OPT_CERTIFICATE_INFO,
1059 /* equiv idx, value */ 24, VALUE_OPT_CERTIFICATE_INFO,
1060 /* equivalenced to */ NO_EQUIVALENT,
1061 /* min, max, act ct */ 0, 1, 0,
1062 /* opt state flags */ CERTIFICATE_INFO_FLAGS, 0,
1063 /* last opt argumnt */ { NULL }, /* --certificate-info */
1064 /* arg list/cookie */ NULL,
1065 /* must/cannot opts */ NULL, NULL,
1066 /* option proc */ NULL,
1067 /* desc, NAME, name */ CERTIFICATE_INFO_DESC, CERTIFICATE_INFO_NAME, CERTIFICATE_INFO_name,
1068 /* disablement strs */ NULL, NULL },
1070 { /* entry idx, value */ 25, VALUE_OPT_CERTIFICATE_PUBKEY,
1071 /* equiv idx, value */ 25, VALUE_OPT_CERTIFICATE_PUBKEY,
1072 /* equivalenced to */ NO_EQUIVALENT,
1073 /* min, max, act ct */ 0, 1, 0,
1074 /* opt state flags */ CERTIFICATE_PUBKEY_FLAGS, 0,
1075 /* last opt argumnt */ { NULL }, /* --certificate-pubkey */
1076 /* arg list/cookie */ NULL,
1077 /* must/cannot opts */ NULL, NULL,
1078 /* option proc */ NULL,
1079 /* desc, NAME, name */ CERTIFICATE_PUBKEY_DESC, CERTIFICATE_PUBKEY_NAME, CERTIFICATE_PUBKEY_name,
1080 /* disablement strs */ NULL, NULL },
1082 { /* entry idx, value */ 26, VALUE_OPT_PGP_CERTIFICATE_INFO,
1083 /* equiv idx, value */ 26, VALUE_OPT_PGP_CERTIFICATE_INFO,
1084 /* equivalenced to */ NO_EQUIVALENT,
1085 /* min, max, act ct */ 0, 1, 0,
1086 /* opt state flags */ PGP_CERTIFICATE_INFO_FLAGS, 0,
1087 /* last opt argumnt */ { NULL }, /* --pgp-certificate-info */
1088 /* arg list/cookie */ NULL,
1089 /* must/cannot opts */ NULL, NULL,
1090 /* option proc */ NULL,
1091 /* desc, NAME, name */ PGP_CERTIFICATE_INFO_DESC, PGP_CERTIFICATE_INFO_NAME, PGP_CERTIFICATE_INFO_name,
1092 /* disablement strs */ NULL, NULL },
1094 { /* entry idx, value */ 27, VALUE_OPT_PGP_RING_INFO,
1095 /* equiv idx, value */ 27, VALUE_OPT_PGP_RING_INFO,
1096 /* equivalenced to */ NO_EQUIVALENT,
1097 /* min, max, act ct */ 0, 1, 0,
1098 /* opt state flags */ PGP_RING_INFO_FLAGS, 0,
1099 /* last opt argumnt */ { NULL }, /* --pgp-ring-info */
1100 /* arg list/cookie */ NULL,
1101 /* must/cannot opts */ NULL, NULL,
1102 /* option proc */ NULL,
1103 /* desc, NAME, name */ PGP_RING_INFO_DESC, PGP_RING_INFO_NAME, PGP_RING_INFO_name,
1104 /* disablement strs */ NULL, NULL },
1106 { /* entry idx, value */ 28, VALUE_OPT_CRL_INFO,
1107 /* equiv idx, value */ 28, VALUE_OPT_CRL_INFO,
1108 /* equivalenced to */ NO_EQUIVALENT,
1109 /* min, max, act ct */ 0, 1, 0,
1110 /* opt state flags */ CRL_INFO_FLAGS, 0,
1111 /* last opt argumnt */ { NULL }, /* --crl-info */
1112 /* arg list/cookie */ NULL,
1113 /* must/cannot opts */ NULL, NULL,
1114 /* option proc */ NULL,
1115 /* desc, NAME, name */ CRL_INFO_DESC, CRL_INFO_NAME, CRL_INFO_name,
1116 /* disablement strs */ NULL, NULL },
1118 { /* entry idx, value */ 29, VALUE_OPT_CRQ_INFO,
1119 /* equiv idx, value */ 29, VALUE_OPT_CRQ_INFO,
1120 /* equivalenced to */ NO_EQUIVALENT,
1121 /* min, max, act ct */ 0, 1, 0,
1122 /* opt state flags */ CRQ_INFO_FLAGS, 0,
1123 /* last opt argumnt */ { NULL }, /* --crq-info */
1124 /* arg list/cookie */ NULL,
1125 /* must/cannot opts */ NULL, NULL,
1126 /* option proc */ NULL,
1127 /* desc, NAME, name */ CRQ_INFO_DESC, CRQ_INFO_NAME, CRQ_INFO_name,
1128 /* disablement strs */ NULL, NULL },
1130 { /* entry idx, value */ 30, VALUE_OPT_NO_CRQ_EXTENSIONS,
1131 /* equiv idx, value */ 30, VALUE_OPT_NO_CRQ_EXTENSIONS,
1132 /* equivalenced to */ NO_EQUIVALENT,
1133 /* min, max, act ct */ 0, 1, 0,
1134 /* opt state flags */ NO_CRQ_EXTENSIONS_FLAGS, 0,
1135 /* last opt argumnt */ { NULL }, /* --no-crq-extensions */
1136 /* arg list/cookie */ NULL,
1137 /* must/cannot opts */ NULL, NULL,
1138 /* option proc */ NULL,
1139 /* desc, NAME, name */ NO_CRQ_EXTENSIONS_DESC, NO_CRQ_EXTENSIONS_NAME, NO_CRQ_EXTENSIONS_name,
1140 /* disablement strs */ NULL, NULL },
1142 { /* entry idx, value */ 31, VALUE_OPT_P12_INFO,
1143 /* equiv idx, value */ 31, VALUE_OPT_P12_INFO,
1144 /* equivalenced to */ NO_EQUIVALENT,
1145 /* min, max, act ct */ 0, 1, 0,
1146 /* opt state flags */ P12_INFO_FLAGS, 0,
1147 /* last opt argumnt */ { NULL }, /* --p12-info */
1148 /* arg list/cookie */ NULL,
1149 /* must/cannot opts */ NULL, NULL,
1150 /* option proc */ NULL,
1151 /* desc, NAME, name */ P12_INFO_DESC, P12_INFO_NAME, P12_INFO_name,
1152 /* disablement strs */ NULL, NULL },
1154 { /* entry idx, value */ 32, VALUE_OPT_P7_INFO,
1155 /* equiv idx, value */ 32, VALUE_OPT_P7_INFO,
1156 /* equivalenced to */ NO_EQUIVALENT,
1157 /* min, max, act ct */ 0, 1, 0,
1158 /* opt state flags */ P7_INFO_FLAGS, 0,
1159 /* last opt argumnt */ { NULL }, /* --p7-info */
1160 /* arg list/cookie */ NULL,
1161 /* must/cannot opts */ NULL, NULL,
1162 /* option proc */ NULL,
1163 /* desc, NAME, name */ P7_INFO_DESC, P7_INFO_NAME, P7_INFO_name,
1164 /* disablement strs */ NULL, NULL },
1166 { /* entry idx, value */ 33, VALUE_OPT_SMIME_TO_P7,
1167 /* equiv idx, value */ 33, VALUE_OPT_SMIME_TO_P7,
1168 /* equivalenced to */ NO_EQUIVALENT,
1169 /* min, max, act ct */ 0, 1, 0,
1170 /* opt state flags */ SMIME_TO_P7_FLAGS, 0,
1171 /* last opt argumnt */ { NULL }, /* --smime-to-p7 */
1172 /* arg list/cookie */ NULL,
1173 /* must/cannot opts */ NULL, NULL,
1174 /* option proc */ NULL,
1175 /* desc, NAME, name */ SMIME_TO_P7_DESC, SMIME_TO_P7_NAME, SMIME_TO_P7_name,
1176 /* disablement strs */ NULL, NULL },
1178 { /* entry idx, value */ 34, VALUE_OPT_KEY_INFO,
1179 /* equiv idx, value */ 34, VALUE_OPT_KEY_INFO,
1180 /* equivalenced to */ NO_EQUIVALENT,
1181 /* min, max, act ct */ 0, 1, 0,
1182 /* opt state flags */ KEY_INFO_FLAGS, 0,
1183 /* last opt argumnt */ { NULL }, /* --key-info */
1184 /* arg list/cookie */ NULL,
1185 /* must/cannot opts */ NULL, NULL,
1186 /* option proc */ NULL,
1187 /* desc, NAME, name */ KEY_INFO_DESC, KEY_INFO_NAME, KEY_INFO_name,
1188 /* disablement strs */ NULL, NULL },
1190 { /* entry idx, value */ 35, VALUE_OPT_PGP_KEY_INFO,
1191 /* equiv idx, value */ 35, VALUE_OPT_PGP_KEY_INFO,
1192 /* equivalenced to */ NO_EQUIVALENT,
1193 /* min, max, act ct */ 0, 1, 0,
1194 /* opt state flags */ PGP_KEY_INFO_FLAGS, 0,
1195 /* last opt argumnt */ { NULL }, /* --pgp-key-info */
1196 /* arg list/cookie */ NULL,
1197 /* must/cannot opts */ NULL, NULL,
1198 /* option proc */ NULL,
1199 /* desc, NAME, name */ PGP_KEY_INFO_DESC, PGP_KEY_INFO_NAME, PGP_KEY_INFO_name,
1200 /* disablement strs */ NULL, NULL },
1202 { /* entry idx, value */ 36, VALUE_OPT_PUBKEY_INFO,
1203 /* equiv idx, value */ 36, VALUE_OPT_PUBKEY_INFO,
1204 /* equivalenced to */ NO_EQUIVALENT,
1205 /* min, max, act ct */ 0, 1, 0,
1206 /* opt state flags */ PUBKEY_INFO_FLAGS, 0,
1207 /* last opt argumnt */ { NULL }, /* --pubkey-info */
1208 /* arg list/cookie */ NULL,
1209 /* must/cannot opts */ NULL, NULL,
1210 /* option proc */ NULL,
1211 /* desc, NAME, name */ PUBKEY_INFO_DESC, PUBKEY_INFO_NAME, PUBKEY_INFO_name,
1212 /* disablement strs */ NULL, NULL },
1214 { /* entry idx, value */ 37, VALUE_OPT_V1,
1215 /* equiv idx, value */ 37, VALUE_OPT_V1,
1216 /* equivalenced to */ NO_EQUIVALENT,
1217 /* min, max, act ct */ 0, 1, 0,
1218 /* opt state flags */ V1_FLAGS, 0,
1219 /* last opt argumnt */ { NULL }, /* --v1 */
1220 /* arg list/cookie */ NULL,
1221 /* must/cannot opts */ NULL, NULL,
1222 /* option proc */ NULL,
1223 /* desc, NAME, name */ V1_DESC, V1_NAME, V1_name,
1224 /* disablement strs */ NULL, NULL },
1226 { /* entry idx, value */ 38, VALUE_OPT_TO_P12,
1227 /* equiv idx, value */ 38, VALUE_OPT_TO_P12,
1228 /* equivalenced to */ NO_EQUIVALENT,
1229 /* min, max, act ct */ 0, 1, 0,
1230 /* opt state flags */ TO_P12_FLAGS, 0,
1231 /* last opt argumnt */ { NULL }, /* --to-p12 */
1232 /* arg list/cookie */ NULL,
1233 /* must/cannot opts */ aTo_P12MustList, NULL,
1234 /* option proc */ NULL,
1235 /* desc, NAME, name */ TO_P12_DESC, TO_P12_NAME, TO_P12_name,
1236 /* disablement strs */ NULL, NULL },
1238 { /* entry idx, value */ 39, VALUE_OPT_TO_P8,
1239 /* equiv idx, value */ 39, VALUE_OPT_TO_P8,
1240 /* equivalenced to */ NO_EQUIVALENT,
1241 /* min, max, act ct */ 0, 1, 0,
1242 /* opt state flags */ TO_P8_FLAGS, 0,
1243 /* last opt argumnt */ { NULL }, /* --to-p8 */
1244 /* arg list/cookie */ NULL,
1245 /* must/cannot opts */ NULL, NULL,
1246 /* option proc */ NULL,
1247 /* desc, NAME, name */ TO_P8_DESC, TO_P8_NAME, TO_P8_name,
1248 /* disablement strs */ NULL, NULL },
1250 { /* entry idx, value */ 40, VALUE_OPT_PKCS8,
1251 /* equiv idx, value */ 40, VALUE_OPT_PKCS8,
1252 /* equivalenced to */ NO_EQUIVALENT,
1253 /* min, max, act ct */ 0, 1, 0,
1254 /* opt state flags */ PKCS8_FLAGS, 0,
1255 /* last opt argumnt */ { NULL }, /* --pkcs8 */
1256 /* arg list/cookie */ NULL,
1257 /* must/cannot opts */ NULL, NULL,
1258 /* option proc */ NULL,
1259 /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name,
1260 /* disablement strs */ NULL, NULL },
1262 { /* entry idx, value */ 41, VALUE_OPT_RSA,
1263 /* equiv idx, value */ 41, VALUE_OPT_RSA,
1264 /* equivalenced to */ NO_EQUIVALENT,
1265 /* min, max, act ct */ 0, 1, 0,
1266 /* opt state flags */ RSA_FLAGS, 0,
1267 /* last opt argumnt */ { NULL }, /* --rsa */
1268 /* arg list/cookie */ NULL,
1269 /* must/cannot opts */ NULL, NULL,
1270 /* option proc */ NULL,
1271 /* desc, NAME, name */ RSA_DESC, RSA_NAME, RSA_name,
1272 /* disablement strs */ NULL, NULL },
1274 { /* entry idx, value */ 42, VALUE_OPT_DSA,
1275 /* equiv idx, value */ 42, VALUE_OPT_DSA,
1276 /* equivalenced to */ NO_EQUIVALENT,
1277 /* min, max, act ct */ 0, 1, 0,
1278 /* opt state flags */ DSA_FLAGS, 0,
1279 /* last opt argumnt */ { NULL }, /* --dsa */
1280 /* arg list/cookie */ NULL,
1281 /* must/cannot opts */ NULL, NULL,
1282 /* option proc */ NULL,
1283 /* desc, NAME, name */ DSA_DESC, DSA_NAME, DSA_name,
1284 /* disablement strs */ NULL, NULL },
1286 { /* entry idx, value */ 43, VALUE_OPT_ECC,
1287 /* equiv idx, value */ 43, VALUE_OPT_ECC,
1288 /* equivalenced to */ NO_EQUIVALENT,
1289 /* min, max, act ct */ 0, 1, 0,
1290 /* opt state flags */ ECC_FLAGS, 0,
1291 /* last opt argumnt */ { NULL }, /* --ecc */
1292 /* arg list/cookie */ NULL,
1293 /* must/cannot opts */ NULL, NULL,
1294 /* option proc */ NULL,
1295 /* desc, NAME, name */ ECC_DESC, ECC_NAME, ECC_name,
1296 /* disablement strs */ NULL, NULL },
1298 { /* entry idx, value */ 44, VALUE_OPT_HASH,
1299 /* equiv idx, value */ 44, VALUE_OPT_HASH,
1300 /* equivalenced to */ NO_EQUIVALENT,
1301 /* min, max, act ct */ 0, 1, 0,
1302 /* opt state flags */ HASH_FLAGS, 0,
1303 /* last opt argumnt */ { NULL }, /* --hash */
1304 /* arg list/cookie */ NULL,
1305 /* must/cannot opts */ NULL, NULL,
1306 /* option proc */ NULL,
1307 /* desc, NAME, name */ HASH_DESC, HASH_NAME, HASH_name,
1308 /* disablement strs */ NULL, NULL },
1310 { /* entry idx, value */ 45, VALUE_OPT_INDER,
1311 /* equiv idx, value */ 45, VALUE_OPT_INDER,
1312 /* equivalenced to */ NO_EQUIVALENT,
1313 /* min, max, act ct */ 0, 1, 0,
1314 /* opt state flags */ INDER_FLAGS, 0,
1315 /* last opt argumnt */ { NULL }, /* --inder */
1316 /* arg list/cookie */ NULL,
1317 /* must/cannot opts */ NULL, NULL,
1318 /* option proc */ NULL,
1319 /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
1320 /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
1322 { /* entry idx, value */ 46, VALUE_OPT_INRAW,
1323 /* equiv idx, value */ 46, VALUE_OPT_INRAW,
1324 /* equivalenced to */ NO_EQUIVALENT,
1325 /* min, max, act ct */ 0, 1, 0,
1326 /* opt state flags */ INRAW_FLAGS, 0,
1327 /* last opt argumnt */ { NULL }, /* --inraw */
1328 /* arg list/cookie */ NULL,
1329 /* must/cannot opts */ NULL, NULL,
1330 /* option proc */ doOptInraw,
1331 /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name,
1332 /* disablement strs */ 0, 0 },
1334 { /* entry idx, value */ 47, VALUE_OPT_OUTDER,
1335 /* equiv idx, value */ 47, VALUE_OPT_OUTDER,
1336 /* equivalenced to */ NO_EQUIVALENT,
1337 /* min, max, act ct */ 0, 1, 0,
1338 /* opt state flags */ OUTDER_FLAGS, 0,
1339 /* last opt argumnt */ { NULL }, /* --outder */
1340 /* arg list/cookie */ NULL,
1341 /* must/cannot opts */ NULL, NULL,
1342 /* option proc */ NULL,
1343 /* desc, NAME, name */ OUTDER_DESC, OUTDER_NAME, OUTDER_name,
1344 /* disablement strs */ NOT_OUTDER_name, NOT_OUTDER_PFX },
1346 { /* entry idx, value */ 48, VALUE_OPT_OUTRAW,
1347 /* equiv idx, value */ 48, VALUE_OPT_OUTRAW,
1348 /* equivalenced to */ NO_EQUIVALENT,
1349 /* min, max, act ct */ 0, 1, 0,
1350 /* opt state flags */ OUTRAW_FLAGS, 0,
1351 /* last opt argumnt */ { NULL }, /* --outraw */
1352 /* arg list/cookie */ NULL,
1353 /* must/cannot opts */ NULL, NULL,
1354 /* option proc */ doOptOutraw,
1355 /* desc, NAME, name */ OUTRAW_DESC, OUTRAW_NAME, OUTRAW_name,
1356 /* disablement strs */ 0, 0 },
1358 { /* entry idx, value */ 49, VALUE_OPT_BITS,
1359 /* equiv idx, value */ 49, VALUE_OPT_BITS,
1360 /* equivalenced to */ NO_EQUIVALENT,
1361 /* min, max, act ct */ 0, 1, 0,
1362 /* opt state flags */ BITS_FLAGS, 0,
1363 /* last opt argumnt */ { NULL }, /* --bits */
1364 /* arg list/cookie */ NULL,
1365 /* must/cannot opts */ NULL, NULL,
1366 /* option proc */ optionNumericVal,
1367 /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name,
1368 /* disablement strs */ NULL, NULL },
1370 { /* entry idx, value */ 50, VALUE_OPT_SEC_PARAM,
1371 /* equiv idx, value */ 50, VALUE_OPT_SEC_PARAM,
1372 /* equivalenced to */ NO_EQUIVALENT,
1373 /* min, max, act ct */ 0, 1, 0,
1374 /* opt state flags */ SEC_PARAM_FLAGS, 0,
1375 /* last opt argumnt */ { NULL }, /* --sec-param */
1376 /* arg list/cookie */ NULL,
1377 /* must/cannot opts */ NULL, NULL,
1378 /* option proc */ NULL,
1379 /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name,
1380 /* disablement strs */ NULL, NULL },
1382 { /* entry idx, value */ 51, VALUE_OPT_DISABLE_QUICK_RANDOM,
1383 /* equiv idx, value */ 51, VALUE_OPT_DISABLE_QUICK_RANDOM,
1384 /* equivalenced to */ NO_EQUIVALENT,
1385 /* min, max, act ct */ 0, 1, 0,
1386 /* opt state flags */ DISABLE_QUICK_RANDOM_FLAGS, 0,
1387 /* last opt argumnt */ { NULL }, /* --disable-quick-random */
1388 /* arg list/cookie */ NULL,
1389 /* must/cannot opts */ NULL, NULL,
1390 /* option proc */ NULL,
1391 /* desc, NAME, name */ DISABLE_QUICK_RANDOM_DESC, DISABLE_QUICK_RANDOM_NAME, DISABLE_QUICK_RANDOM_name,
1392 /* disablement strs */ NULL, NULL },
1394 { /* entry idx, value */ 52, VALUE_OPT_TEMPLATE,
1395 /* equiv idx, value */ 52, VALUE_OPT_TEMPLATE,
1396 /* equivalenced to */ NO_EQUIVALENT,
1397 /* min, max, act ct */ 0, 1, 0,
1398 /* opt state flags */ TEMPLATE_FLAGS, 0,
1399 /* last opt argumnt */ { NULL }, /* --template */
1400 /* arg list/cookie */ NULL,
1401 /* must/cannot opts */ NULL, NULL,
1402 /* option proc */ doOptTemplate,
1403 /* desc, NAME, name */ TEMPLATE_DESC, TEMPLATE_NAME, TEMPLATE_name,
1404 /* disablement strs */ NULL, NULL },
1406 { /* entry idx, value */ 53, VALUE_OPT_PKCS_CIPHER,
1407 /* equiv idx, value */ 53, VALUE_OPT_PKCS_CIPHER,
1408 /* equivalenced to */ NO_EQUIVALENT,
1409 /* min, max, act ct */ 0, 1, 0,
1410 /* opt state flags */ PKCS_CIPHER_FLAGS, 0,
1411 /* last opt argumnt */ { NULL }, /* --pkcs-cipher */
1412 /* arg list/cookie */ NULL,
1413 /* must/cannot opts */ NULL, NULL,
1414 /* option proc */ NULL,
1415 /* desc, NAME, name */ PKCS_CIPHER_DESC, PKCS_CIPHER_NAME, PKCS_CIPHER_name,
1416 /* disablement strs */ NULL, NULL },
1418 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
1419 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
1420 /* equivalenced to */ NO_EQUIVALENT,
1421 /* min, max, act ct */ 0, 1, 0,
1422 /* opt state flags */ VER_FLAGS, 0,
1423 /* last opt argumnt */ { NULL },
1424 /* arg list/cookie */ NULL,
1425 /* must/cannot opts */ NULL, NULL,
1426 /* option proc */ VER_PROC,
1427 /* desc, NAME, name */ VER_DESC, NULL, VER_name,
1428 /* disablement strs */ NULL, NULL },
1432 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
1433 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
1434 /* equivalenced to */ NO_EQUIVALENT,
1435 /* min, max, act ct */ 0, 1, 0,
1436 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
1437 /* last opt argumnt */ { NULL },
1438 /* arg list/cookie */ NULL,
1439 /* must/cannot opts */ NULL, NULL,
1440 /* option proc */ doUsageOpt,
1441 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
1442 /* disablement strs */ NULL, NULL },
1444 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
1445 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
1446 /* equivalenced to */ NO_EQUIVALENT,
1447 /* min, max, act ct */ 0, 1, 0,
1448 /* opt state flags */ MORE_HELP_FLAGS, 0,
1449 /* last opt argumnt */ { NULL },
1450 /* arg list/cookie */ NULL,
1451 /* must/cannot opts */ NULL, NULL,
1452 /* option proc */ optionPagedUsage,
1453 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
1454 /* disablement strs */ NULL, NULL }
1458 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1460 * Define the certtool Option Environment
1462 #define zPROGNAME (certtool_opt_strs+4261)
1463 #define zUsageTitle (certtool_opt_strs+4270)
1464 #define zRcName NULL
1465 #define apzHomeList NULL
1466 #define zBugsAddr (certtool_opt_strs+4377)
1467 #define zExplain (certtool_opt_strs+4396)
1468 #define zDetail (certtool_opt_strs+4399)
1469 #define zFullVersion (certtool_opt_strs+4573)
1470 /* extracted from optcode.tlib near line 350 */
1472 #if defined(ENABLE_NLS)
1473 # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
1474 static tOptionXlateProc translate_option_strings;
1475 #else
1476 # define OPTPROC_BASE OPTPROC_NONE
1477 # define translate_option_strings NULL
1478 #endif /* ENABLE_NLS */
1481 #define certtool_full_usage (NULL)
1483 #define certtool_short_usage (certtool_opt_strs+4592)
1485 #endif /* not defined __doxygen__ */
1488 * Create the static procedure(s) declared above.
1491 * The callout function that invokes the optionUsage function.
1493 * @param pOptions the AutoOpts option description structure
1494 * @param pOptDesc the descriptor for the "help" (usage) option.
1495 * @noreturn
1497 static void
1498 doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
1500 optionUsage(&certtoolOptions, CERTTOOL_EXIT_SUCCESS);
1501 /* NOTREACHED */
1502 (void)pOptDesc;
1503 (void)pOptions;
1506 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1508 * Code to handle the debug option.
1510 * @param pOptions the certtool options data structure
1511 * @param pOptDesc the option descriptor for this option.
1513 static void
1514 doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
1516 static struct {long rmin, rmax;} const rng[1] = {
1517 { 0 , 9999 } };
1518 int ix;
1520 if (pOptions <= OPTPROC_EMIT_LIMIT)
1521 goto emit_ranges;
1522 optionNumericVal(pOptions, pOptDesc);
1524 for (ix = 0; ix < 1; ix++) {
1525 if (pOptDesc->optArg.argInt < rng[ix].rmin)
1526 continue; /* ranges need not be ordered. */
1527 if (pOptDesc->optArg.argInt == rng[ix].rmin)
1528 return;
1529 if (rng[ix].rmax == LONG_MIN)
1530 continue;
1531 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1532 return;
1535 option_usage_fp = stderr;
1537 emit_ranges:
1539 optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1542 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1544 * Code to handle the infile option.
1546 * @param pOptions the certtool options data structure
1547 * @param pOptDesc the option descriptor for this option.
1549 static void
1550 doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc)
1552 static teOptFileType const type =
1553 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1554 static tuFileMode mode;
1555 #ifndef O_CLOEXEC
1556 # define O_CLOEXEC 0
1557 #endif
1558 mode.file_flags = O_CLOEXEC;
1560 optionFileCheck(pOptions, pOptDesc, type, mode);
1563 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1565 * Code to handle the load-request option.
1567 * @param pOptions the certtool options data structure
1568 * @param pOptDesc the option descriptor for this option.
1570 static void
1571 doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc)
1573 static teOptFileType const type =
1574 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1575 static tuFileMode mode;
1576 #ifndef O_CLOEXEC
1577 # define O_CLOEXEC 0
1578 #endif
1579 mode.file_flags = O_CLOEXEC;
1581 optionFileCheck(pOptions, pOptDesc, type, mode);
1584 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1586 * Code to handle the inraw option.
1588 * @param pOptions the certtool options data structure
1589 * @param pOptDesc the option descriptor for this option.
1591 static void
1592 doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc)
1594 int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER);
1595 if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1596 USAGE(CERTTOOL_EXIT_FAILURE);
1600 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1602 * Code to handle the outraw option.
1604 * @param pOptions the certtool options data structure
1605 * @param pOptDesc the option descriptor for this option.
1607 static void
1608 doOptOutraw(tOptions* pOptions, tOptDesc* pOptDesc)
1610 int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_OUTDER);
1611 if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1612 USAGE(CERTTOOL_EXIT_FAILURE);
1616 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1618 * Code to handle the template option.
1620 * @param pOptions the certtool options data structure
1621 * @param pOptDesc the option descriptor for this option.
1623 static void
1624 doOptTemplate(tOptions* pOptions, tOptDesc* pOptDesc)
1626 static teOptFileType const type =
1627 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
1628 static tuFileMode mode;
1629 #ifndef O_CLOEXEC
1630 # define O_CLOEXEC 0
1631 #endif
1632 mode.file_flags = O_CLOEXEC;
1634 optionFileCheck(pOptions, pOptDesc, type, mode);
1636 /* extracted from optmain.tlib near line 1113 */
1639 * The directory containing the data associated with certtool.
1641 #ifndef PKGDATADIR
1642 # define PKGDATADIR ""
1643 #endif
1646 * Information about the person or institution that packaged certtool
1647 * for the current distribution.
1649 #ifndef WITH_PACKAGER
1650 # define certtool_packager_info NULL
1651 #else
1652 static char const certtool_packager_info[] =
1653 "Packaged by " WITH_PACKAGER
1655 # ifdef WITH_PACKAGER_VERSION
1656 " ("WITH_PACKAGER_VERSION")"
1657 # endif
1659 # ifdef WITH_PACKAGER_BUG_REPORTS
1660 "\nReport certtool bugs to " WITH_PACKAGER_BUG_REPORTS
1661 # endif
1662 "\n";
1663 #endif
1664 #ifndef __doxygen__
1666 #endif /* __doxygen__ */
1668 * The option definitions for certtool. The one structure that
1669 * binds them all.
1671 tOptions certtoolOptions = {
1672 OPTIONS_STRUCT_VERSION,
1673 0, NULL, /* original argc + argv */
1674 ( OPTPROC_BASE
1675 + OPTPROC_ERRSTOP
1676 + OPTPROC_SHORTOPT
1677 + OPTPROC_LONGOPT
1678 + OPTPROC_NO_REQ_OPT
1679 + OPTPROC_NEGATIONS
1680 + OPTPROC_NO_ARGS
1681 + OPTPROC_GNUUSAGE
1682 + OPTPROC_MISUSE ),
1683 0, NULL, /* current option index, current option */
1684 NULL, NULL, zPROGNAME,
1685 zRcName, zCopyright, zLicenseDescrip,
1686 zFullVersion, apzHomeList, zUsageTitle,
1687 zExplain, zDetail, optDesc,
1688 zBugsAddr, /* address to send bugs to */
1689 NULL, NULL, /* extensions/saved state */
1690 optionUsage, /* usage procedure */
1691 translate_option_strings, /* translation procedure */
1693 * Indexes to special options
1695 { INDEX_OPT_MORE_HELP, /* more-help option index */
1696 NO_EQUIVALENT, /* save option index */
1697 NO_EQUIVALENT, /* '-#' option index */
1698 NO_EQUIVALENT /* index of default opt */
1700 57 /* full option count */, 54 /* user option count */,
1701 certtool_full_usage, certtool_short_usage,
1702 NULL, NULL,
1703 PKGDATADIR, certtool_packager_info
1706 #if ENABLE_NLS
1707 #include <stdio.h>
1708 #include <stdlib.h>
1709 #include <string.h>
1710 #include <unistd.h>
1711 #include <autoopts/usage-txt.h>
1713 static char* AO_gettext(char const* pz);
1714 static void coerce_it(void** s);
1717 * AutoGen specific wrapper function for gettext.
1718 * It relies on the macro _() to convert from English to the target
1719 * language, then strdup-duplicates the result string.
1721 * @param[in] pz the input text used as a lookup key.
1722 * @returns the translated text (if there is one),
1723 * or the original text (if not).
1725 static char *
1726 AO_gettext(char const* pz)
1728 char* pzRes;
1729 if (pz == NULL)
1730 return NULL;
1731 pzRes = _(pz);
1732 if (pzRes == pz)
1733 return pzRes;
1734 pzRes = strdup(pzRes);
1735 if (pzRes == NULL) {
1736 fputs(_("No memory for duping translated strings\n"), stderr);
1737 exit(CERTTOOL_EXIT_FAILURE);
1739 return pzRes;
1742 static void coerce_it(void** s) { *s = AO_gettext(*s);
1746 * Translate all the translatable strings in the certtoolOptions
1747 * structure defined above. This is done only once.
1749 static void
1750 translate_option_strings(void)
1752 tOptions * const pOpt = &certtoolOptions;
1755 * Guard against re-translation. It won't work. The strings will have
1756 * been changed by the first pass through this code. One shot only.
1758 if (option_usage_text.field_ct != 0) {
1760 * Do the translations. The first pointer follows the field count
1761 * field. The field count field is the size of a pointer.
1763 tOptDesc * pOD = pOpt->pOptDesc;
1764 char ** ppz = (char**)(void*)&(option_usage_text);
1765 int ix = option_usage_text.field_ct;
1767 do {
1768 ppz++;
1769 *ppz = AO_gettext(*ppz);
1770 } while (--ix > 0);
1772 coerce_it((void*)&(pOpt->pzCopyright));
1773 coerce_it((void*)&(pOpt->pzCopyNotice));
1774 coerce_it((void*)&(pOpt->pzFullVersion));
1775 coerce_it((void*)&(pOpt->pzUsageTitle));
1776 coerce_it((void*)&(pOpt->pzExplain));
1777 coerce_it((void*)&(pOpt->pzDetail));
1778 coerce_it((void*)&(pOpt->pzPackager));
1779 coerce_it((void*)&(pOpt->pzShortUsage));
1780 option_usage_text.field_ct = 0;
1782 for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
1783 coerce_it((void*)&(pOD->pzText));
1786 if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
1787 tOptDesc * pOD = pOpt->pOptDesc;
1788 int ix;
1790 for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
1791 coerce_it((void*)&(pOD->pz_Name));
1792 coerce_it((void*)&(pOD->pz_DisableName));
1793 coerce_it((void*)&(pOD->pz_DisablePfx));
1795 /* prevent re-translation */
1796 certtoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
1800 #endif /* ENABLE_NLS */
1802 #ifdef __cplusplus
1804 #endif
1805 /* certtool-args.c ends here */