openssl: Adjust manual pages for 1.0.1o.
[dragonfly.git] / secure / usr.bin / openssl / man / ts.1
1 .\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is turned on, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{
60 .    if \nF \{
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "TS 1"
136 .TH TS 1 "2015-06-12" "1.0.1o" "OpenSSL"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 ts \- Time Stamping Authority tool (client/server)
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 \&\fBopenssl\fR \fBts\fR
146 \&\fB\-query\fR
147 [\fB\-rand\fR file:file...]
148 [\fB\-config\fR configfile]
149 [\fB\-data\fR file_to_hash]
150 [\fB\-digest\fR digest_bytes]
151 [\fB\-md2\fR|\fB\-md4\fR|\fB\-md5\fR|\fB\-sha\fR|\fB\-sha1\fR|\fB\-mdc2\fR|\fB\-ripemd160\fR|\fB...\fR]
152 [\fB\-policy\fR object_id]
153 [\fB\-no_nonce\fR]
154 [\fB\-cert\fR]
155 [\fB\-in\fR request.tsq]
156 [\fB\-out\fR request.tsq]
157 [\fB\-text\fR]
158 .PP
159 \&\fBopenssl\fR \fBts\fR
160 \&\fB\-reply\fR
161 [\fB\-config\fR configfile]
162 [\fB\-section\fR tsa_section]
163 [\fB\-queryfile\fR request.tsq]
164 [\fB\-passin\fR password_src]
165 [\fB\-signer\fR tsa_cert.pem]
166 [\fB\-inkey\fR private.pem]
167 [\fB\-chain\fR certs_file.pem]
168 [\fB\-policy\fR object_id]
169 [\fB\-in\fR response.tsr]
170 [\fB\-token_in\fR]
171 [\fB\-out\fR response.tsr]
172 [\fB\-token_out\fR]
173 [\fB\-text\fR]
174 [\fB\-engine\fR id]
175 .PP
176 \&\fBopenssl\fR \fBts\fR
177 \&\fB\-verify\fR
178 [\fB\-data\fR file_to_hash]
179 [\fB\-digest\fR digest_bytes]
180 [\fB\-queryfile\fR request.tsq]
181 [\fB\-in\fR response.tsr]
182 [\fB\-token_in\fR]
183 [\fB\-CApath\fR trusted_cert_path]
184 [\fB\-CAfile\fR trusted_certs.pem]
185 [\fB\-untrusted\fR cert_file.pem]
186 .SH "DESCRIPTION"
187 .IX Header "DESCRIPTION"
188 The \fBts\fR command is a basic Time Stamping Authority (\s-1TSA\s0) client and server
189 application as specified in \s-1RFC 3161 \s0(Time-Stamp Protocol, \s-1TSP\s0). A
190 \&\s-1TSA\s0 can be part of a \s-1PKI\s0 deployment and its role is to provide long
191 term proof of the existence of a certain datum before a particular
192 time. Here is a brief description of the protocol:
193 .IP "1." 4
194 The \s-1TSA\s0 client computes a one-way hash value for a data file and sends
195 the hash to the \s-1TSA.\s0
196 .IP "2." 4
197 The \s-1TSA\s0 attaches the current date and time to the received hash value,
198 signs them and sends the time stamp token back to the client. By
199 creating this token the \s-1TSA\s0 certifies the existence of the original
200 data file at the time of response generation.
201 .IP "3." 4
202 The \s-1TSA\s0 client receives the time stamp token and verifies the
203 signature on it. It also checks if the token contains the same hash
204 value that it had sent to the \s-1TSA.\s0
205 .PP
206 There is one \s-1DER\s0 encoded protocol data unit defined for transporting a time
207 stamp request to the \s-1TSA\s0 and one for sending the time stamp response
208 back to the client. The \fBts\fR command has three main functions:
209 creating a time stamp request based on a data file,
210 creating a time stamp response based on a request, verifying if a
211 response corresponds to a particular request or a data file.
212 .PP
213 There is no support for sending the requests/responses automatically
214 over \s-1HTTP\s0 or \s-1TCP\s0 yet as suggested in \s-1RFC 3161.\s0 The users must send the
215 requests either by ftp or e\-mail.
216 .SH "OPTIONS"
217 .IX Header "OPTIONS"
218 .SS "Time Stamp Request generation"
219 .IX Subsection "Time Stamp Request generation"
220 The \fB\-query\fR switch can be used for creating and printing a time stamp
221 request with the following options:
222 .IP "\fB\-rand\fR file:file..." 4
223 .IX Item "-rand file:file..."
224 The files containing random data for seeding the random number
225 generator. Multiple files can be specified, the separator is \fB;\fR for
226 MS-Windows, \fB,\fR for \s-1VMS\s0 and \fB:\fR for all other platforms. (Optional)
227 .IP "\fB\-config\fR configfile" 4
228 .IX Item "-config configfile"
229 The configuration file to use, this option overrides the
230 \&\fB\s-1OPENSSL_CONF\s0\fR environment variable. Only the \s-1OID\s0 section
231 of the config file is used with the \fB\-query\fR command. (Optional)
232 .IP "\fB\-data\fR file_to_hash" 4
233 .IX Item "-data file_to_hash"
234 The data file for which the time stamp request needs to be
235 created. stdin is the default if neither the \fB\-data\fR nor the \fB\-digest\fR
236 parameter is specified. (Optional)
237 .IP "\fB\-digest\fR digest_bytes" 4
238 .IX Item "-digest digest_bytes"
239 It is possible to specify the message imprint explicitly without the data
240 file. The imprint must be specified in a hexadecimal format, two characters
241 per byte, the bytes optionally separated by colons (e.g. 1A:F6:01:... or
242 1AF601...). The number of bytes must match the message digest algorithm 
243 in use. (Optional)
244 .IP "\fB\-md2\fR|\fB\-md4\fR|\fB\-md5\fR|\fB\-sha\fR|\fB\-sha1\fR|\fB\-mdc2\fR|\fB\-ripemd160\fR|\fB...\fR" 4
245 .IX Item "-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160|..."
246 The message digest to apply to the data file, it supports all the message
247 digest algorithms that are supported by the openssl \fBdgst\fR command.
248 The default is \s-1SHA\-1. \s0(Optional)
249 .IP "\fB\-policy\fR object_id" 4
250 .IX Item "-policy object_id"
251 The policy that the client expects the \s-1TSA\s0 to use for creating the
252 time stamp token. Either the dotted \s-1OID\s0 notation or \s-1OID\s0 names defined
253 in the config file can be used. If no policy is requested the \s-1TSA\s0 will
254 use its own default policy. (Optional)
255 .IP "\fB\-no_nonce\fR" 4
256 .IX Item "-no_nonce"
257 No nonce is specified in the request if this option is
258 given. Otherwise a 64 bit long pseudo-random none is
259 included in the request. It is recommended to use nonce to
260 protect against replay-attacks. (Optional)
261 .IP "\fB\-cert\fR" 4
262 .IX Item "-cert"
263 The \s-1TSA\s0 is expected to include its signing certificate in the
264 response. (Optional)
265 .IP "\fB\-in\fR request.tsq" 4
266 .IX Item "-in request.tsq"
267 This option specifies a previously created time stamp request in \s-1DER\s0
268 format that will be printed into the output file. Useful when you need
269 to examine the content of a request in human-readable
270 .Sp
271 format. (Optional)
272 .IP "\fB\-out\fR request.tsq" 4
273 .IX Item "-out request.tsq"
274 Name of the output file to which the request will be written. Default
275 is stdout. (Optional)
276 .IP "\fB\-text\fR" 4
277 .IX Item "-text"
278 If this option is specified the output is human-readable text format
279 instead of \s-1DER. \s0(Optional)
280 .SS "Time Stamp Response generation"
281 .IX Subsection "Time Stamp Response generation"
282 A time stamp response (TimeStampResp) consists of a response status
283 and the time stamp token itself (ContentInfo), if the token generation was
284 successful. The \fB\-reply\fR command is for creating a time stamp
285 response or time stamp token based on a request and printing the
286 response/token in human-readable format. If \fB\-token_out\fR is not
287 specified the output is always a time stamp response (TimeStampResp),
288 otherwise it is a time stamp token (ContentInfo).
289 .IP "\fB\-config\fR configfile" 4
290 .IX Item "-config configfile"
291 The configuration file to use, this option overrides the
292 \&\fB\s-1OPENSSL_CONF\s0\fR environment variable. See \fB\s-1CONFIGURATION FILE
293 OPTIONS\s0\fR for configurable variables. (Optional)
294 .IP "\fB\-section\fR tsa_section" 4
295 .IX Item "-section tsa_section"
296 The name of the config file section conatining the settings for the
297 response generation. If not specified the default \s-1TSA\s0 section is
298 used, see \fB\s-1CONFIGURATION FILE OPTIONS\s0\fR for details. (Optional)
299 .IP "\fB\-queryfile\fR request.tsq" 4
300 .IX Item "-queryfile request.tsq"
301 The name of the file containing a \s-1DER\s0 encoded time stamp request. (Optional)
302 .IP "\fB\-passin\fR password_src" 4
303 .IX Item "-passin password_src"
304 Specifies the password source for the private key of the \s-1TSA.\s0 See
305 \&\fB\s-1PASS PHRASE ARGUMENTS\s0\fR in \fIopenssl\fR\|(1). (Optional)
306 .IP "\fB\-signer\fR tsa_cert.pem" 4
307 .IX Item "-signer tsa_cert.pem"
308 The signer certificate of the \s-1TSA\s0 in \s-1PEM\s0 format. The \s-1TSA\s0 signing
309 certificate must have exactly one extended key usage assigned to it:
310 timeStamping. The extended key usage must also be critical, otherwise
311 the certificate is going to be refused. Overrides the \fBsigner_cert\fR
312 variable of the config file. (Optional)
313 .IP "\fB\-inkey\fR private.pem" 4
314 .IX Item "-inkey private.pem"
315 The signer private key of the \s-1TSA\s0 in \s-1PEM\s0 format. Overrides the
316 \&\fBsigner_key\fR config file option. (Optional)
317 .IP "\fB\-chain\fR certs_file.pem" 4
318 .IX Item "-chain certs_file.pem"
319 The collection of certificates in \s-1PEM\s0 format that will all
320 be included in the response in addition to the signer certificate if
321 the \fB\-cert\fR option was used for the request. This file is supposed to
322 contain the certificate chain for the signer certificate from its
323 issuer upwards. The \fB\-reply\fR command does not build a certificate
324 chain automatically. (Optional)
325 .IP "\fB\-policy\fR object_id" 4
326 .IX Item "-policy object_id"
327 The default policy to use for the response unless the client
328 explicitly requires a particular \s-1TSA\s0 policy. The \s-1OID\s0 can be specified
329 either in dotted notation or with its name. Overrides the
330 \&\fBdefault_policy\fR config file option. (Optional)
331 .IP "\fB\-in\fR response.tsr" 4
332 .IX Item "-in response.tsr"
333 Specifies a previously created time stamp response or time stamp token
334 (if \fB\-token_in\fR is also specified) in \s-1DER\s0 format that will be written
335 to the output file. This option does not require a request, it is
336 useful e.g. when you need to examine the content of a response or
337 token or you want to extract the time stamp token from a response. If
338 the input is a token and the output is a time stamp response a default
339 \&'granted' status info is added to the token. (Optional)
340 .IP "\fB\-token_in\fR" 4
341 .IX Item "-token_in"
342 This flag can be used together with the \fB\-in\fR option and indicates
343 that the input is a \s-1DER\s0 encoded time stamp token (ContentInfo) instead
344 of a time stamp response (TimeStampResp). (Optional)
345 .IP "\fB\-out\fR response.tsr" 4
346 .IX Item "-out response.tsr"
347 The response is written to this file. The format and content of the
348 file depends on other options (see \fB\-text\fR, \fB\-token_out\fR). The default is
349 stdout. (Optional)
350 .IP "\fB\-token_out\fR" 4
351 .IX Item "-token_out"
352 The output is a time stamp token (ContentInfo) instead of time stamp
353 response (TimeStampResp). (Optional)
354 .IP "\fB\-text\fR" 4
355 .IX Item "-text"
356 If this option is specified the output is human-readable text format
357 instead of \s-1DER. \s0(Optional)
358 .IP "\fB\-engine\fR id" 4
359 .IX Item "-engine id"
360 Specifying an engine (by its unique \fBid\fR string) will cause \fBts\fR
361 to attempt to obtain a functional reference to the specified engine,
362 thus initialising it if needed. The engine will then be set as the default
363 for all available algorithms. Default is builtin. (Optional)
364 .SS "Time Stamp Response verification"
365 .IX Subsection "Time Stamp Response verification"
366 The \fB\-verify\fR command is for verifying if a time stamp response or time
367 stamp token is valid and matches a particular time stamp request or
368 data file. The \fB\-verify\fR command does not use the configuration file.
369 .IP "\fB\-data\fR file_to_hash" 4
370 .IX Item "-data file_to_hash"
371 The response or token must be verified against file_to_hash. The file
372 is hashed with the message digest algorithm specified in the token. 
373 The \fB\-digest\fR and \fB\-queryfile\fR options must not be specified with this one.
374 (Optional)
375 .IP "\fB\-digest\fR digest_bytes" 4
376 .IX Item "-digest digest_bytes"
377 The response or token must be verified against the message digest specified
378 with this option. The number of bytes must match the message digest algorithm
379 specified in the token. The \fB\-data\fR and \fB\-queryfile\fR options must not be
380 specified with this one. (Optional)
381 .IP "\fB\-queryfile\fR request.tsq" 4
382 .IX Item "-queryfile request.tsq"
383 The original time stamp request in \s-1DER\s0 format. The \fB\-data\fR and \fB\-digest\fR
384 options must not be specified with this one. (Optional)
385 .IP "\fB\-in\fR response.tsr" 4
386 .IX Item "-in response.tsr"
387 The time stamp response that needs to be verified in \s-1DER\s0 format. (Mandatory)
388 .IP "\fB\-token_in\fR" 4
389 .IX Item "-token_in"
390 This flag can be used together with the \fB\-in\fR option and indicates
391 that the input is a \s-1DER\s0 encoded time stamp token (ContentInfo) instead
392 of a time stamp response (TimeStampResp). (Optional)
393 .IP "\fB\-CApath\fR trusted_cert_path" 4
394 .IX Item "-CApath trusted_cert_path"
395 The name of the directory containing the trused \s-1CA\s0 certificates of the
396 client. See the similar option of \fIverify\fR\|(1) for additional
397 details. Either this option or \fB\-CAfile\fR must be specified. (Optional)
398 .IP "\fB\-CAfile\fR trusted_certs.pem" 4
399 .IX Item "-CAfile trusted_certs.pem"
400 The name of the file containing a set of trusted self-signed \s-1CA \s0
401 certificates in \s-1PEM\s0 format. See the similar option of 
402 \&\fIverify\fR\|(1) for additional details. Either this option 
403 or \fB\-CApath\fR must be specified.
404 (Optional)
405 .IP "\fB\-untrusted\fR cert_file.pem" 4
406 .IX Item "-untrusted cert_file.pem"
407 Set of additional untrusted certificates in \s-1PEM\s0 format which may be
408 needed when building the certificate chain for the \s-1TSA\s0's signing
409 certificate. This file must contain the \s-1TSA\s0 signing certificate and
410 all intermediate \s-1CA\s0 certificates unless the response includes them.
411 (Optional)
412 .SH "CONFIGURATION FILE OPTIONS"
413 .IX Header "CONFIGURATION FILE OPTIONS"
414 The \fB\-query\fR and \fB\-reply\fR commands make use of a configuration file
415 defined by the \fB\s-1OPENSSL_CONF\s0\fR environment variable. See \fIconfig\fR\|(5)
416 for a general description of the syntax of the config file. The
417 \&\fB\-query\fR command uses only the symbolic \s-1OID\s0 names section
418 and it can work without it. However, the \fB\-reply\fR command needs the
419 config file for its operation.
420 .PP
421 When there is a command line switch equivalent of a variable the
422 switch always overrides the settings in the config file.
423 .IP "\fBtsa\fR section, \fBdefault_tsa\fR" 4
424 .IX Item "tsa section, default_tsa"
425 This is the main section and it specifies the name of another section
426 that contains all the options for the \fB\-reply\fR command. This default
427 section can be overridden with the \fB\-section\fR command line switch. (Optional)
428 .IP "\fBoid_file\fR" 4
429 .IX Item "oid_file"
430 See \fIca\fR\|(1) for description. (Optional)
431 .IP "\fBoid_section\fR" 4
432 .IX Item "oid_section"
433 See \fIca\fR\|(1) for description. (Optional)
434 .IP "\fB\s-1RANDFILE\s0\fR" 4
435 .IX Item "RANDFILE"
436 See \fIca\fR\|(1) for description. (Optional)
437 .IP "\fBserial\fR" 4
438 .IX Item "serial"
439 The name of the file containing the hexadecimal serial number of the
440 last time stamp response created. This number is incremented by 1 for
441 each response. If the file does not exist at the time of response
442 generation a new file is created with serial number 1. (Mandatory)
443 .IP "\fBcrypto_device\fR" 4
444 .IX Item "crypto_device"
445 Specifies the OpenSSL engine that will be set as the default for 
446 all available algorithms. The default value is builtin, you can specify 
447 any other engines supported by OpenSSL (e.g. use chil for the NCipher \s-1HSM\s0).
448 (Optional)
449 .IP "\fBsigner_cert\fR" 4
450 .IX Item "signer_cert"
451 \&\s-1TSA\s0 signing certificate in \s-1PEM\s0 format. The same as the \fB\-signer\fR
452 command line option. (Optional)
453 .IP "\fBcerts\fR" 4
454 .IX Item "certs"
455 A file containing a set of \s-1PEM\s0 encoded certificates that need to be
456 included in the response. The same as the \fB\-chain\fR command line
457 option. (Optional)
458 .IP "\fBsigner_key\fR" 4
459 .IX Item "signer_key"
460 The private key of the \s-1TSA\s0 in \s-1PEM\s0 format. The same as the \fB\-inkey\fR
461 command line option. (Optional)
462 .IP "\fBdefault_policy\fR" 4
463 .IX Item "default_policy"
464 The default policy to use when the request does not mandate any
465 policy. The same as the \fB\-policy\fR command line option. (Optional)
466 .IP "\fBother_policies\fR" 4
467 .IX Item "other_policies"
468 Comma separated list of policies that are also acceptable by the \s-1TSA\s0
469 and used only if the request explicitly specifies one of them. (Optional)
470 .IP "\fBdigests\fR" 4
471 .IX Item "digests"
472 The list of message digest algorithms that the \s-1TSA\s0 accepts. At least
473 one algorithm must be specified. (Mandatory)
474 .IP "\fBaccuracy\fR" 4
475 .IX Item "accuracy"
476 The accuracy of the time source of the \s-1TSA\s0 in seconds, milliseconds
477 and microseconds. E.g. secs:1, millisecs:500, microsecs:100. If any of
478 the components is missing zero is assumed for that field. (Optional)
479 .IP "\fBclock_precision_digits\fR" 4
480 .IX Item "clock_precision_digits"
481 Specifies the maximum number of digits, which represent the fraction of 
482 seconds, that  need to be included in the time field. The trailing zeroes
483 must be removed from the time, so there might actually be fewer digits,
484 or no fraction of seconds at all. Supported only on \s-1UNIX\s0 platforms.
485 The maximum value is 6, default is 0.
486 (Optional)
487 .IP "\fBordering\fR" 4
488 .IX Item "ordering"
489 If this option is yes the responses generated by this \s-1TSA\s0 can always
490 be ordered, even if the time difference between two responses is less
491 than the sum of their accuracies. Default is no. (Optional)
492 .IP "\fBtsa_name\fR" 4
493 .IX Item "tsa_name"
494 Set this option to yes if the subject name of the \s-1TSA\s0 must be included in
495 the \s-1TSA\s0 name field of the response. Default is no. (Optional)
496 .IP "\fBess_cert_id_chain\fR" 4
497 .IX Item "ess_cert_id_chain"
498 The SignedData objects created by the \s-1TSA\s0 always contain the
499 certificate identifier of the signing certificate in a signed
500 attribute (see \s-1RFC 2634,\s0 Enhanced Security Services). If this option
501 is set to yes and either the \fBcerts\fR variable or the \fB\-chain\fR option
502 is specified then the certificate identifiers of the chain will also
503 be included in the SigningCertificate signed attribute. If this
504 variable is set to no, only the signing certificate identifier is
505 included. Default is no. (Optional)
506 .SH "ENVIRONMENT VARIABLES"
507 .IX Header "ENVIRONMENT VARIABLES"
508 \&\fB\s-1OPENSSL_CONF\s0\fR contains the path of the configuration file and can be
509 overridden by the \fB\-config\fR command line option.
510 .SH "EXAMPLES"
511 .IX Header "EXAMPLES"
512 All the examples below presume that \fB\s-1OPENSSL_CONF\s0\fR is set to a proper
513 configuration file, e.g. the example configuration file 
514 openssl/apps/openssl.cnf will do.
515 .SS "Time Stamp Request"
516 .IX Subsection "Time Stamp Request"
517 To create a time stamp request for design1.txt with \s-1SHA\-1 \s0
518 without nonce and policy and no certificate is required in the response:
519 .PP
520 .Vb 2
521 \&  openssl ts \-query \-data design1.txt \-no_nonce \e
522 \&        \-out design1.tsq
523 .Ve
524 .PP
525 To create a similar time stamp request with specifying the message imprint
526 explicitly:
527 .PP
528 .Vb 2
529 \&  openssl ts \-query \-digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \e
530 \&         \-no_nonce \-out design1.tsq
531 .Ve
532 .PP
533 To print the content of the previous request in human readable format:
534 .PP
535 .Vb 1
536 \&  openssl ts \-query \-in design1.tsq \-text
537 .Ve
538 .PP
539 To create a time stamp request which includes the \s-1MD\-5\s0 digest 
540 of design2.txt, requests the signer certificate and nonce,
541 specifies a policy id (assuming the tsa_policy1 name is defined in the
542 \&\s-1OID\s0 section of the config file):
543 .PP
544 .Vb 2
545 \&  openssl ts \-query \-data design2.txt \-md5 \e
546 \&        \-policy tsa_policy1 \-cert \-out design2.tsq
547 .Ve
548 .SS "Time Stamp Response"
549 .IX Subsection "Time Stamp Response"
550 Before generating a response a signing certificate must be created for
551 the \s-1TSA\s0 that contains the \fBtimeStamping\fR critical extended key usage extension
552 without any other key usage extensions. You can add the
553 \&'extendedKeyUsage = critical,timeStamping' line to the user certificate section
554 of the config file to generate a proper certificate. See \fIreq\fR\|(1),
555 \&\fIca\fR\|(1), \fIx509\fR\|(1) for instructions. The examples
556 below assume that cacert.pem contains the certificate of the \s-1CA,\s0
557 tsacert.pem is the signing certificate issued by cacert.pem and
558 tsakey.pem is the private key of the \s-1TSA.\s0
559 .PP
560 To create a time stamp response for a request:
561 .PP
562 .Vb 2
563 \&  openssl ts \-reply \-queryfile design1.tsq \-inkey tsakey.pem \e
564 \&        \-signer tsacert.pem \-out design1.tsr
565 .Ve
566 .PP
567 If you want to use the settings in the config file you could just write:
568 .PP
569 .Vb 1
570 \&  openssl ts \-reply \-queryfile design1.tsq \-out design1.tsr
571 .Ve
572 .PP
573 To print a time stamp reply to stdout in human readable format:
574 .PP
575 .Vb 1
576 \&  openssl ts \-reply \-in design1.tsr \-text
577 .Ve
578 .PP
579 To create a time stamp token instead of time stamp response:
580 .PP
581 .Vb 1
582 \&  openssl ts \-reply \-queryfile design1.tsq \-out design1_token.der \-token_out
583 .Ve
584 .PP
585 To print a time stamp token to stdout in human readable format:
586 .PP
587 .Vb 1
588 \&  openssl ts \-reply \-in design1_token.der \-token_in \-text \-token_out
589 .Ve
590 .PP
591 To extract the time stamp token from a response:
592 .PP
593 .Vb 1
594 \&  openssl ts \-reply \-in design1.tsr \-out design1_token.der \-token_out
595 .Ve
596 .PP
597 To add 'granted' status info to a time stamp token thereby creating a
598 valid response:
599 .PP
600 .Vb 1
601 \&  openssl ts \-reply \-in design1_token.der \-token_in \-out design1.tsr
602 .Ve
603 .SS "Time Stamp Verification"
604 .IX Subsection "Time Stamp Verification"
605 To verify a time stamp reply against a request:
606 .PP
607 .Vb 2
608 \&  openssl ts \-verify \-queryfile design1.tsq \-in design1.tsr \e
609 \&        \-CAfile cacert.pem \-untrusted tsacert.pem
610 .Ve
611 .PP
612 To verify a time stamp reply that includes the certificate chain:
613 .PP
614 .Vb 2
615 \&  openssl ts \-verify \-queryfile design2.tsq \-in design2.tsr \e
616 \&        \-CAfile cacert.pem
617 .Ve
618 .PP
619 To verify a time stamp token against the original data file:
620   openssl ts \-verify \-data design2.txt \-in design2.tsr \e
621         \-CAfile cacert.pem
622 .PP
623 To verify a time stamp token against a message imprint:
624   openssl ts \-verify \-digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \e
625          \-in design2.tsr \-CAfile cacert.pem
626 .PP
627 You could also look at the 'test' directory for more examples.
628 .SH "BUGS"
629 .IX Header "BUGS"
630 If you find any bugs or you have suggestions please write to
631 Zoltan Glozik <zglozik@opentsa.org>. Known issues:
632 .IP "\(bu" 4
633 No support for time stamps over \s-1SMTP,\s0 though it is quite easy
634 to implement an automatic e\-mail based \s-1TSA\s0 with \fIprocmail\fR\|(1) 
635 and \fIperl\fR\|(1). \s-1HTTP\s0 server support is provided in the form of 
636 a separate apache module. \s-1HTTP\s0 client support is provided by
637 \&\fItsget\fR\|(1). Pure \s-1TCP/IP\s0 protocol is not supported.
638 .IP "\(bu" 4
639 The file containing the last serial number of the \s-1TSA\s0 is not
640 locked when being read or written. This is a problem if more than one
641 instance of \fIopenssl\fR\|(1) is trying to create a time stamp
642 response at the same time. This is not an issue when using the apache
643 server module, it does proper locking.
644 .IP "\(bu" 4
645 Look for the \s-1FIXME\s0 word in the source files.
646 .IP "\(bu" 4
647 The source code should really be reviewed by somebody else, too.
648 .IP "\(bu" 4
649 More testing is needed, I have done only some basic tests (see
650 test/testtsa).
651 .SH "AUTHOR"
652 .IX Header "AUTHOR"
653 Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org)
654 .SH "SEE ALSO"
655 .IX Header "SEE ALSO"
656 \&\fItsget\fR\|(1), \fIopenssl\fR\|(1), \fIreq\fR\|(1), 
657 \&\fIx509\fR\|(1), \fIca\fR\|(1), \fIgenrsa\fR\|(1), 
658 \&\fIconfig\fR\|(5)