1TSGET(1ossl)                        OpenSSL                       TSGET(1ossl)
2
3
4

NAME

6       tsget - Time Stamping HTTP/HTTPS client
7

SYNOPSIS

9       tsget -h server_url [-e extension] [-o output] [-v] [-d] [-k
10       private_key.pem] [-p key_password] [-c client_cert.pem] [-C
11       CA_certs.pem] [-P CA_path] [-r files] [-g EGD_socket] [request ...]
12

DESCRIPTION

14       This command can be used for sending a timestamp request, as specified
15       in RFC 3161, to a timestamp server over HTTP or HTTPS and storing the
16       timestamp response in a file. It cannot be used for creating the
17       requests and verifying responses, you have to use openssl-ts(1) to do
18       that. This command can send several requests to the server without
19       closing the TCP connection if more than one requests are specified on
20       the command line.
21
22       This command sends the following HTTP request for each timestamp
23       request:
24
25               POST url HTTP/1.1
26               User-Agent: OpenTSA tsget.pl/<version>
27               Host: <host>:<port>
28               Pragma: no-cache
29               Content-Type: application/timestamp-query
30               Accept: application/timestamp-reply
31               Content-Length: length of body
32
33               ...binary request specified by the user...
34
35       It expects a response of type application/timestamp-reply, which is
36       written to a file without any interpretation.
37

OPTIONS

39       -h server_url
40           The URL of the HTTP/HTTPS server listening for timestamp requests.
41
42       -e extension
43           If the -o option is not given this argument specifies the extension
44           of the output files. The base name of the output file will be the
45           same as those of the input files. Default extension is .tsr.
46           (Optional)
47
48       -o output
49           This option can be specified only when just one request is sent to
50           the server. The timestamp response will be written to the given
51           output file. '-' means standard output. In case of multiple
52           timestamp requests or the absence of this argument the names of the
53           output files will be derived from the names of the input files and
54           the default or specified extension argument. (Optional)
55
56       -v  The name of the currently processed request is printed on standard
57           error. (Optional)
58
59       -d  Switches on verbose mode for the underlying perl module
60           WWW::Curl::Easy.  You can see detailed debug messages for the
61           connection. (Optional)
62
63       -k private_key.pem
64           (HTTPS) In case of certificate-based client authentication over
65           HTTPS private_key.pem must contain the private key of the user. The
66           private key file can optionally be protected by a passphrase. The
67           -c option must also be specified. (Optional)
68
69       -p key_password
70           (HTTPS) Specifies the passphrase for the private key specified by
71           the -k argument. If this option is omitted and the key is
72           passphrase protected, it will be prompted for. (Optional)
73
74       -c client_cert.pem
75           (HTTPS) In case of certificate-based client authentication over
76           HTTPS client_cert.pem must contain the X.509 certificate of the
77           user.  The -k option must also be specified. If this option is not
78           specified no certificate-based client authentication will take
79           place. (Optional)
80
81       -C CA_certs.pem
82           (HTTPS) The trusted CA certificate store. The certificate chain of
83           the peer's certificate must include one of the CA certificates
84           specified in this file.  Either option -C or option -P must be
85           given in case of HTTPS. (Optional)
86
87       -P CA_path
88           (HTTPS) The path containing the trusted CA certificates to verify
89           the peer's certificate. The directory must be prepared with
90           openssl-rehash(1). Either option -C or option -P must be given in
91           case of HTTPS. (Optional)
92
93       -r files
94           See "Random State Options" in openssl(1) for more information.
95
96       -g EGD_socket
97           The name of an EGD socket to get random data from. (Optional)
98
99       request ...
100           List of files containing RFC 3161 DER-encoded timestamp requests.
101           If no requests are specified only one request will be sent to the
102           server and it will be read from the standard input.  (Optional)
103

ENVIRONMENT VARIABLES

105       The TSGET environment variable can optionally contain default
106       arguments. The content of this variable is added to the list of command
107       line arguments.
108

EXAMPLES

110       The examples below presume that file1.tsq and file2.tsq contain valid
111       timestamp requests, tsa.opentsa.org listens at port 8080 for HTTP
112       requests and at port 8443 for HTTPS requests, the TSA service is
113       available at the /tsa absolute path.
114
115       Get a timestamp response for file1.tsq over HTTP, output is written to
116       file1.tsr:
117
118         tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq
119
120       Get a timestamp response for file1.tsq and file2.tsq over HTTP showing
121       progress, output is written to file1.reply and file2.reply
122       respectively:
123
124         tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \
125               file1.tsq file2.tsq
126
127       Create a timestamp request, write it to file3.tsq, send it to the
128       server and write the response to file3.tsr:
129
130         openssl ts -query -data file3.txt -cert | tee file3.tsq \
131               | tsget -h http://tsa.opentsa.org:8080/tsa \
132               -o file3.tsr
133
134       Get a timestamp response for file1.tsq over HTTPS without client
135       authentication:
136
137         tsget -h https://tsa.opentsa.org:8443/tsa \
138               -C cacerts.pem file1.tsq
139
140       Get a timestamp response for file1.tsq over HTTPS with certificate-
141       based client authentication (it will ask for the passphrase if
142       client_key.pem is protected):
143
144         tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
145               -k client_key.pem -c client_cert.pem file1.tsq
146
147       You can shorten the previous command line if you make use of the TSGET
148       environment variable. The following commands do the same as the
149       previous example:
150
151         TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
152               -k client_key.pem -c client_cert.pem'
153         export TSGET
154         tsget file1.tsq
155

SEE ALSO

157       openssl(1), openssl-ts(1), WWW::Curl::Easy,
158       <https://www.rfc-editor.org/rfc/rfc3161.html>
159
161       Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
162
163       Licensed under the Apache License 2.0 (the "License").  You may not use
164       this file except in compliance with the License.  You can obtain a copy
165       in the file LICENSE in the source distribution or at
166       <https://www.openssl.org/source/license.html>.
167
168
169
1703.1.1                             2023-08-31                      TSGET(1ossl)
Impressum