xref: /minix3/crypto/external/bsd/heimdal/dist/lib/hx509/hxtool-commands.in (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc/*
2*ebfedea0SLionel Sambuc * Copyright (c) 2005 - 2007 Kungliga Tekniska Högskolan
3*ebfedea0SLionel Sambuc * (Royal Institute of Technology, Stockholm, Sweden).
4*ebfedea0SLionel Sambuc * All rights reserved.
5*ebfedea0SLionel Sambuc *
6*ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without
7*ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions
8*ebfedea0SLionel Sambuc * are met:
9*ebfedea0SLionel Sambuc *
10*ebfedea0SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
11*ebfedea0SLionel Sambuc *    notice, this list of conditions and the following disclaimer.
12*ebfedea0SLionel Sambuc *
13*ebfedea0SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright
14*ebfedea0SLionel Sambuc *    notice, this list of conditions and the following disclaimer in the
15*ebfedea0SLionel Sambuc *    documentation and/or other materials provided with the distribution.
16*ebfedea0SLionel Sambuc *
17*ebfedea0SLionel Sambuc * 3. Neither the name of the Institute nor the names of its contributors
18*ebfedea0SLionel Sambuc *    may be used to endorse or promote products derived from this software
19*ebfedea0SLionel Sambuc *    without specific prior written permission.
20*ebfedea0SLionel Sambuc *
21*ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22*ebfedea0SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*ebfedea0SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*ebfedea0SLionel Sambuc * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25*ebfedea0SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*ebfedea0SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*ebfedea0SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*ebfedea0SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*ebfedea0SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*ebfedea0SLionel Sambuc * SUCH DAMAGE.
32*ebfedea0SLionel Sambuc */
33*ebfedea0SLionel Sambuc/* Id */
34*ebfedea0SLionel Sambuc
35*ebfedea0SLionel Sambuccommand = {
36*ebfedea0SLionel Sambuc	name = "cms-create-sd"
37*ebfedea0SLionel Sambuc	name = "cms-sign"
38*ebfedea0SLionel Sambuc	option = {
39*ebfedea0SLionel Sambuc		long = "certificate"
40*ebfedea0SLionel Sambuc		short = "c"
41*ebfedea0SLionel Sambuc		type = "strings"
42*ebfedea0SLionel Sambuc		argument = "certificate-store"
43*ebfedea0SLionel Sambuc		help = "certificate stores to pull certificates from"
44*ebfedea0SLionel Sambuc	}
45*ebfedea0SLionel Sambuc	option = {
46*ebfedea0SLionel Sambuc		long = "signer"
47*ebfedea0SLionel Sambuc		short = "s"
48*ebfedea0SLionel Sambuc		type = "string"
49*ebfedea0SLionel Sambuc		argument = "signer-friendly-name"
50*ebfedea0SLionel Sambuc		help = "certificate to sign with"
51*ebfedea0SLionel Sambuc	}
52*ebfedea0SLionel Sambuc	option = {
53*ebfedea0SLionel Sambuc		long = "anchors"
54*ebfedea0SLionel Sambuc		type = "strings"
55*ebfedea0SLionel Sambuc		argument = "certificate-store"
56*ebfedea0SLionel Sambuc		help = "trust anchors"
57*ebfedea0SLionel Sambuc	}
58*ebfedea0SLionel Sambuc	option = {
59*ebfedea0SLionel Sambuc		long = "pool"
60*ebfedea0SLionel Sambuc		type = "strings"
61*ebfedea0SLionel Sambuc		argument = "certificate-pool"
62*ebfedea0SLionel Sambuc		help = "certificate store to pull certificates from"
63*ebfedea0SLionel Sambuc	}
64*ebfedea0SLionel Sambuc	option = {
65*ebfedea0SLionel Sambuc		long = "pass"
66*ebfedea0SLionel Sambuc		type = "strings"
67*ebfedea0SLionel Sambuc		argument = "password"
68*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
69*ebfedea0SLionel Sambuc	}
70*ebfedea0SLionel Sambuc	option = {
71*ebfedea0SLionel Sambuc		long = "peer-alg"
72*ebfedea0SLionel Sambuc		type = "strings"
73*ebfedea0SLionel Sambuc		argument = "oid"
74*ebfedea0SLionel Sambuc		help = "oid that the peer support"
75*ebfedea0SLionel Sambuc	}
76*ebfedea0SLionel Sambuc	option = {
77*ebfedea0SLionel Sambuc		long = "content-type"
78*ebfedea0SLionel Sambuc		type = "string"
79*ebfedea0SLionel Sambuc		argument = "oid"
80*ebfedea0SLionel Sambuc		help = "content type oid"
81*ebfedea0SLionel Sambuc	}
82*ebfedea0SLionel Sambuc	option = {
83*ebfedea0SLionel Sambuc		long = "content-info"
84*ebfedea0SLionel Sambuc		type = "flag"
85*ebfedea0SLionel Sambuc		help = "wrapped out-data in a ContentInfo"
86*ebfedea0SLionel Sambuc	}
87*ebfedea0SLionel Sambuc	option = {
88*ebfedea0SLionel Sambuc		long = "pem"
89*ebfedea0SLionel Sambuc		type = "flag"
90*ebfedea0SLionel Sambuc		help = "wrap out-data in PEM armor"
91*ebfedea0SLionel Sambuc	}
92*ebfedea0SLionel Sambuc	option = {
93*ebfedea0SLionel Sambuc		long = "detached-signature"
94*ebfedea0SLionel Sambuc		type = "flag"
95*ebfedea0SLionel Sambuc		help = "create a detached signature"
96*ebfedea0SLionel Sambuc	}
97*ebfedea0SLionel Sambuc	option = {
98*ebfedea0SLionel Sambuc		long = "signer"
99*ebfedea0SLionel Sambuc		type = "-flag"
100*ebfedea0SLionel Sambuc		help = "do not sign"
101*ebfedea0SLionel Sambuc	}
102*ebfedea0SLionel Sambuc	option = {
103*ebfedea0SLionel Sambuc		long = "id-by-name"
104*ebfedea0SLionel Sambuc		type = "flag"
105*ebfedea0SLionel Sambuc		help = "use subject name for CMS Identifier"
106*ebfedea0SLionel Sambuc	}
107*ebfedea0SLionel Sambuc	option = {
108*ebfedea0SLionel Sambuc		long = "embedded-certs"
109*ebfedea0SLionel Sambuc		type = "-flag"
110*ebfedea0SLionel Sambuc		help = "dont embedded certficiates"
111*ebfedea0SLionel Sambuc	}
112*ebfedea0SLionel Sambuc	option = {
113*ebfedea0SLionel Sambuc		long = "embed-leaf-only"
114*ebfedea0SLionel Sambuc		type = "flag"
115*ebfedea0SLionel Sambuc		help = "only embed leaf certificate"
116*ebfedea0SLionel Sambuc	}
117*ebfedea0SLionel Sambuc	min_args="1"
118*ebfedea0SLionel Sambuc	max_args="2"
119*ebfedea0SLionel Sambuc	argument="in-file out-file"
120*ebfedea0SLionel Sambuc	help = "Wrap a file within a SignedData object"
121*ebfedea0SLionel Sambuc}
122*ebfedea0SLionel Sambuccommand = {
123*ebfedea0SLionel Sambuc	name = "cms-verify-sd"
124*ebfedea0SLionel Sambuc	option = {
125*ebfedea0SLionel Sambuc		long = "anchors"
126*ebfedea0SLionel Sambuc		short = "D"
127*ebfedea0SLionel Sambuc		type = "strings"
128*ebfedea0SLionel Sambuc		argument = "certificate-store"
129*ebfedea0SLionel Sambuc		help = "trust anchors"
130*ebfedea0SLionel Sambuc	}
131*ebfedea0SLionel Sambuc	option = {
132*ebfedea0SLionel Sambuc		long = "certificate"
133*ebfedea0SLionel Sambuc		short = "c"
134*ebfedea0SLionel Sambuc		type = "strings"
135*ebfedea0SLionel Sambuc		argument = "certificate-store"
136*ebfedea0SLionel Sambuc		help = "certificate store to pull certificates from"
137*ebfedea0SLionel Sambuc	}
138*ebfedea0SLionel Sambuc	option = {
139*ebfedea0SLionel Sambuc		long = "pass"
140*ebfedea0SLionel Sambuc		type = "strings"
141*ebfedea0SLionel Sambuc		argument = "password"
142*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
143*ebfedea0SLionel Sambuc	}
144*ebfedea0SLionel Sambuc	option = {
145*ebfedea0SLionel Sambuc		long = "missing-revoke"
146*ebfedea0SLionel Sambuc		type = "flag"
147*ebfedea0SLionel Sambuc		help = "missing CRL/OCSP is ok"
148*ebfedea0SLionel Sambuc	}
149*ebfedea0SLionel Sambuc	option = {
150*ebfedea0SLionel Sambuc		long = "content-info"
151*ebfedea0SLionel Sambuc		type = "flag"
152*ebfedea0SLionel Sambuc		help = "unwrap in-data that's in a ContentInfo"
153*ebfedea0SLionel Sambuc	}
154*ebfedea0SLionel Sambuc	option = {
155*ebfedea0SLionel Sambuc		long = "pem"
156*ebfedea0SLionel Sambuc		type = "flag"
157*ebfedea0SLionel Sambuc		help = "unwrap in-data from PEM armor"
158*ebfedea0SLionel Sambuc	}
159*ebfedea0SLionel Sambuc	option = {
160*ebfedea0SLionel Sambuc		long = "signer-allowed"
161*ebfedea0SLionel Sambuc		type = "-flag"
162*ebfedea0SLionel Sambuc		help = "allow no signer"
163*ebfedea0SLionel Sambuc	}
164*ebfedea0SLionel Sambuc	option = {
165*ebfedea0SLionel Sambuc		long = "allow-wrong-oid"
166*ebfedea0SLionel Sambuc		type = "flag"
167*ebfedea0SLionel Sambuc		help = "allow wrong oid flag"
168*ebfedea0SLionel Sambuc	}
169*ebfedea0SLionel Sambuc	option = {
170*ebfedea0SLionel Sambuc		long = "signed-content"
171*ebfedea0SLionel Sambuc		type = "string"
172*ebfedea0SLionel Sambuc		help = "file containing content"
173*ebfedea0SLionel Sambuc	}
174*ebfedea0SLionel Sambuc	min_args="1"
175*ebfedea0SLionel Sambuc	max_args="2"
176*ebfedea0SLionel Sambuc	argument="in-file [out-file]"
177*ebfedea0SLionel Sambuc	help = "Verify a file within a SignedData object"
178*ebfedea0SLionel Sambuc}
179*ebfedea0SLionel Sambuccommand = {
180*ebfedea0SLionel Sambuc	name = "cms-unenvelope"
181*ebfedea0SLionel Sambuc	option = {
182*ebfedea0SLionel Sambuc		long = "certificate"
183*ebfedea0SLionel Sambuc		short = "c"
184*ebfedea0SLionel Sambuc		type = "strings"
185*ebfedea0SLionel Sambuc		argument = "certificate-store"
186*ebfedea0SLionel Sambuc		help = "certificate used to decrypt the data"
187*ebfedea0SLionel Sambuc	}
188*ebfedea0SLionel Sambuc	option = {
189*ebfedea0SLionel Sambuc		long = "pass"
190*ebfedea0SLionel Sambuc		type = "strings"
191*ebfedea0SLionel Sambuc		argument = "password"
192*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
193*ebfedea0SLionel Sambuc	}
194*ebfedea0SLionel Sambuc	option = {
195*ebfedea0SLionel Sambuc		long = "content-info"
196*ebfedea0SLionel Sambuc		type = "flag"
197*ebfedea0SLionel Sambuc		help = "wrapped out-data in a ContentInfo"
198*ebfedea0SLionel Sambuc	}
199*ebfedea0SLionel Sambuc	option = {
200*ebfedea0SLionel Sambuc		long = "allow-weak-crypto"
201*ebfedea0SLionel Sambuc		type = "flag"
202*ebfedea0SLionel Sambuc		help = "allow weak crypto"
203*ebfedea0SLionel Sambuc	}
204*ebfedea0SLionel Sambuc	min_args="2"
205*ebfedea0SLionel Sambuc	argument="in-file out-file"
206*ebfedea0SLionel Sambuc	help = "Unenvelope a file containing a EnvelopedData object"
207*ebfedea0SLionel Sambuc}
208*ebfedea0SLionel Sambuccommand = {
209*ebfedea0SLionel Sambuc	name = "cms-envelope"
210*ebfedea0SLionel Sambuc	function = "cms_create_enveloped"
211*ebfedea0SLionel Sambuc	option = {
212*ebfedea0SLionel Sambuc		long = "certificate"
213*ebfedea0SLionel Sambuc		short = "c"
214*ebfedea0SLionel Sambuc		type = "strings"
215*ebfedea0SLionel Sambuc		argument = "certificate-store"
216*ebfedea0SLionel Sambuc		help = "certificates used to receive the data"
217*ebfedea0SLionel Sambuc	}
218*ebfedea0SLionel Sambuc	option = {
219*ebfedea0SLionel Sambuc		long = "pass"
220*ebfedea0SLionel Sambuc		type = "strings"
221*ebfedea0SLionel Sambuc		argument = "password"
222*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
223*ebfedea0SLionel Sambuc	}
224*ebfedea0SLionel Sambuc	option = {
225*ebfedea0SLionel Sambuc		long = "encryption-type"
226*ebfedea0SLionel Sambuc		type = "string"
227*ebfedea0SLionel Sambuc		argument = "enctype"
228*ebfedea0SLionel Sambuc		help = "enctype"
229*ebfedea0SLionel Sambuc	}
230*ebfedea0SLionel Sambuc	option = {
231*ebfedea0SLionel Sambuc		long = "content-type"
232*ebfedea0SLionel Sambuc		type = "string"
233*ebfedea0SLionel Sambuc		argument = "oid"
234*ebfedea0SLionel Sambuc		help = "content type oid"
235*ebfedea0SLionel Sambuc	}
236*ebfedea0SLionel Sambuc	option = {
237*ebfedea0SLionel Sambuc		long = "content-info"
238*ebfedea0SLionel Sambuc		type = "flag"
239*ebfedea0SLionel Sambuc		help = "wrapped out-data in a ContentInfo"
240*ebfedea0SLionel Sambuc	}
241*ebfedea0SLionel Sambuc	option = {
242*ebfedea0SLionel Sambuc		long = "allow-weak-crypto"
243*ebfedea0SLionel Sambuc		type = "flag"
244*ebfedea0SLionel Sambuc		help = "allow weak crypto"
245*ebfedea0SLionel Sambuc	}
246*ebfedea0SLionel Sambuc	min_args="2"
247*ebfedea0SLionel Sambuc	argument="in-file out-file"
248*ebfedea0SLionel Sambuc	help = "Envelope a file containing a EnvelopedData object"
249*ebfedea0SLionel Sambuc}
250*ebfedea0SLionel Sambuccommand = {
251*ebfedea0SLionel Sambuc	name = "verify"
252*ebfedea0SLionel Sambuc	function = "pcert_verify"
253*ebfedea0SLionel Sambuc	option = {
254*ebfedea0SLionel Sambuc		long = "pass"
255*ebfedea0SLionel Sambuc		type = "strings"
256*ebfedea0SLionel Sambuc		argument = "password"
257*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
258*ebfedea0SLionel Sambuc	}
259*ebfedea0SLionel Sambuc	option = {
260*ebfedea0SLionel Sambuc		long = "allow-proxy-certificate"
261*ebfedea0SLionel Sambuc		type = "flag"
262*ebfedea0SLionel Sambuc		help = "allow proxy certificates"
263*ebfedea0SLionel Sambuc	}
264*ebfedea0SLionel Sambuc	option = {
265*ebfedea0SLionel Sambuc		long = "missing-revoke"
266*ebfedea0SLionel Sambuc		type = "flag"
267*ebfedea0SLionel Sambuc		help = "missing CRL/OCSP is ok"
268*ebfedea0SLionel Sambuc	}
269*ebfedea0SLionel Sambuc	option = {
270*ebfedea0SLionel Sambuc		long = "time"
271*ebfedea0SLionel Sambuc		type = "string"
272*ebfedea0SLionel Sambuc		help = "time when to validate the chain"
273*ebfedea0SLionel Sambuc	}
274*ebfedea0SLionel Sambuc	option = {
275*ebfedea0SLionel Sambuc		long = "verbose"
276*ebfedea0SLionel Sambuc		short = "v"
277*ebfedea0SLionel Sambuc		type = "flag"
278*ebfedea0SLionel Sambuc		help = "verbose logging"
279*ebfedea0SLionel Sambuc	}
280*ebfedea0SLionel Sambuc	option = {
281*ebfedea0SLionel Sambuc		long = "max-depth"
282*ebfedea0SLionel Sambuc		type = "integer"
283*ebfedea0SLionel Sambuc		help = "maximum search length of certificate trust anchor"
284*ebfedea0SLionel Sambuc	}
285*ebfedea0SLionel Sambuc	option = {
286*ebfedea0SLionel Sambuc		long = "hostname"
287*ebfedea0SLionel Sambuc		type = "string"
288*ebfedea0SLionel Sambuc		help = "match hostname to certificate"
289*ebfedea0SLionel Sambuc	}
290*ebfedea0SLionel Sambuc	argument = "cert:foo chain:cert1 chain:cert2 anchor:anchor1 anchor:anchor2"
291*ebfedea0SLionel Sambuc	help = "Verify certificate chain"
292*ebfedea0SLionel Sambuc}
293*ebfedea0SLionel Sambuccommand = {
294*ebfedea0SLionel Sambuc	name = "print"
295*ebfedea0SLionel Sambuc	function = "pcert_print"
296*ebfedea0SLionel Sambuc	option = {
297*ebfedea0SLionel Sambuc		long = "pass"
298*ebfedea0SLionel Sambuc		type = "strings"
299*ebfedea0SLionel Sambuc		argument = "password"
300*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
301*ebfedea0SLionel Sambuc	}
302*ebfedea0SLionel Sambuc	option = {
303*ebfedea0SLionel Sambuc		long = "content"
304*ebfedea0SLionel Sambuc		type = "flag"
305*ebfedea0SLionel Sambuc		help = "print the content of the certificates"
306*ebfedea0SLionel Sambuc	}
307*ebfedea0SLionel Sambuc	option = {
308*ebfedea0SLionel Sambuc		long = "never-fail"
309*ebfedea0SLionel Sambuc		type = "flag"
310*ebfedea0SLionel Sambuc		help = "never fail with an error code"
311*ebfedea0SLionel Sambuc	}
312*ebfedea0SLionel Sambuc	option = {
313*ebfedea0SLionel Sambuc		long = "info"
314*ebfedea0SLionel Sambuc		type = "flag"
315*ebfedea0SLionel Sambuc		help = "print the information about the certificate store"
316*ebfedea0SLionel Sambuc	}
317*ebfedea0SLionel Sambuc	min_args="1"
318*ebfedea0SLionel Sambuc	argument="certificate ..."
319*ebfedea0SLionel Sambuc	help = "Print certificates"
320*ebfedea0SLionel Sambuc}
321*ebfedea0SLionel Sambuccommand = {
322*ebfedea0SLionel Sambuc	name = "validate"
323*ebfedea0SLionel Sambuc	function = "pcert_validate"
324*ebfedea0SLionel Sambuc	option = {
325*ebfedea0SLionel Sambuc		long = "pass"
326*ebfedea0SLionel Sambuc		type = "strings"
327*ebfedea0SLionel Sambuc		argument = "password"
328*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
329*ebfedea0SLionel Sambuc	}
330*ebfedea0SLionel Sambuc	min_args="1"
331*ebfedea0SLionel Sambuc	argument="certificate ..."
332*ebfedea0SLionel Sambuc	help = "Validate content of certificates"
333*ebfedea0SLionel Sambuc}
334*ebfedea0SLionel Sambuccommand = {
335*ebfedea0SLionel Sambuc	name = "certificate-copy"
336*ebfedea0SLionel Sambuc	name = "cc"
337*ebfedea0SLionel Sambuc	option = {
338*ebfedea0SLionel Sambuc		long = "in-pass"
339*ebfedea0SLionel Sambuc		type = "strings"
340*ebfedea0SLionel Sambuc		argument = "password"
341*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
342*ebfedea0SLionel Sambuc	}
343*ebfedea0SLionel Sambuc	option = {
344*ebfedea0SLionel Sambuc		long = "out-pass"
345*ebfedea0SLionel Sambuc		type = "string"
346*ebfedea0SLionel Sambuc		argument = "password"
347*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
348*ebfedea0SLionel Sambuc	}
349*ebfedea0SLionel Sambuc	min_args="2"
350*ebfedea0SLionel Sambuc	argument="in-certificates-1 ... out-certificate"
351*ebfedea0SLionel Sambuc	help = "Copy in certificates stores into out certificate store"
352*ebfedea0SLionel Sambuc}
353*ebfedea0SLionel Sambuccommand = {
354*ebfedea0SLionel Sambuc	name = "ocsp-fetch"
355*ebfedea0SLionel Sambuc	option = {
356*ebfedea0SLionel Sambuc		long = "pass"
357*ebfedea0SLionel Sambuc		type = "strings"
358*ebfedea0SLionel Sambuc		argument = "password"
359*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
360*ebfedea0SLionel Sambuc	}
361*ebfedea0SLionel Sambuc	option = {
362*ebfedea0SLionel Sambuc		long = "sign"
363*ebfedea0SLionel Sambuc		type = "string"
364*ebfedea0SLionel Sambuc		argument = "certificate"
365*ebfedea0SLionel Sambuc		help = "certificate use to sign the request"
366*ebfedea0SLionel Sambuc	}
367*ebfedea0SLionel Sambuc	option = {
368*ebfedea0SLionel Sambuc		long = "url-path"
369*ebfedea0SLionel Sambuc		type = "string"
370*ebfedea0SLionel Sambuc		argument = "url"
371*ebfedea0SLionel Sambuc		help = "part after host in url to put in the request"
372*ebfedea0SLionel Sambuc	}
373*ebfedea0SLionel Sambuc	option = {
374*ebfedea0SLionel Sambuc		long = "nonce"
375*ebfedea0SLionel Sambuc		type = "-flag"
376*ebfedea0SLionel Sambuc		default = "1"
377*ebfedea0SLionel Sambuc		help = "don't include nonce in request"
378*ebfedea0SLionel Sambuc	}
379*ebfedea0SLionel Sambuc	option = {
380*ebfedea0SLionel Sambuc		long = "pool"
381*ebfedea0SLionel Sambuc		type = "strings"
382*ebfedea0SLionel Sambuc		argument = "certificate-store"
383*ebfedea0SLionel Sambuc		help = "pool to find parent certificate in"
384*ebfedea0SLionel Sambuc	}
385*ebfedea0SLionel Sambuc	min_args="2"
386*ebfedea0SLionel Sambuc	argument="outfile certs ..."
387*ebfedea0SLionel Sambuc	help = "Fetch OCSP responses for the following certs"
388*ebfedea0SLionel Sambuc}
389*ebfedea0SLionel Sambuccommand = {
390*ebfedea0SLionel Sambuc	option = {
391*ebfedea0SLionel Sambuc		long = "ocsp-file"
392*ebfedea0SLionel Sambuc		type = "string"
393*ebfedea0SLionel Sambuc		help = "OCSP file"
394*ebfedea0SLionel Sambuc	}
395*ebfedea0SLionel Sambuc	name = "ocsp-verify"
396*ebfedea0SLionel Sambuc	min_args="1"
397*ebfedea0SLionel Sambuc	argument="certificates ..."
398*ebfedea0SLionel Sambuc	help = "Check that certificates are in OCSP file and valid"
399*ebfedea0SLionel Sambuc}
400*ebfedea0SLionel Sambuccommand = {
401*ebfedea0SLionel Sambuc	name = "ocsp-print"
402*ebfedea0SLionel Sambuc	option = {
403*ebfedea0SLionel Sambuc		long = "verbose"
404*ebfedea0SLionel Sambuc		type = "flag"
405*ebfedea0SLionel Sambuc		help = "verbose"
406*ebfedea0SLionel Sambuc	}
407*ebfedea0SLionel Sambuc	min_args="1"
408*ebfedea0SLionel Sambuc	argument="ocsp-response-file ..."
409*ebfedea0SLionel Sambuc	help = "Print the OCSP responses"
410*ebfedea0SLionel Sambuc}
411*ebfedea0SLionel Sambuccommand = {
412*ebfedea0SLionel Sambuc	name = "request-create"
413*ebfedea0SLionel Sambuc	option = {
414*ebfedea0SLionel Sambuc		long = "subject"
415*ebfedea0SLionel Sambuc		type = "string"
416*ebfedea0SLionel Sambuc		help = "Subject DN"
417*ebfedea0SLionel Sambuc	}
418*ebfedea0SLionel Sambuc	option = {
419*ebfedea0SLionel Sambuc		long = "email"
420*ebfedea0SLionel Sambuc		type = "strings"
421*ebfedea0SLionel Sambuc		help = "Email address in SubjectAltName"
422*ebfedea0SLionel Sambuc	}
423*ebfedea0SLionel Sambuc	option = {
424*ebfedea0SLionel Sambuc		long = "dnsname"
425*ebfedea0SLionel Sambuc		type = "strings"
426*ebfedea0SLionel Sambuc		help = "Hostname or domainname in SubjectAltName"
427*ebfedea0SLionel Sambuc	}
428*ebfedea0SLionel Sambuc	option = {
429*ebfedea0SLionel Sambuc		long = "type"
430*ebfedea0SLionel Sambuc		type = "string"
431*ebfedea0SLionel Sambuc		help = "Type of request CRMF or PKCS10, defaults to PKCS10"
432*ebfedea0SLionel Sambuc	}
433*ebfedea0SLionel Sambuc	option = {
434*ebfedea0SLionel Sambuc		long = "key"
435*ebfedea0SLionel Sambuc		type = "string"
436*ebfedea0SLionel Sambuc		help = "Key-pair"
437*ebfedea0SLionel Sambuc	}
438*ebfedea0SLionel Sambuc	option = {
439*ebfedea0SLionel Sambuc		long = "generate-key"
440*ebfedea0SLionel Sambuc		type = "string"
441*ebfedea0SLionel Sambuc		help = "keytype"
442*ebfedea0SLionel Sambuc	}
443*ebfedea0SLionel Sambuc	option = {
444*ebfedea0SLionel Sambuc	        long = "key-bits"
445*ebfedea0SLionel Sambuc		type = "integer"
446*ebfedea0SLionel Sambuc		help = "number of bits in the generated key";
447*ebfedea0SLionel Sambuc	}
448*ebfedea0SLionel Sambuc	option = {
449*ebfedea0SLionel Sambuc		long = "verbose"
450*ebfedea0SLionel Sambuc		type = "flag"
451*ebfedea0SLionel Sambuc		help = "verbose status"
452*ebfedea0SLionel Sambuc	}
453*ebfedea0SLionel Sambuc	min_args="1"
454*ebfedea0SLionel Sambuc	max_args="1"
455*ebfedea0SLionel Sambuc	argument="output-file"
456*ebfedea0SLionel Sambuc	help = "Create a CRMF or PKCS10 request"
457*ebfedea0SLionel Sambuc}
458*ebfedea0SLionel Sambuccommand = {
459*ebfedea0SLionel Sambuc	name = "request-print"
460*ebfedea0SLionel Sambuc	option = {
461*ebfedea0SLionel Sambuc		long = "verbose"
462*ebfedea0SLionel Sambuc		type = "flag"
463*ebfedea0SLionel Sambuc		help = "verbose printing"
464*ebfedea0SLionel Sambuc	}
465*ebfedea0SLionel Sambuc	min_args="1"
466*ebfedea0SLionel Sambuc	argument="requests ..."
467*ebfedea0SLionel Sambuc	help = "Print requests"
468*ebfedea0SLionel Sambuc}
469*ebfedea0SLionel Sambuccommand = {
470*ebfedea0SLionel Sambuc	name = "query"
471*ebfedea0SLionel Sambuc	option = {
472*ebfedea0SLionel Sambuc		long = "exact"
473*ebfedea0SLionel Sambuc		type = "flag"
474*ebfedea0SLionel Sambuc		help = "exact match"
475*ebfedea0SLionel Sambuc	}
476*ebfedea0SLionel Sambuc	option = {
477*ebfedea0SLionel Sambuc		long = "private-key"
478*ebfedea0SLionel Sambuc		type = "flag"
479*ebfedea0SLionel Sambuc		help = "search for private key"
480*ebfedea0SLionel Sambuc	}
481*ebfedea0SLionel Sambuc	option = {
482*ebfedea0SLionel Sambuc		long = "friendlyname"
483*ebfedea0SLionel Sambuc		type = "string"
484*ebfedea0SLionel Sambuc		argument = "name"
485*ebfedea0SLionel Sambuc		help = "match on friendly name"
486*ebfedea0SLionel Sambuc	}
487*ebfedea0SLionel Sambuc	option = {
488*ebfedea0SLionel Sambuc		long = "eku"
489*ebfedea0SLionel Sambuc		type = "string"
490*ebfedea0SLionel Sambuc		argument = "oid-string"
491*ebfedea0SLionel Sambuc		help = "match on EKU"
492*ebfedea0SLionel Sambuc	}
493*ebfedea0SLionel Sambuc	option = {
494*ebfedea0SLionel Sambuc		long = "expr"
495*ebfedea0SLionel Sambuc		type = "string"
496*ebfedea0SLionel Sambuc		argument = "expression"
497*ebfedea0SLionel Sambuc		help = "match on expression"
498*ebfedea0SLionel Sambuc	}
499*ebfedea0SLionel Sambuc	option = {
500*ebfedea0SLionel Sambuc		long = "keyEncipherment"
501*ebfedea0SLionel Sambuc		type = "flag"
502*ebfedea0SLionel Sambuc		help = "match keyEncipherment certificates"
503*ebfedea0SLionel Sambuc	}
504*ebfedea0SLionel Sambuc	option = {
505*ebfedea0SLionel Sambuc		long = "digitalSignature"
506*ebfedea0SLionel Sambuc		type = "flag"
507*ebfedea0SLionel Sambuc		help = "match digitalSignature certificates"
508*ebfedea0SLionel Sambuc	}
509*ebfedea0SLionel Sambuc	option = {
510*ebfedea0SLionel Sambuc		long = "print"
511*ebfedea0SLionel Sambuc		type = "flag"
512*ebfedea0SLionel Sambuc		help = "print matches"
513*ebfedea0SLionel Sambuc	}
514*ebfedea0SLionel Sambuc	option = {
515*ebfedea0SLionel Sambuc		long = "pass"
516*ebfedea0SLionel Sambuc		type = "strings"
517*ebfedea0SLionel Sambuc		argument = "password"
518*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
519*ebfedea0SLionel Sambuc	}
520*ebfedea0SLionel Sambuc	min_args="1"
521*ebfedea0SLionel Sambuc	argument="certificates ..."
522*ebfedea0SLionel Sambuc	help = "Query the certificates for a match"
523*ebfedea0SLionel Sambuc}
524*ebfedea0SLionel Sambuccommand = {
525*ebfedea0SLionel Sambuc	name = "info"
526*ebfedea0SLionel Sambuc}
527*ebfedea0SLionel Sambuccommand = {
528*ebfedea0SLionel Sambuc	name = "random-data"
529*ebfedea0SLionel Sambuc	min_args="1"
530*ebfedea0SLionel Sambuc	argument="bytes"
531*ebfedea0SLionel Sambuc	help = "Generates random bytes and prints them to standard output"
532*ebfedea0SLionel Sambuc}
533*ebfedea0SLionel Sambuccommand = {
534*ebfedea0SLionel Sambuc	option = {
535*ebfedea0SLionel Sambuc		long = "type"
536*ebfedea0SLionel Sambuc		type = "string"
537*ebfedea0SLionel Sambuc		help = "type of CMS algorithm"
538*ebfedea0SLionel Sambuc	}
539*ebfedea0SLionel Sambuc	name = "crypto-available"
540*ebfedea0SLionel Sambuc	min_args="0"
541*ebfedea0SLionel Sambuc	help = "Print available CMS crypto types"
542*ebfedea0SLionel Sambuc}
543*ebfedea0SLionel Sambuccommand = {
544*ebfedea0SLionel Sambuc	option = {
545*ebfedea0SLionel Sambuc		long = "type"
546*ebfedea0SLionel Sambuc		type = "string"
547*ebfedea0SLionel Sambuc		help = "type of CMS algorithm"
548*ebfedea0SLionel Sambuc	}
549*ebfedea0SLionel Sambuc	option = {
550*ebfedea0SLionel Sambuc		long = "certificate"
551*ebfedea0SLionel Sambuc		type = "string"
552*ebfedea0SLionel Sambuc		help = "source certificate limiting the choices"
553*ebfedea0SLionel Sambuc	}
554*ebfedea0SLionel Sambuc	option = {
555*ebfedea0SLionel Sambuc		long = "peer-cmstype"
556*ebfedea0SLionel Sambuc		type = "strings"
557*ebfedea0SLionel Sambuc		help = "peer limiting cmstypes"
558*ebfedea0SLionel Sambuc	}
559*ebfedea0SLionel Sambuc	name = "crypto-select"
560*ebfedea0SLionel Sambuc	min_args="0"
561*ebfedea0SLionel Sambuc	help = "Print selected CMS type"
562*ebfedea0SLionel Sambuc}
563*ebfedea0SLionel Sambuccommand = {
564*ebfedea0SLionel Sambuc	option = {
565*ebfedea0SLionel Sambuc		long = "decode"
566*ebfedea0SLionel Sambuc		short = "d"
567*ebfedea0SLionel Sambuc		type = "flag"
568*ebfedea0SLionel Sambuc		help = "decode instead of encode"
569*ebfedea0SLionel Sambuc	}
570*ebfedea0SLionel Sambuc	name = "hex"
571*ebfedea0SLionel Sambuc	function = "hxtool_hex"
572*ebfedea0SLionel Sambuc	min_args="0"
573*ebfedea0SLionel Sambuc	help = "Encode input to hex"
574*ebfedea0SLionel Sambuc}
575*ebfedea0SLionel Sambuccommand = {
576*ebfedea0SLionel Sambuc	option = {
577*ebfedea0SLionel Sambuc		long = "issue-ca"
578*ebfedea0SLionel Sambuc		type = "flag"
579*ebfedea0SLionel Sambuc		help = "Issue a CA certificate"
580*ebfedea0SLionel Sambuc	}
581*ebfedea0SLionel Sambuc	option = {
582*ebfedea0SLionel Sambuc		long = "issue-proxy"
583*ebfedea0SLionel Sambuc		type = "flag"
584*ebfedea0SLionel Sambuc		help = "Issue a proxy certificate"
585*ebfedea0SLionel Sambuc	}
586*ebfedea0SLionel Sambuc	option = {
587*ebfedea0SLionel Sambuc		long = "domain-controller"
588*ebfedea0SLionel Sambuc		type = "flag"
589*ebfedea0SLionel Sambuc		help = "Issue a MS domaincontroller certificate"
590*ebfedea0SLionel Sambuc	}
591*ebfedea0SLionel Sambuc	option = {
592*ebfedea0SLionel Sambuc		long = "subject"
593*ebfedea0SLionel Sambuc		type = "string"
594*ebfedea0SLionel Sambuc		help = "Subject of issued certificate"
595*ebfedea0SLionel Sambuc	}
596*ebfedea0SLionel Sambuc	option = {
597*ebfedea0SLionel Sambuc		long = "ca-certificate"
598*ebfedea0SLionel Sambuc		type = "string"
599*ebfedea0SLionel Sambuc		help = "Issuing CA certificate"
600*ebfedea0SLionel Sambuc	}
601*ebfedea0SLionel Sambuc	option = {
602*ebfedea0SLionel Sambuc		long = "self-signed"
603*ebfedea0SLionel Sambuc		type = "flag"
604*ebfedea0SLionel Sambuc		help = "Issuing a self-signed certificate"
605*ebfedea0SLionel Sambuc	}
606*ebfedea0SLionel Sambuc	option = {
607*ebfedea0SLionel Sambuc		long = "ca-private-key"
608*ebfedea0SLionel Sambuc		type = "string"
609*ebfedea0SLionel Sambuc		help = "Private key for self-signed certificate"
610*ebfedea0SLionel Sambuc	}
611*ebfedea0SLionel Sambuc	option = {
612*ebfedea0SLionel Sambuc		long = "certificate"
613*ebfedea0SLionel Sambuc		type = "string"
614*ebfedea0SLionel Sambuc		help = "Issued certificate"
615*ebfedea0SLionel Sambuc	}
616*ebfedea0SLionel Sambuc	option = {
617*ebfedea0SLionel Sambuc		long = "type"
618*ebfedea0SLionel Sambuc		type = "strings"
619*ebfedea0SLionel Sambuc		help = "Types of certificate to issue (can be used more then once)"
620*ebfedea0SLionel Sambuc	}
621*ebfedea0SLionel Sambuc	option = {
622*ebfedea0SLionel Sambuc		long = "lifetime"
623*ebfedea0SLionel Sambuc		type = "string"
624*ebfedea0SLionel Sambuc		help = "Lifetime of certificate"
625*ebfedea0SLionel Sambuc	}
626*ebfedea0SLionel Sambuc	option = {
627*ebfedea0SLionel Sambuc		long = "serial-number"
628*ebfedea0SLionel Sambuc		type = "string"
629*ebfedea0SLionel Sambuc		help = "serial-number of certificate"
630*ebfedea0SLionel Sambuc	}
631*ebfedea0SLionel Sambuc	option = {
632*ebfedea0SLionel Sambuc		long = "path-length"
633*ebfedea0SLionel Sambuc		default = "-1"
634*ebfedea0SLionel Sambuc		type = "integer"
635*ebfedea0SLionel Sambuc		help = "Maximum path length (CA and proxy certificates), -1 no limit"
636*ebfedea0SLionel Sambuc	}
637*ebfedea0SLionel Sambuc	option = {
638*ebfedea0SLionel Sambuc		long = "hostname"
639*ebfedea0SLionel Sambuc		type = "strings"
640*ebfedea0SLionel Sambuc		help = "DNS names this certificate is allowed to serve"
641*ebfedea0SLionel Sambuc	}
642*ebfedea0SLionel Sambuc	option = {
643*ebfedea0SLionel Sambuc		long = "email"
644*ebfedea0SLionel Sambuc		type = "strings"
645*ebfedea0SLionel Sambuc		help = "email addresses assigned to this certificate"
646*ebfedea0SLionel Sambuc	}
647*ebfedea0SLionel Sambuc	option = {
648*ebfedea0SLionel Sambuc		long = "pk-init-principal"
649*ebfedea0SLionel Sambuc		type = "string"
650*ebfedea0SLionel Sambuc		help = "PK-INIT principal (for SAN)"
651*ebfedea0SLionel Sambuc	}
652*ebfedea0SLionel Sambuc	option = {
653*ebfedea0SLionel Sambuc		long = "ms-upn"
654*ebfedea0SLionel Sambuc		type = "string"
655*ebfedea0SLionel Sambuc		help = "Microsoft UPN (for SAN)"
656*ebfedea0SLionel Sambuc	}
657*ebfedea0SLionel Sambuc	option = {
658*ebfedea0SLionel Sambuc		long = "jid"
659*ebfedea0SLionel Sambuc		type = "string"
660*ebfedea0SLionel Sambuc		help = "XMPP jabber id (for SAN)"
661*ebfedea0SLionel Sambuc	}
662*ebfedea0SLionel Sambuc	option = {
663*ebfedea0SLionel Sambuc		long = "req"
664*ebfedea0SLionel Sambuc		type = "string"
665*ebfedea0SLionel Sambuc		help = "certificate request"
666*ebfedea0SLionel Sambuc	}
667*ebfedea0SLionel Sambuc	option = {
668*ebfedea0SLionel Sambuc		long = "certificate-private-key"
669*ebfedea0SLionel Sambuc		type = "string"
670*ebfedea0SLionel Sambuc		help = "private-key"
671*ebfedea0SLionel Sambuc	}
672*ebfedea0SLionel Sambuc	option = {
673*ebfedea0SLionel Sambuc		long = "generate-key"
674*ebfedea0SLionel Sambuc		type = "string"
675*ebfedea0SLionel Sambuc		help = "keytype"
676*ebfedea0SLionel Sambuc	}
677*ebfedea0SLionel Sambuc	option = {
678*ebfedea0SLionel Sambuc	        long = "key-bits"
679*ebfedea0SLionel Sambuc		type = "integer"
680*ebfedea0SLionel Sambuc		help = "number of bits in the generated key"
681*ebfedea0SLionel Sambuc	}
682*ebfedea0SLionel Sambuc	option = {
683*ebfedea0SLionel Sambuc	        long = "crl-uri"
684*ebfedea0SLionel Sambuc		type = "string"
685*ebfedea0SLionel Sambuc		help = "URI to CRL"
686*ebfedea0SLionel Sambuc	}
687*ebfedea0SLionel Sambuc	option = {
688*ebfedea0SLionel Sambuc		long = "template-certificate"
689*ebfedea0SLionel Sambuc		type = "string"
690*ebfedea0SLionel Sambuc		help = "certificate"
691*ebfedea0SLionel Sambuc	}
692*ebfedea0SLionel Sambuc	option = {
693*ebfedea0SLionel Sambuc		long = "template-fields"
694*ebfedea0SLionel Sambuc		type = "string"
695*ebfedea0SLionel Sambuc		help = "flag"
696*ebfedea0SLionel Sambuc	}
697*ebfedea0SLionel Sambuc	name = "certificate-sign"
698*ebfedea0SLionel Sambuc	name = "cert-sign"
699*ebfedea0SLionel Sambuc	name = "issue-certificate"
700*ebfedea0SLionel Sambuc	name = "ca"
701*ebfedea0SLionel Sambuc	function = "hxtool_ca"
702*ebfedea0SLionel Sambuc	min_args="0"
703*ebfedea0SLionel Sambuc	help = "Issue a certificate"
704*ebfedea0SLionel Sambuc}
705*ebfedea0SLionel Sambuccommand = {
706*ebfedea0SLionel Sambuc	name = "test-crypto"
707*ebfedea0SLionel Sambuc	option = {
708*ebfedea0SLionel Sambuc		long = "pass"
709*ebfedea0SLionel Sambuc		type = "strings"
710*ebfedea0SLionel Sambuc		argument = "password"
711*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
712*ebfedea0SLionel Sambuc	}
713*ebfedea0SLionel Sambuc	option = {
714*ebfedea0SLionel Sambuc		long = "verbose"
715*ebfedea0SLionel Sambuc		type = "flag"
716*ebfedea0SLionel Sambuc		help = "verbose printing"
717*ebfedea0SLionel Sambuc	}
718*ebfedea0SLionel Sambuc	min_args="1"
719*ebfedea0SLionel Sambuc	argument="certificates..."
720*ebfedea0SLionel Sambuc	help = "Test crypto system related to the certificates"
721*ebfedea0SLionel Sambuc}
722*ebfedea0SLionel Sambuccommand = {
723*ebfedea0SLionel Sambuc	option = {
724*ebfedea0SLionel Sambuc		long = "type"
725*ebfedea0SLionel Sambuc		type = "integer"
726*ebfedea0SLionel Sambuc		help = "type of statistics"
727*ebfedea0SLionel Sambuc	}
728*ebfedea0SLionel Sambuc	name = "statistic-print"
729*ebfedea0SLionel Sambuc	min_args="0"
730*ebfedea0SLionel Sambuc	help = "Print statistics"
731*ebfedea0SLionel Sambuc}
732*ebfedea0SLionel Sambuccommand = {
733*ebfedea0SLionel Sambuc	option = {
734*ebfedea0SLionel Sambuc		long = "signer"
735*ebfedea0SLionel Sambuc		type = "string"
736*ebfedea0SLionel Sambuc		help = "signer certificate"
737*ebfedea0SLionel Sambuc	}
738*ebfedea0SLionel Sambuc	option = {
739*ebfedea0SLionel Sambuc		long = "pass"
740*ebfedea0SLionel Sambuc		type = "strings"
741*ebfedea0SLionel Sambuc		argument = "password"
742*ebfedea0SLionel Sambuc		help = "password, prompter, or environment"
743*ebfedea0SLionel Sambuc	}
744*ebfedea0SLionel Sambuc	option = {
745*ebfedea0SLionel Sambuc		long = "crl-file"
746*ebfedea0SLionel Sambuc		type = "string"
747*ebfedea0SLionel Sambuc		help = "CRL output file"
748*ebfedea0SLionel Sambuc	}
749*ebfedea0SLionel Sambuc	option = {
750*ebfedea0SLionel Sambuc		long = "lifetime"
751*ebfedea0SLionel Sambuc		type = "string"
752*ebfedea0SLionel Sambuc		help = "time the crl will be valid"
753*ebfedea0SLionel Sambuc	}
754*ebfedea0SLionel Sambuc	name = "crl-sign"
755*ebfedea0SLionel Sambuc	min_args="0"
756*ebfedea0SLionel Sambuc	argument="certificates..."
757*ebfedea0SLionel Sambuc	help = "Create a CRL"
758*ebfedea0SLionel Sambuc}
759*ebfedea0SLionel Sambuccommand = {
760*ebfedea0SLionel Sambuc	name = "help"
761*ebfedea0SLionel Sambuc	name = "?"
762*ebfedea0SLionel Sambuc	argument = "[command]"
763*ebfedea0SLionel Sambuc	min_args = "0"
764*ebfedea0SLionel Sambuc	max_args = "1"
765*ebfedea0SLionel Sambuc	help = "Help! I need somebody"
766*ebfedea0SLionel Sambuc}
767