summaryrefslogtreecommitdiff
path: root/src/certtool-options.json
blob: 34ecaa77146cc902581999b71b5afdec15a7c727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
[
  {
    "meta": {
      "desc": "",
      "prog-name": "certtool",
      "prog-title": "GnuTLS certificate tool",
      "prog-desc": "Manipulate certificates and private keys.",
      "detail": "Tool to parse and generate X.509 certificates, requests and private keys.\nIt can be used interactively or non interactively by\nspecifying the template command line option.\n\nThe tool accepts files or supported URIs via the --infile option. In case PIN\nis required for URI access you can provide it using the environment variables GNUTLS_PIN \nand GNUTLS_SO_PIN.\n",
      "short-usage": "certtool [options]\ncerttool --help for usage instructions.\n",
      "explain": ""
    },
    "options": [
      {
        "long-option": "debug",
        "short-option": "d",
        "arg-min": "0 ",
        "desc": "Enable debugging",
        "arg-max": " 9999",
        "detail": "Specifies the debug level.",
        "arg-type": "number"
      },
      {
        "short-option": "V",
        "max": "NOLIMIT",
        "long-option": "verbose",
        "desc": "More verbose output",
        "disabled": "",
        "detail": ""
      },
      {
        "long-option": "infile",
        "detail": "",
        "arg-type": "file",
        "desc": "Input file",
        "file-exists": "yes"
      },
      {
        "detail": "",
        "arg-type": "string",
        "desc": "Output file",
        "long-option": "outfile"
      }
    ]
  },
  {
    "meta": {
      "id": "cert-options",
      "desc": "Certificate related options"
    },
    "options": [
      {
        "detail": "",
        "desc": "Print information on the given certificate",
        "short-option": "i",
        "long-option": "certificate-info"
      },
      {
        "desc": "Print information on a public key",
        "long-option": "pubkey-info",
        "detail": "The option combined with --load-request, --load-pubkey, --load-privkey and --load-certificate will extract the public key of the object in question."
      },
      {
        "long-option": "generate-self-signed",
        "short-option": "s",
        "desc": "Generate a self-signed certificate",
        "detail": ""
      },
      {
        "short-option": "c",
        "long-option": "generate-certificate",
        "desc": "Generate a signed certificate",
        "detail": ""
      },
      {
        "detail": "",
        "desc": "Generates a proxy certificate",
        "long-option": "generate-proxy"
      },
      {
        "short-option": "u",
        "long-option": "update-certificate",
        "detail": "",
        "desc": "Update a signed certificate"
      },
      {
        "desc": "Print the fingerprint of the given certificate",
        "long-option": "fingerprint",
        "detail": "This is a simple hash of the DER encoding of the certificate. It can be combined with the --hash parameter. However, it is recommended for identification to use the key-id which depends only on the certificate's key."
      },
      {
        "long-option": "key-id",
        "desc": "Print the key ID of the given certificate",
        "detail": "This is a hash of the public key of the given certificate. It identifies the key uniquely, remains the same on a certificate renewal and depends only on signed fields of the certificate."
      },
      {
        "deprecated": "",
        "long-option": "certificate-pubkey",
        "desc": "Print certificate's public key",
        "detail": "This option is deprecated as a duplicate of --pubkey-info"
      },
      {
        "desc": "Generate an X.509 version 1 certificate (with no extensions)",
        "long-option": "v1",
        "detail": ""
      },
      {
        "desc": "Sign a certificate with a specific signature algorithm",
        "arg-type": "string",
        "detail": "This option can be combined with --generate-certificate, to sign the certificate with\na specific signature algorithm variant. The only option supported is 'RSA-PSS', and should be\nspecified when the signer does not have a certificate which is marked for RSA-PSS use only.",
        "long-option": "sign-params"
      }
    ]
  },
  {
    "meta": {
      "desc": "Certificate request related options",
      "id": "crq-options"
    },
    "options": [
      {
        "detail": "",
        "long-option": "crq-info",
        "desc": "Print information on the given certificate request"
      },
      {
        "detail": "Will generate a PKCS #10 certificate request. To specify a private key use --load-privkey.",
        "conflicts": "infile",
        "long-option": "generate-request",
        "desc": "Generate a PKCS #10 certificate request",
        "short-option": "q"
      },
      {
        "desc": "Do not use extensions in certificate requests",
        "detail": "",
        "long-option": "no-crq-extensions"
      }
    ]
  },
  {
    "meta": {
      "desc": "PKCS#12 file related options",
      "id": "pkcs12-options"
    },
    "options": [
      {
        "detail": "This option will dump the contents and print the metadata of the provided PKCS #12 structure.",
        "desc": "Print information on a PKCS #12 structure",
        "long-option": "p12-info"
      },
      {
        "arg-type": "string",
        "desc": "The PKCS #12 friendly name to use",
        "detail": "The name to be used for the primary certificate and private key in a PKCS #12 file.",
        "long-option": "p12-name"
      },
      {
        "detail": "It requires a certificate, a private key and possibly a CA certificate to be specified.",
        "desc": "Generate a PKCS #12 structure",
        "long-option": "to-p12"
      }
    ]
  },
  {
    "meta": {
      "id": "key-options",
      "desc": "Private key related options"
    },
    "options": [
      {
        "short-option": "k",
        "long-option": "key-info",
        "detail": "",
        "desc": "Print information on a private key"
      },
      {
        "desc": "Print information on a PKCS #8 structure",
        "detail": "This option will print information about encrypted PKCS #8 structures. That option does not require the decryption of the structure.",
        "long-option": "p8-info"
      },
      {
        "detail": "It requires an RSA-PSS key as input and will output a raw RSA\nkey. This command is necessary for compatibility with applications that\ncannot read RSA-PSS keys.",
        "long-option": "to-rsa",
        "desc": "Convert an RSA-PSS key to raw RSA format"
      },
      {
        "long-option": "generate-privkey",
        "detail": "When generating RSA-PSS private keys, the --hash option will\nrestrict the allowed hash for the key; in the same keys the --salt-size\noption is also acceptable.",
        "desc": "Generate a private key",
        "short-option": "p"
      },
      {
        "arg-type": "string",
        "long-option": "key-type",
        "desc": "Specify the key type to use on key generation",
        "detail": "This option can be combined with --generate-privkey, to specify\nthe key type to be generated. Valid options are, 'rsa', 'rsa-pss', 'dsa', 'ecdsa', 'ed25519, 'ed448', 'x25519', and 'x448'.'.\nWhen combined with certificate generation it can be used to specify an\nRSA-PSS certificate when an RSA key is given."
      },
      {
        "long-option": "bits",
        "desc": "Specify the number of bits for key generation",
        "detail": "",
        "arg-type": "number"
      },
      {
        "detail": "Supported values are secp192r1, secp224r1, secp256r1, secp384r1 and secp521r1.",
        "arg-type": "string",
        "long-option": "curve",
        "desc": "Specify the curve used for EC key generation"
      },
      {
        "detail": "This is alternative to the bits option.",
        "arg-type": "string",
        "long-option": "sec-param",
        "arg-name": "Security parameter",
        "desc": "Specify the security level [low, legacy, medium, high, ultra]"
      },
      {
        "detail": "This needs to be combined with --load-privkey.",
        "desc": "Convert a given key to a PKCS #8 structure",
        "long-option": "to-p8"
      },
      {
        "short-option": "8",
        "long-option": "pkcs8",
        "desc": "Use PKCS #8 format for private keys",
        "detail": ""
      },
      {
        "desc": "Generate a private key or parameters from a seed using a provable method",
        "detail": "This will use the FIPS PUB186-4 algorithms (i.e., Shawe-Taylor) for provable key generation.\nWhen specified the private keys or parameters will be generated from a seed, and can be\nlater validated with --verify-provable-privkey to be correctly generated from the seed. You may\nspecify --seed or allow GnuTLS to generate one (recommended). This option can be combined with\n--generate-privkey or --generate-dh-params.\n\nThat option applies to RSA and DSA keys. On the DSA keys the PQG parameters\nare generated using the seed, and on RSA the two primes.",
        "long-option": "provable"
      },
      {
        "detail": "This will use the FIPS-186-4 algorithms for provable key generation. You may specify --seed or use the seed stored in the private key structure.",
        "long-option": "verify-provable-privkey",
        "desc": "Verify a private key generated from a seed using a provable method"
      },
      {
        "detail": "The seed acts as a security parameter for the private key, and\nthus a seed size which corresponds to the security level of the private key\nshould be provided (e.g., 256-bits seed).",
        "arg-type": "string",
        "desc": "When generating a private key use the given hex-encoded seed",
        "long-option": "seed"
      }
    ]
  },
  {
    "meta": {
      "desc": "CRL related options",
      "id": "crl-options"
    },
    "options": [
      {
        "short-option": "l",
        "desc": "Print information on the given CRL structure",
        "long-option": "crl-info",
        "detail": ""
      },
      {
        "long-option": "generate-crl",
        "detail": "This option generates a Certificate Revocation List. When combined with --load-crl it would use the loaded CRL as base for the generated (i.e., all revoked certificates in the base will be copied to the new CRL).\nTo add new certificates to the CRL use --load-certificate.",
        "desc": "Generate a CRL"
      },
      {
        "requires": "load-ca-certificate",
        "desc": "Verify a Certificate Revocation List using a trusted list",
        "long-option": "verify-crl",
        "detail": "The trusted certificate list must be loaded with --load-ca-certificate."
      }
    ]
  },
  {
    "meta": {
      "desc": "Certificate verification related options",
      "id": "cert-verify-options"
    },
    "options": [
      {
        "long-option": "verify-chain",
        "desc": "Verify a PEM encoded certificate chain",
        "detail": "Verifies the validity of a certificate chain. That is, an ordered set of\ncertificates where each one is the issuer of the previous, and the first is\nthe end-certificate to be validated. In a proper chain the last certificate\nis a self signed one. It can be combined with --verify-purpose or --verify-hostname.",
        "short-option": "e"
      },
      {
        "detail": "The trusted certificate list can be loaded with --load-ca-certificate. If no\ncertificate list is provided, then the system's trusted certificate list is used. Note that\nduring verification multiple paths may be explored. On a successful verification\nthe successful path will be the last one. It can be combined with --verify-purpose or --verify-hostname.",
        "desc": "Verify a PEM encoded certificate (chain) against a trusted set",
        "long-option": "verify"
      },
      {
        "long-option": "verify-hostname",
        "desc": "Specify a hostname to be used for certificate chain verification",
        "arg-type": "string",
        "detail": "This is to be combined with one of the verify certificate options."
      },
      {
        "detail": "This is to be combined with one of the verify certificate options.",
        "long-option": "verify-email",
        "desc": "Specify a email to be used for certificate chain verification",
        "conflicts": "verify-hostname",
        "arg-type": "string"
      },
      {
        "detail": "This object identifier restricts the purpose of the certificates to be verified. Example purposes are 1.3.6.1.5.5.7.3.1 (TLS WWW), 1.3.6.1.5.5.7.3.4 (EMAIL) etc. Note that a CA certificate without a purpose set (extended key usage) is valid for any purpose.",
        "long-option": "verify-purpose",
        "arg-type": "string",
        "desc": "Specify a purpose OID to be used for certificate chain verification"
      },
      {
        "long-option": "verify-allow-broken",
        "detail": "This can be combined with --p7-verify, --verify or --verify-chain.",
        "desc": "Allow broken algorithms, such as MD5 for verification"
      },
      {
        "detail": "This option can be used to specify a certificate verification profile. Certificate\n    verification profiles correspond to the security level. This should be one of\n    'none', 'very weak', 'low', 'legacy', 'medium', 'high', 'ultra',\n    'future'. Note that by default no profile is applied, unless one is set\n    as minimum in the gnutls configuration file.",
        "long-option": "verify-profile",
        "arg-type": "string",
        "desc": "Specify a security level profile to be used for verification"
      }
    ]
  },
  {
    "meta": {
      "desc": "PKCS#7 structure options",
      "id": "pkcs7-options"
    },
    "options": [
      {
        "desc": "Generate a PKCS #7 structure",
        "detail": "This option generates a PKCS #7 certificate container structure. To add certificates in the structure use --load-certificate and --load-crl.",
        "long-option": "p7-generate"
      },
      {
        "long-option": "p7-sign",
        "detail": "This option generates a PKCS #7 structure containing a signature for the provided data from infile. The data are stored within the structure. The signer certificate has to be specified using --load-certificate and --load-privkey. The input to --load-certificate can be a list of certificates. In case of a list, the first certificate is used for signing and the other certificates are included in the structure.",
        "desc": "Signs using a PKCS #7 structure"
      },
      {
        "desc": "Signs using a detached PKCS #7 structure",
        "detail": "This option generates a PKCS #7 structure containing a signature for the provided data from infile. The signer certificate has to be specified using --load-certificate and --load-privkey. The input to --load-certificate can be a list of certificates. In case of a list, the first certificate is used for signing and the other certificates are included in the structure.",
        "long-option": "p7-detached-sign"
      },
      {
        "disable-prefix": "no-",
        "long-option": "p7-include-cert",
        "desc": "The signer's certificate will be included in the cert list.",
        "detail": "This options works with --p7-sign or --p7-detached-sign and will include or exclude the signer's certificate into the generated signature.",
        "enabled": ""
      },
      {
        "detail": "This option will include a timestamp in the generated signature",
        "disable-prefix": "no-",
        "disabled": "",
        "desc": "Will include a timestamp in the PKCS #7 structure",
        "long-option": "p7-time"
      },
      {
        "disable-prefix": "no-",
        "disabled": "",
        "desc": "Will show the embedded data in the PKCS #7 structure",
        "long-option": "p7-show-data",
        "detail": "This option can be combined with --p7-verify or --p7-info and will display the embedded signed data in the PKCS #7 structure."
      },
      {
        "long-option": "p7-info",
        "desc": "Print information on a PKCS #7 structure",
        "detail": ""
      },
      {
        "detail": "This option verifies the signed PKCS #7 structure. The certificate list to use for verification can be specified with --load-ca-certificate. When no certificate list is provided, then the system's certificate list is used. Alternatively a direct signer can be provided using --load-certificate. A key purpose can be enforced with the --verify-purpose option, and the --load-data option will utilize detached data.",
        "long-option": "p7-verify",
        "desc": "Verify the provided PKCS #7 structure"
      },
      {
        "long-option": "smime-to-p7",
        "desc": "Convert S/MIME to PKCS #7 structure",
        "detail": ""
      }
    ]
  },
  {
    "meta": {
      "desc": "Other options",
      "id": "other-options"
    },
    "options": [
      {
        "detail": "The will generate random parameters to be used with\nDiffie-Hellman key exchange. The output parameters will be in PKCS #3\nformat. Note that it is recommended to use the --get-dh-params option\ninstead.",
        "desc": "Generate PKCS #3 encoded Diffie-Hellman parameters",
        "deprecated": "",
        "long-option": "generate-dh-params"
      },
      {
        "long-option": "get-dh-params",
        "desc": "List the included PKCS #3 encoded Diffie-Hellman parameters",
        "detail": "Returns stored DH parameters in GnuTLS. Those parameters returned\nare defined in RFC7919, and can be considered standard parameters for a TLS\nkey exchange. This option is provided for old applications which require\nDH parameters to be specified; modern GnuTLS applications should not require\nthem."
      },
      {
        "desc": "Print information PKCS #3 encoded Diffie-Hellman parameters",
        "detail": "",
        "long-option": "dh-info"
      },
      {
        "detail": "This can be either a file or a PKCS #11 URL",
        "long-option": "load-privkey",
        "arg-type": "string",
        "desc": "Loads a private key file"
      },
      {
        "arg-type": "string",
        "desc": "Loads a public key file",
        "detail": "This can be either a file or a PKCS #11 URL",
        "long-option": "load-pubkey"
      },
      {
        "long-option": "load-request",
        "desc": "Loads a certificate request file",
        "detail": "This option can be used with a file",
        "arg-type": "string"
      },
      {
        "arg-type": "string",
        "long-option": "load-certificate",
        "detail": "This option can be used with a file",
        "desc": "Loads a certificate file"
      },
      {
        "desc": "Loads the certificate authority's private key file",
        "arg-type": "string",
        "detail": "This can be either a file or a PKCS #11 URL",
        "long-option": "load-ca-privkey"
      },
      {
        "desc": "Loads the certificate authority's certificate file",
        "detail": "This can be either a file or a PKCS #11 URL",
        "arg-type": "string",
        "long-option": "load-ca-certificate"
      },
      {
        "desc": "Loads the provided CRL",
        "arg-type": "string",
        "long-option": "load-crl",
        "detail": "This option can be used with a file"
      },
      {
        "detail": "This option can be used with a file",
        "desc": "Loads auxiliary data",
        "arg-type": "string",
        "long-option": "load-data"
      },
      {
        "detail": "You can use this option to specify the password in the command line instead of reading it from the tty. Note, that the command line arguments are available for view in others in the system. Specifying password as '' is the same as specifying no password.",
        "arg-type": "string",
        "desc": "Password to use",
        "long-option": "password"
      },
      {
        "desc": "Enforce a NULL password",
        "long-option": "null-password",
        "detail": "This option enforces a NULL password. This is different than the empty or no password in schemas like PKCS #8."
      },
      {
        "detail": "This option enforces an empty password. This is different than the NULL or no password in schemas like PKCS #8.",
        "long-option": "empty-password",
        "desc": "Enforce an empty password"
      },
      {
        "long-option": "hex-numbers",
        "detail": "",
        "desc": "Print big number in an easier format to parse"
      },
      {
        "long-option": "cprint",
        "desc": "In certain operations it prints the information in C-friendly format",
        "detail": "In certain operations it prints the information in C-friendly format, suitable for including into C programs."
      },
      {
        "desc": "Generate RSA key",
        "detail": "When combined with --generate-privkey generates an RSA private key.",
        "long-option": "rsa",
        "description": "This option is equivalent to '--key-type rsa'.",
        "deprecated": ""
      },
      {
        "description": "This option is equivalent to '--key-type dsa'.",
        "deprecated": "",
        "long-option": "dsa",
        "detail": "When combined with --generate-privkey generates a DSA private key.",
        "desc": "Generate DSA key"
      },
      {
        "desc": "Generate ECC (ECDSA) key",
        "description": "This option is equivalent to '--key-type ecdsa'.",
        "long-option": "ecc",
        "detail": "When combined with --generate-privkey generates an elliptic curve private key to be used with ECDSA.",
        "deprecated": ""
      },
      {
        "aliases": "ecc",
        "deprecated": "",
        "long-option": "ecdsa"
      },
      {
        "long-option": "hash",
        "detail": "Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512.",
        "desc": "Hash algorithm to use for signing",
        "arg-type": "string"
      },
      {
        "desc": "Specify the RSA-PSS key default salt size",
        "arg-type": "number",
        "long-option": "salt-size",
        "detail": "Typical keys shouldn't set or restrict this option."
      },
      {
        "desc": "Use DER format for input certificates, private keys, and DH parameters ",
        "detail": "The input files will be assumed to be in DER or RAW format. \nUnlike options that in PEM input would allow multiple input data (e.g. multiple \ncertificates), when reading in DER format a single data structure is read.",
        "disabled": "",
        "disable-prefix": "no-",
        "long-option": "inder"
      },
      {
        "aliases": "inder",
        "long-option": "inraw"
      },
      {
        "long-option": "outder",
        "disabled": "",
        "desc": "Use DER format for output certificates, private keys, and DH parameters",
        "disable-prefix": "no-",
        "detail": "The output will be in DER or RAW format."
      },
      {
        "aliases": "outder",
        "long-option": "outraw"
      },
      {
        "desc": "No effect",
        "long-option": "disable-quick-random",
        "deprecated": "",
        "detail": ""
      },
      {
        "arg-type": "string",
        "long-option": "template",
        "desc": "Template file to use for non-interactive operation",
        "detail": ""
      },
      {
        "long-option": "stdout-info",
        "detail": "",
        "desc": "Print information to stdout instead of stderr"
      },
      {
        "long-option": "ask-pass",
        "disabled": "",
        "desc": "Enable interaction for entering password when in batch mode.",
        "detail": "This option will enable interaction to enter password when in batch mode. That is useful when the template option has been specified."
      },
      {
        "arg-name": "Cipher",
        "detail": "Cipher may be one of 3des, 3des-pkcs12, aes-128, aes-192, aes-256, rc2-40, arcfour.",
        "long-option": "pkcs-cipher",
        "desc": "Cipher to use for PKCS #8 and #12 operations",
        "arg-type": "string"
      },
      {
        "arg-type": "string",
        "long-option": "provider",
        "detail": "This will override the default options in /etc/gnutls/pkcs11.conf",
        "desc": "Specify the PKCS #11 provider library"
      },
      {
        "enabled": "",
        "long-option": "text",
        "disable-prefix": "no-",
        "desc": "Output textual information before PEM-encoded certificates, private keys, etc",
        "detail": "Output textual information before PEM-encoded data"
      }
    ]
  }
]