]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/tsget.1
Merge OpenSSL 1.0.2r.
[FreeBSD/FreeBSD.git] / secure / usr.bin / openssl / man / tsget.1
1 .\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
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 >0, 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 "TSGET 1"
136 .TH TSGET 1 "2019-02-26" "1.0.2r" "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 openssl\-tsget,
143 tsget \- Time Stamping HTTP/HTTPS client
144 .SH "SYNOPSIS"
145 .IX Header "SYNOPSIS"
146 \&\fBtsget\fR
147 \&\fB\-h\fR server_url
148 [\fB\-e\fR extension]
149 [\fB\-o\fR output]
150 [\fB\-v\fR]
151 [\fB\-d\fR]
152 [\fB\-k\fR private_key.pem]
153 [\fB\-p\fR key_password]
154 [\fB\-c\fR client_cert.pem]
155 [\fB\-C\fR CA_certs.pem]
156 [\fB\-P\fR CA_path]
157 [\fB\-r\fR file:file...]
158 [\fB\-g\fR EGD_socket]
159 [request]...
160 .SH "DESCRIPTION"
161 .IX Header "DESCRIPTION"
162 The \fBtsget\fR command can be used for sending a time stamp request, as
163 specified in \fB\s-1RFC 3161\s0\fR, to a time stamp server over \s-1HTTP\s0 or \s-1HTTPS\s0 and storing
164 the time stamp response in a file. This tool cannot be used for creating the
165 requests and verifying responses, you can use the OpenSSL \fB\fBts\fB\|(1)\fR command to
166 do that. \fBtsget\fR can send several requests to the server without closing
167 the \s-1TCP\s0 connection if more than one requests are specified on the command
168 line.
169 .PP
170 The tool sends the following \s-1HTTP\s0 request for each time stamp request:
171 .PP
172 .Vb 7
173 \&        POST url HTTP/1.1
174 \&        User\-Agent: OpenTSA tsget.pl/<version>
175 \&        Host: <host>:<port>
176 \&        Pragma: no\-cache
177 \&        Content\-Type: application/timestamp\-query
178 \&        Accept: application/timestamp\-reply
179 \&        Content\-Length: length of body
180 \&
181 \&        ...binary request specified by the user...
182 .Ve
183 .PP
184 \&\fBtsget\fR expects a response of type application/timestamp\-reply, which is
185 written to a file without any interpretation.
186 .SH "OPTIONS"
187 .IX Header "OPTIONS"
188 .IP "\fB\-h\fR server_url" 4
189 .IX Item "-h server_url"
190 The \s-1URL\s0 of the \s-1HTTP/HTTPS\s0 server listening for time stamp requests.
191 .IP "\fB\-e\fR extension" 4
192 .IX Item "-e extension"
193 If the \fB\-o\fR option is not given this argument specifies the extension of the
194 output files. The base name of the output file will be the same as those of
195 the input files. Default extension is '.tsr'. (Optional)
196 .IP "\fB\-o\fR output" 4
197 .IX Item "-o output"
198 This option can be specified only when just one request is sent to the
199 server. The time stamp response will be written to the given output file. '\-'
200 means standard output. In case of multiple time stamp requests or the absence
201 of this argument the names of the output files will be derived from the names
202 of the input files and the default or specified extension argument. (Optional)
203 .IP "\fB\-v\fR" 4
204 .IX Item "-v"
205 The name of the currently processed request is printed on standard
206 error. (Optional)
207 .IP "\fB\-d\fR" 4
208 .IX Item "-d"
209 Switches on verbose mode for the underlying \fBcurl\fR library. You can see
210 detailed debug messages for the connection. (Optional)
211 .IP "\fB\-k\fR private_key.pem" 4
212 .IX Item "-k private_key.pem"
213 (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0
214 <private_key.pem> must contain the private key of the user. The private key
215 file can optionally be protected by a passphrase. The \fB\-c\fR option must also
216 be specified. (Optional)
217 .IP "\fB\-p\fR key_password" 4
218 .IX Item "-p key_password"
219 (\s-1HTTPS\s0) Specifies the passphrase for the private key specified by the \fB\-k\fR
220 argument. If this option is omitted and the key is passphrase protected \fBtsget\fR
221 will ask for it. (Optional)
222 .IP "\fB\-c\fR client_cert.pem" 4
223 .IX Item "-c client_cert.pem"
224 (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0
225 <client_cert.pem> must contain the X.509 certificate of the user.  The \fB\-k\fR
226 option must also be specified. If this option is not specified no
227 certificate-based client authentication will take place. (Optional)
228 .IP "\fB\-C\fR CA_certs.pem" 4
229 .IX Item "-C CA_certs.pem"
230 (\s-1HTTPS\s0) The trusted \s-1CA\s0 certificate store. The certificate chain of the peer's
231 certificate must include one of the \s-1CA\s0 certificates specified in this file.
232 Either option \fB\-C\fR or option \fB\-P\fR must be given in case of \s-1HTTPS.\s0 (Optional)
233 .IP "\fB\-P\fR CA_path" 4
234 .IX Item "-P CA_path"
235 (\s-1HTTPS\s0) The path containing the trusted \s-1CA\s0 certificates to verify the peer's
236 certificate. The directory must be prepared with the \fBc_rehash\fR
237 OpenSSL utility. Either option \fB\-C\fR or option \fB\-P\fR must be given in case of
238 \&\s-1HTTPS.\s0 (Optional)
239 .IP "\fB\-rand\fR file:file..." 4
240 .IX Item "-rand file:file..."
241 The files containing random data for seeding the random number
242 generator. Multiple files can be specified, the separator is \fB;\fR for
243 MS-Windows, \fB,\fR for \s-1VMS\s0 and \fB:\fR for all other platforms. (Optional)
244 .IP "\fB\-g\fR EGD_socket" 4
245 .IX Item "-g EGD_socket"
246 The name of an \s-1EGD\s0 socket to get random data from. (Optional)
247 .IP "[request]..." 4
248 .IX Item "[request]..."
249 List of files containing \fB\s-1RFC 3161\s0\fR DER-encoded time stamp requests. If no
250 requests are specified only one request will be sent to the server and it will be
251 read from the standard input. (Optional)
252 .SH "ENVIRONMENT VARIABLES"
253 .IX Header "ENVIRONMENT VARIABLES"
254 The \fB\s-1TSGET\s0\fR environment variable can optionally contain default
255 arguments. The content of this variable is added to the list of command line
256 arguments.
257 .SH "EXAMPLES"
258 .IX Header "EXAMPLES"
259 The examples below presume that \fBfile1.tsq\fR and \fBfile2.tsq\fR contain valid
260 time stamp requests, tsa.opentsa.org listens at port 8080 for \s-1HTTP\s0 requests
261 and at port 8443 for \s-1HTTPS\s0 requests, the \s-1TSA\s0 service is available at the /tsa
262 absolute path.
263 .PP
264 Get a time stamp response for file1.tsq over \s-1HTTP,\s0 output is written to 
265 file1.tsr:
266 .PP
267 .Vb 1
268 \&  tsget \-h http://tsa.opentsa.org:8080/tsa file1.tsq
269 .Ve
270 .PP
271 Get a time stamp response for file1.tsq and file2.tsq over \s-1HTTP\s0 showing
272 progress, output is written to file1.reply and file2.reply respectively:
273 .PP
274 .Vb 2
275 \&  tsget \-h http://tsa.opentsa.org:8080/tsa \-v \-e .reply \e
276 \&        file1.tsq file2.tsq
277 .Ve
278 .PP
279 Create a time stamp request, write it to file3.tsq, send it to the server and
280 write the response to file3.tsr:
281 .PP
282 .Vb 3
283 \&  openssl ts \-query \-data file3.txt \-cert | tee file3.tsq \e
284 \&        | tsget \-h http://tsa.opentsa.org:8080/tsa \e
285 \&        \-o file3.tsr
286 .Ve
287 .PP
288 Get a time stamp response for file1.tsq over \s-1HTTPS\s0 without client
289 authentication:
290 .PP
291 .Vb 2
292 \&  tsget \-h https://tsa.opentsa.org:8443/tsa \e
293 \&        \-C cacerts.pem file1.tsq
294 .Ve
295 .PP
296 Get a time stamp response for file1.tsq over \s-1HTTPS\s0 with certificate-based
297 client authentication (it will ask for the passphrase if client_key.pem is
298 protected):
299 .PP
300 .Vb 2
301 \&  tsget \-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e
302 \&        \-k client_key.pem \-c client_cert.pem file1.tsq
303 .Ve
304 .PP
305 You can shorten the previous command line if you make use of the \fB\s-1TSGET\s0\fR
306 environment variable. The following commands do the same as the previous
307 example:
308 .PP
309 .Vb 4
310 \&  TSGET=\*(Aq\-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e
311 \&        \-k client_key.pem \-c client_cert.pem\*(Aq
312 \&  export TSGET
313 \&  tsget file1.tsq
314 .Ve
315 .SH "AUTHOR"
316 .IX Header "AUTHOR"
317 Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org)
318 .SH "SEE ALSO"
319 .IX Header "SEE ALSO"
320 \&\fBopenssl\fR\|(1), \fBts\fR\|(1), \fBcurl\fR\|(1), 
321 \&\fB\s-1RFC 3161\s0\fR