1TSGET(1)                            OpenSSL                           TSGET(1)
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 file:file...]  [-g EGD_socket]
12       [request]...
13

DESCRIPTION

15       The tsget command can be used for sending a time stamp request, as
16       specified in RFC 3161, to a time stamp server over HTTP or HTTPS and
17       storing the time stamp response in a file. This tool cannot be used for
18       creating the requests and verifying responses, you can use the OpenSSL
19       ts(1) command to do that. tsget can send several requests to the server
20       without closing the TCP connection if more than one requests are
21       specified on the command line.
22
23       The tool sends the following HTTP request for each time stamp 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       tsget 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 time stamp 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 time stamp response will be written to the given
51           output file. '-' means standard output. In case of multiple time
52           stamp 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 curl library. You can
60           see detailed debug messages for the connection. (Optional)
61
62       -k private_key.pem
63           (HTTPS) In case of certificate-based client authentication over
64           HTTPS <private_key.pem> must contain the private key of the user.
65           The private key file can optionally be protected by a passphrase.
66           The -c option must also be specified. (Optional)
67
68       -p key_password
69           (HTTPS) Specifies the passphrase for the private key specified by
70           the -k argument. If this option is omitted and the key is
71           passphrase protected tsget will ask for it. (Optional)
72
73       -c client_cert.pem
74           (HTTPS) In case of certificate-based client authentication over
75           HTTPS <client_cert.pem> must contain the X.509 certificate of the
76           user.  The -k option must also be specified. If this option is not
77           specified no certificate-based client authentication will take
78           place. (Optional)
79
80       -C CA_certs.pem
81           (HTTPS) The trusted CA certificate store. The certificate chain of
82           the peer's certificate must include one of the CA certificates
83           specified in this file.  Either option -C or option -P must be
84           given in case of HTTPS. (Optional)
85
86       -P CA_path
87           (HTTPS) The path containing the trusted CA certificates to verify
88           the peer's certificate. The directory must be prepared with the
89           c_rehash OpenSSL utility. Either option -C or option -P must be
90           given in case of HTTPS. (Optional)
91
92       -rand file:file...
93           The files containing random data for seeding the random number
94           generator. Multiple files can be specified, the separator is ; for
95           MS-Windows, , for VMS and : for all other platforms. (Optional)
96
97       -g EGD_socket
98           The name of an EGD socket to get random data from. (Optional)
99
100       [request]...
101           List of files containing RFC 3161 DER-encoded time stamp requests.
102           If no requests are specified only one request will be sent to the
103           server and it will be read from the standard input. (Optional)
104

ENVIRONMENT VARIABLES

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

EXAMPLES

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

AUTHOR

158       Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project
159       (http://www.opentsa.org)
160

SEE ALSO

162       openssl(1), ts(1), curl(1), RFC 3161
163
164
165
1661.0.2k                            2017-01-26                          TSGET(1)
Impressum