5 tsget - Time Stamping HTTP/HTTPS client
15 [B<-k> I<private_key.pem>]
16 [B<-p> I<key_password>]
17 [B<-c> I<client_cert.pem>]
18 [B<-C> I<CA_certs.pem>]
26 This command can be used for sending a timestamp request, as specified
27 in B<RFC 3161>, to a timestamp server over HTTP or HTTPS and storing the
28 timestamp response in a file. It cannot be used for creating the requests
29 and verifying responses, you have to use L<openssl-ts(1)> to do that. This
30 command can send several requests to the server without closing the TCP
31 connection if more than one requests are specified on the command line.
33 This command sends the following HTTP request for each timestamp request:
36 User-Agent: OpenTSA tsget.pl/<version>
39 Content-Type: application/timestamp-query
40 Accept: application/timestamp-reply
41 Content-Length: length of body
43 ...binary request specified by the user...
45 It expects a response of type application/timestamp-reply, which is
46 written to a file without any interpretation.
52 =item B<-h> I<server_url>
54 The URL of the HTTP/HTTPS server listening for timestamp requests.
56 =item B<-e> I<extension>
58 If the B<-o> option is not given this argument specifies the extension of the
59 output files. The base name of the output file will be the same as those of
60 the input files. Default extension is F<.tsr>. (Optional)
64 This option can be specified only when just one request is sent to the
65 server. The timestamp response will be written to the given output file. '-'
66 means standard output. In case of multiple timestamp requests or the absence
67 of this argument the names of the output files will be derived from the names
68 of the input files and the default or specified extension argument. (Optional)
72 The name of the currently processed request is printed on standard
77 =for comment perlpodstyle(1) says to refer to modules without section
79 Switches on verbose mode for the underlying perl module L<WWW::Curl::Easy>.
80 You can see detailed debug messages for the connection. (Optional)
82 =item B<-k> I<private_key.pem>
84 (HTTPS) In case of certificate-based client authentication over HTTPS
85 I<private_key.pem> must contain the private key of the user. The private key
86 file can optionally be protected by a passphrase. The B<-c> option must also
87 be specified. (Optional)
89 =item B<-p> I<key_password>
91 (HTTPS) Specifies the passphrase for the private key specified by the B<-k>
92 argument. If this option is omitted and the key is passphrase protected,
93 it will be prompted for. (Optional)
95 =item B<-c> I<client_cert.pem>
97 (HTTPS) In case of certificate-based client authentication over HTTPS
98 I<client_cert.pem> must contain the X.509 certificate of the user. The B<-k>
99 option must also be specified. If this option is not specified no
100 certificate-based client authentication will take place. (Optional)
102 =item B<-C> I<CA_certs.pem>
104 (HTTPS) The trusted CA certificate store. The certificate chain of the peer's
105 certificate must include one of the CA certificates specified in this file.
106 Either option B<-C> or option B<-P> must be given in case of HTTPS. (Optional)
108 =item B<-P> I<CA_path>
110 (HTTPS) The path containing the trusted CA certificates to verify the peer's
111 certificate. The directory must be prepared with L<openssl-rehash(1)>. Either
112 option B<-C> or option B<-P> must be given in case of HTTPS. (Optional)
116 The files containing random data for seeding the random number
117 generator. Multiple files can be specified, the separator is B<;> for
118 MS-Windows, B<,> for VMS and B<:> for all other platforms. (Optional)
120 =item B<-g> I<EGD_socket>
122 The name of an EGD socket to get random data from. (Optional)
126 List of files containing B<RFC 3161> DER-encoded timestamp requests. If no
127 requests are specified only one request will be sent to the server and it will
128 be read from the standard input.
133 =head1 ENVIRONMENT VARIABLES
135 The B<TSGET> environment variable can optionally contain default
136 arguments. The content of this variable is added to the list of command line
141 The examples below presume that F<file1.tsq> and F<file2.tsq> contain valid
142 timestamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests
143 and at port 8443 for HTTPS requests, the TSA service is available at the /tsa
146 Get a timestamp response for F<file1.tsq> over HTTP, output is written to
149 tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq
151 Get a timestamp response for F<file1.tsq> and F<file2.tsq> over HTTP showing
152 progress, output is written to F<file1.reply> and F<file2.reply> respectively:
154 tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \
157 Create a timestamp request, write it to F<file3.tsq>, send it to the server and
158 write the response to F<file3.tsr>:
160 openssl ts -query -data file3.txt -cert | tee file3.tsq \
161 | tsget -h http://tsa.opentsa.org:8080/tsa \
164 Get a timestamp response for F<file1.tsq> over HTTPS without client
167 tsget -h https://tsa.opentsa.org:8443/tsa \
168 -C cacerts.pem file1.tsq
170 Get a timestamp response for F<file1.tsq> over HTTPS with certificate-based
171 client authentication (it will ask for the passphrase if F<client_key.pem> is
174 tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
175 -k client_key.pem -c client_cert.pem file1.tsq
177 You can shorten the previous command line if you make use of the B<TSGET>
178 environment variable. The following commands do the same as the previous
181 TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
182 -k client_key.pem -c client_cert.pem'
188 =for comment foreign manuals: WWW::Curl::Easy
193 L<RFC 3161|https://www.rfc-editor.org/rfc/rfc3161.html>
197 Copyright 2006-2019 The OpenSSL Project Authors. All Rights Reserved.
199 Licensed under the Apache License 2.0 (the "License"). You may not use
200 this file except in compliance with the License. You can obtain a copy
201 in the file LICENSE in the source distribution or at
202 L<https://www.openssl.org/source/license.html>.