5
tsget - Time Stamping HTTP/HTTPS client
15
[B<-k> private_key.pem]
17
[B<-c> client_cert.pem]
26
The B<tsget> command can be used for sending a time stamp request, as
27
specified in B<RFC 3161>, to a time stamp server over HTTP or HTTPS and storing
28
the time stamp response in a file. This tool cannot be used for creating the
29
requests and verifying responses, you can use the OpenSSL B<ts(1)> command to
30
do that. B<tsget> can send several requests to the server without closing
31
the TCP connection if more than one requests are specified on the command
34
The tool sends the following HTTP request for each time stamp request:
37
User-Agent: OpenTSA tsget.pl/<version>
40
Content-Type: application/timestamp-query
41
Accept: application/timestamp-reply
42
Content-Length: length of body
44
...binary request specified by the user...
46
B<tsget> expects a response of type application/timestamp-reply, which is
47
written to a file without any interpretation.
53
=item B<-h> server_url
55
The URL of the HTTP/HTTPS server listening for time stamp requests.
59
If the B<-o> option is not given this argument specifies the extension of the
60
output files. The base name of the output file will be the same as those of
61
the input files. Default extension is '.tsr'. (Optional)
65
This option can be specified only when just one request is sent to the
66
server. The time stamp response will be written to the given output file. '-'
67
means standard output. In case of multiple time stamp requests or the absence
68
of this argument the names of the output files will be derived from the names
69
of the input files and the default or specified extension argument. (Optional)
73
The name of the currently processed request is printed on standard
78
Switches on verbose mode for the underlying B<curl> library. You can see
79
detailed debug messages for the connection. (Optional)
81
=item B<-k> private_key.pem
83
(HTTPS) In case of certificate-based client authentication over HTTPS
84
<private_key.pem> must contain the private key of the user. The private key
85
file can optionally be protected by a passphrase. The B<-c> option must also
86
be specified. (Optional)
88
=item B<-p> key_password
90
(HTTPS) Specifies the passphrase for the private key specified by the B<-k>
91
argument. If this option is omitted and the key is passphrase protected B<tsget>
92
will ask for it. (Optional)
94
=item B<-c> client_cert.pem
96
(HTTPS) In case of certificate-based client authentication over HTTPS
97
<client_cert.pem> must contain the X.509 certificate of the user. The B<-k>
98
option must also be specified. If this option is not specified no
99
certificate-based client authentication will take place. (Optional)
101
=item B<-C> CA_certs.pem
103
(HTTPS) The trusted CA certificate store. The certificate chain of the peer's
104
certificate must include one of the CA certificates specified in this file.
105
Either option B<-C> or option B<-P> must be given in case of HTTPS. (Optional)
109
(HTTPS) The path containing the trusted CA certificates to verify the peer's
110
certificate. The directory must be prepared with the B<c_rehash>
111
OpenSSL utility. Either option B<-C> or option B<-P> must be given in case of
114
=item B<-rand> file:file...
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> 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 time stamp requests. If no
127
requests are specifed only one request will be sent to the server and it will be
128
read from the standard input. (Optional)
132
=head1 ENVIRONMENT VARIABLES
134
The B<TSGET> environment variable can optionally contain default
135
arguments. The content of this variable is added to the list of command line
140
The examples below presume that B<file1.tsq> and B<file2.tsq> contain valid
141
time stamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests
142
and at port 8443 for HTTPS requests, the TSA service is available at the /tsa
145
Get a time stamp response for file1.tsq over HTTP, output is written to
148
tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq
150
Get a time stamp response for file1.tsq and file2.tsq over HTTP showing
151
progress, output is written to file1.reply and file2.reply respectively:
153
tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \
156
Create a time stamp request, write it to file3.tsq, send it to the server and
157
write the response to file3.tsr:
159
openssl ts -query -data file3.txt -cert | tee file3.tsq \
160
| tsget -h http://tsa.opentsa.org:8080/tsa \
163
Get a time stamp response for file1.tsq over HTTPS without client
166
tsget -h https://tsa.opentsa.org:8443/tsa \
167
-C cacerts.pem file1.tsq
169
Get a time stamp response for file1.tsq over HTTPS with certificate-based
170
client authentication (it will ask for the passphrase if client_key.pem is
173
tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
174
-k client_key.pem -c client_cert.pem file1.tsq
176
You can shorten the previous command line if you make use of the B<TSGET>
177
environment variable. The following commands do the same as the previous
180
TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
181
-k client_key.pem -c client_cert.pem'
187
Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org)
191
L<openssl(1)|openssl(1)>, L<ts(1)|ts(1)>, L<curl(1)|curl(1)>,