| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "TSGET 1SSL" |
| 58 |
.TH TSGET 1SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
tsget \- Time Stamping HTTP/HTTPS client |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
\&\fBtsget\fR |
| 68 |
\&\fB\-h\fR \fIserver_url\fR |
| 69 |
[\fB\-e\fR \fIextension\fR] |
| 70 |
[\fB\-o\fR \fIoutput\fR] |
| 71 |
[\fB\-v\fR] |
| 72 |
[\fB\-d\fR] |
| 73 |
[\fB\-k\fR \fIprivate_key.pem\fR] |
| 74 |
[\fB\-p\fR \fIkey_password\fR] |
| 75 |
[\fB\-c\fR \fIclient_cert.pem\fR] |
| 76 |
[\fB\-C\fR \fICA_certs.pem\fR] |
| 77 |
[\fB\-P\fR \fICA_path\fR] |
| 78 |
[\fB\-r\fR \fIfiles\fR] |
| 79 |
[\fB\-g\fR \fIEGD_socket\fR] |
| 80 |
[\fIrequest\fR ...] |
| 81 |
.SH DESCRIPTION |
| 82 |
.IX Header "DESCRIPTION" |
| 83 |
This command can be used for sending a timestamp request, as specified |
| 84 |
in RFC 3161, to a timestamp server over HTTP or HTTPS and storing the |
| 85 |
timestamp response in a file. It cannot be used for creating the requests |
| 86 |
and verifying responses, you have to use \fBopenssl\-ts\fR\|(1) to do that. This |
| 87 |
command can send several requests to the server without closing the TCP |
| 88 |
connection if more than one requests are specified on the command line. |
| 89 |
.PP |
| 90 |
This command sends the following HTTP request for each timestamp request: |
| 91 |
.PP |
| 92 |
.Vb 7 |
| 93 |
\& POST url HTTP/1.1 |
| 94 |
\& User\-Agent: OpenTSA tsget.pl/<version> |
| 95 |
\& Host: <host>:<port> |
| 96 |
\& Pragma: no\-cache |
| 97 |
\& Content\-Type: application/timestamp\-query |
| 98 |
\& Accept: application/timestamp\-reply |
| 99 |
\& Content\-Length: length of body |
| 100 |
\& |
| 101 |
\& ...binary request specified by the user... |
| 102 |
.Ve |
| 103 |
.PP |
| 104 |
It expects a response of type application/timestamp\-reply, which is |
| 105 |
written to a file without any interpretation. |
| 106 |
.SH OPTIONS |
| 107 |
.IX Header "OPTIONS" |
| 108 |
.IP "\fB\-h\fR \fIserver_url\fR" 4 |
| 109 |
.IX Item "-h server_url" |
| 110 |
The URL of the HTTP/HTTPS server listening for timestamp requests. |
| 111 |
.IP "\fB\-e\fR \fIextension\fR" 4 |
| 112 |
.IX Item "-e extension" |
| 113 |
If the \fB\-o\fR option is not given this argument specifies the extension of the |
| 114 |
output files. The base name of the output file will be the same as those of |
| 115 |
the input files. Default extension is \fI.tsr\fR. (Optional) |
| 116 |
.IP "\fB\-o\fR \fIoutput\fR" 4 |
| 117 |
.IX Item "-o output" |
| 118 |
This option can be specified only when just one request is sent to the |
| 119 |
server. The timestamp response will be written to the given output file. '\-' |
| 120 |
means standard output. In case of multiple timestamp requests or the absence |
| 121 |
of this argument the names of the output files will be derived from the names |
| 122 |
of the input files and the default or specified extension argument. (Optional) |
| 123 |
.IP \fB\-v\fR 4 |
| 124 |
.IX Item "-v" |
| 125 |
The name of the currently processed request is printed on standard |
| 126 |
error. (Optional) |
| 127 |
.IP \fB\-d\fR 4 |
| 128 |
.IX Item "-d" |
| 129 |
Switches on verbose mode for the underlying perl module WWW::Curl::Easy. |
| 130 |
You can see detailed debug messages for the connection. (Optional) |
| 131 |
.IP "\fB\-k\fR \fIprivate_key.pem\fR" 4 |
| 132 |
.IX Item "-k private_key.pem" |
| 133 |
(HTTPS) In case of certificate-based client authentication over HTTPS |
| 134 |
\&\fIprivate_key.pem\fR must contain the private key of the user. The private key |
| 135 |
file can optionally be protected by a passphrase. The \fB\-c\fR option must also |
| 136 |
be specified. (Optional) |
| 137 |
.IP "\fB\-p\fR \fIkey_password\fR" 4 |
| 138 |
.IX Item "-p key_password" |
| 139 |
(HTTPS) Specifies the passphrase for the private key specified by the \fB\-k\fR |
| 140 |
argument. If this option is omitted and the key is passphrase protected, |
| 141 |
it will be prompted for. (Optional) |
| 142 |
.IP "\fB\-c\fR \fIclient_cert.pem\fR" 4 |
| 143 |
.IX Item "-c client_cert.pem" |
| 144 |
(HTTPS) In case of certificate-based client authentication over HTTPS |
| 145 |
\&\fIclient_cert.pem\fR must contain the X.509 certificate of the user. The \fB\-k\fR |
| 146 |
option must also be specified. If this option is not specified no |
| 147 |
certificate-based client authentication will take place. (Optional) |
| 148 |
.IP "\fB\-C\fR \fICA_certs.pem\fR" 4 |
| 149 |
.IX Item "-C CA_certs.pem" |
| 150 |
(HTTPS) The trusted CA certificate store. The certificate chain of the peer's |
| 151 |
certificate must include one of the CA certificates specified in this file. |
| 152 |
Either option \fB\-C\fR or option \fB\-P\fR must be given in case of HTTPS. (Optional) |
| 153 |
.IP "\fB\-P\fR \fICA_path\fR" 4 |
| 154 |
.IX Item "-P CA_path" |
| 155 |
(HTTPS) The path containing the trusted CA certificates to verify the peer's |
| 156 |
certificate. The directory must be prepared with \fBopenssl\-rehash\fR\|(1). Either |
| 157 |
option \fB\-C\fR or option \fB\-P\fR must be given in case of HTTPS. (Optional) |
| 158 |
.IP "\fB\-r\fR \fIfiles\fR" 4 |
| 159 |
.IX Item "-r files" |
| 160 |
See "Random State Options" in \fBopenssl\fR\|(1) for more information. |
| 161 |
.IP "\fB\-g\fR \fIEGD_socket\fR" 4 |
| 162 |
.IX Item "-g EGD_socket" |
| 163 |
The name of an EGD socket to get random data from. (Optional) |
| 164 |
.IP "\fIrequest\fR ..." 4 |
| 165 |
.IX Item "request ..." |
| 166 |
List of files containing RFC 3161 DER-encoded timestamp requests. If no |
| 167 |
requests are specified only one request will be sent to the server and it will |
| 168 |
be read from the standard input. |
| 169 |
(Optional) |
| 170 |
.SH "ENVIRONMENT VARIABLES" |
| 171 |
.IX Header "ENVIRONMENT VARIABLES" |
| 172 |
The \fBTSGET\fR environment variable can optionally contain default |
| 173 |
arguments. The content of this variable is added to the list of command line |
| 174 |
arguments. |
| 175 |
.SH EXAMPLES |
| 176 |
.IX Header "EXAMPLES" |
| 177 |
The examples below presume that \fIfile1.tsq\fR and \fIfile2.tsq\fR contain valid |
| 178 |
timestamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests |
| 179 |
and at port 8443 for HTTPS requests, the TSA service is available at the /tsa |
| 180 |
absolute path. |
| 181 |
.PP |
| 182 |
Get a timestamp response for \fIfile1.tsq\fR over HTTP, output is written to |
| 183 |
\&\fIfile1.tsr\fR: |
| 184 |
.PP |
| 185 |
.Vb 1 |
| 186 |
\& tsget \-h http://tsa.opentsa.org:8080/tsa file1.tsq |
| 187 |
.Ve |
| 188 |
.PP |
| 189 |
Get a timestamp response for \fIfile1.tsq\fR and \fIfile2.tsq\fR over HTTP showing |
| 190 |
progress, output is written to \fIfile1.reply\fR and \fIfile2.reply\fR respectively: |
| 191 |
.PP |
| 192 |
.Vb 2 |
| 193 |
\& tsget \-h http://tsa.opentsa.org:8080/tsa \-v \-e .reply \e |
| 194 |
\& file1.tsq file2.tsq |
| 195 |
.Ve |
| 196 |
.PP |
| 197 |
Create a timestamp request, write it to \fIfile3.tsq\fR, send it to the server and |
| 198 |
write the response to \fIfile3.tsr\fR: |
| 199 |
.PP |
| 200 |
.Vb 3 |
| 201 |
\& openssl ts \-query \-data file3.txt \-cert | tee file3.tsq \e |
| 202 |
\& | tsget \-h http://tsa.opentsa.org:8080/tsa \e |
| 203 |
\& \-o file3.tsr |
| 204 |
.Ve |
| 205 |
.PP |
| 206 |
Get a timestamp response for \fIfile1.tsq\fR over HTTPS without client |
| 207 |
authentication: |
| 208 |
.PP |
| 209 |
.Vb 2 |
| 210 |
\& tsget \-h https://tsa.opentsa.org:8443/tsa \e |
| 211 |
\& \-C cacerts.pem file1.tsq |
| 212 |
.Ve |
| 213 |
.PP |
| 214 |
Get a timestamp response for \fIfile1.tsq\fR over HTTPS with certificate-based |
| 215 |
client authentication (it will ask for the passphrase if \fIclient_key.pem\fR is |
| 216 |
protected): |
| 217 |
.PP |
| 218 |
.Vb 2 |
| 219 |
\& tsget \-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e |
| 220 |
\& \-k client_key.pem \-c client_cert.pem file1.tsq |
| 221 |
.Ve |
| 222 |
.PP |
| 223 |
You can shorten the previous command line if you make use of the \fBTSGET\fR |
| 224 |
environment variable. The following commands do the same as the previous |
| 225 |
example: |
| 226 |
.PP |
| 227 |
.Vb 4 |
| 228 |
\& TSGET=\*(Aq\-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e |
| 229 |
\& \-k client_key.pem \-c client_cert.pem\*(Aq |
| 230 |
\& export TSGET |
| 231 |
\& tsget file1.tsq |
| 232 |
.Ve |
| 233 |
.SH "SEE ALSO" |
| 234 |
.IX Header "SEE ALSO" |
| 235 |
\&\fBopenssl\fR\|(1), |
| 236 |
\&\fBopenssl\-ts\fR\|(1), |
| 237 |
WWW::Curl::Easy, |
| 238 |
<https://www.rfc\-editor.org/rfc/rfc3161.html> |
| 239 |
.SH COPYRIGHT |
| 240 |
.IX Header "COPYRIGHT" |
| 241 |
Copyright 2006\-2020 The OpenSSL Project Authors. All Rights Reserved. |
| 242 |
.PP |
| 243 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 244 |
this file except in compliance with the License. You can obtain a copy |
| 245 |
in the file LICENSE in the source distribution or at |
| 246 |
<https://www.openssl.org/source/license.html>. |