openssl-prebuild/linux_amd64/ssl/share/doc/openssl/html/man1/tsget.html
2020-03-02 16:50:34 +00:00

243 lines
9.9 KiB
HTML
Executable File

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>tsget</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#options">OPTIONS</a></li>
<li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>tsget - Time Stamping HTTP/HTTPS client</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p><strong>tsget</strong>
<strong>-h</strong> <em>server_url</em>
[<strong>-e</strong> <em>extension</em>]
[<strong>-o</strong> <em>output</em>]
[<strong>-v</strong>]
[<strong>-d</strong>]
[<strong>-k</strong> <em>private_key.pem</em>]
[<strong>-p</strong> <em>key_password</em>]
[<strong>-c</strong> <em>client_cert.pem</em>]
[<strong>-C</strong> <em>CA_certs.pem</em>]
[<strong>-P</strong> <em>CA_path</em>]
[<strong>-r</strong> <em>files</em>]
[<strong>-g</strong> <em>EGD_socket</em>]
[<em>request</em> ...]</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This command can be used for sending a timestamp request, as specified
in <a href="http://www.ietf.org/rfc/rfc3161.txt" class="rfc">RFC 3161</a>, to a timestamp server over HTTP or HTTPS and storing the
timestamp response in a file. It cannot be used for creating the requests
and verifying responses, you have to use <em>openssl-ts(1)</em> to do that. This
command can send several requests to the server without closing the TCP
connection if more than one requests are specified on the command line.</p>
<p>This command sends the following HTTP request for each timestamp request:</p>
<pre>
POST url HTTP/1.1
User-Agent: OpenTSA tsget.pl/&lt;version&gt;
Host: &lt;host&gt;:&lt;port&gt;
Pragma: no-cache
Content-Type: application/timestamp-query
Accept: application/timestamp-reply
Content-Length: length of body</pre>
<pre>
...binary request specified by the user...</pre>
<p>It expects a response of type application/timestamp-reply, which is
written to a file without any interpretation.</p>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<dl>
<dt><strong><a name="h_server_url" class="item"><strong>-h</strong> <em>server_url</em></a></strong></dt>
<dd>
<p>The URL of the HTTP/HTTPS server listening for timestamp requests.</p>
</dd>
<dt><strong><a name="e_extension" class="item"><strong>-e</strong> <em>extension</em></a></strong></dt>
<dd>
<p>If the <strong>-o</strong> option is not given this argument specifies the extension of the
output files. The base name of the output file will be the same as those of
the input files. Default extension is <em class="file">.tsr</em>. (Optional)</p>
</dd>
<dt><strong><a name="o_output" class="item"><strong>-o</strong> <em>output</em></a></strong></dt>
<dd>
<p>This option can be specified only when just one request is sent to the
server. The timestamp response will be written to the given output file. '-'
means standard output. In case of multiple timestamp requests or the absence
of this argument the names of the output files will be derived from the names
of the input files and the default or specified extension argument. (Optional)</p>
</dd>
<dt><strong><a name="v" class="item"><strong>-v</strong></a></strong></dt>
<dd>
<p>The name of the currently processed request is printed on standard
error. (Optional)</p>
</dd>
<dt><strong><a name="d" class="item"><strong>-d</strong></a></strong></dt>
<dd>
<p>Switches on verbose mode for the underlying perl module <a href="/WWW/Curl/Easy.html">the WWW::Curl::Easy manpage</a>.
You can see detailed debug messages for the connection. (Optional)</p>
</dd>
<dt><strong><a name="k_private_key_pem" class="item"><strong>-k</strong> <em>private_key.pem</em></a></strong></dt>
<dd>
<p>(HTTPS) In case of certificate-based client authentication over HTTPS
<em>private_key.pem</em> must contain the private key of the user. The private key
file can optionally be protected by a passphrase. The <strong>-c</strong> option must also
be specified. (Optional)</p>
</dd>
<dt><strong><a name="p_key_password" class="item"><strong>-p</strong> <em>key_password</em></a></strong></dt>
<dd>
<p>(HTTPS) Specifies the passphrase for the private key specified by the <strong>-k</strong>
argument. If this option is omitted and the key is passphrase protected,
it will be prompted for. (Optional)</p>
</dd>
<dt><strong><a name="c_client_cert_pem" class="item"><strong>-c</strong> <em>client_cert.pem</em></a></strong></dt>
<dd>
<p>(HTTPS) In case of certificate-based client authentication over HTTPS
<em>client_cert.pem</em> must contain the X.509 certificate of the user. The <strong>-k</strong>
option must also be specified. If this option is not specified no
certificate-based client authentication will take place. (Optional)</p>
</dd>
<dt><strong><a name="c_ca_certs_pem" class="item"><strong>-C</strong> <em>CA_certs.pem</em></a></strong></dt>
<dd>
<p>(HTTPS) The trusted CA certificate store. The certificate chain of the peer's
certificate must include one of the CA certificates specified in this file.
Either option <strong>-C</strong> or option <strong>-P</strong> must be given in case of HTTPS. (Optional)</p>
</dd>
<dt><strong><a name="p_ca_path" class="item"><strong>-P</strong> <em>CA_path</em></a></strong></dt>
<dd>
<p>(HTTPS) The path containing the trusted CA certificates to verify the peer's
certificate. The directory must be prepared with <em>openssl-rehash(1)</em>. Either
option <strong>-C</strong> or option <strong>-P</strong> must be given in case of HTTPS. (Optional)</p>
</dd>
<dt><strong><a name="r_files" class="item"><strong>-r</strong> <em>files</em></a></strong></dt>
<dd>
<p>See <em>openssl(1)/Random State Options</em> for more information.</p>
</dd>
<dt><strong><a name="g_egd_socket" class="item"><strong>-g</strong> <em>EGD_socket</em></a></strong></dt>
<dd>
<p>The name of an EGD socket to get random data from. (Optional)</p>
</dd>
<dt><strong><a name="request" class="item"><em>request</em> ...</a></strong></dt>
<dd>
<p>List of files containing <a href="http://www.ietf.org/rfc/rfc3161.txt" class="rfc">RFC 3161</a> DER-encoded timestamp requests. If no
requests are specified only one request will be sent to the server and it will
be read from the standard input.
(Optional)</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
<p>The <strong>TSGET</strong> environment variable can optionally contain default
arguments. The content of this variable is added to the list of command line
arguments.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>The examples below presume that <em class="file">file1.tsq</em> and <em class="file">file2.tsq</em> contain valid
timestamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests
and at port 8443 for HTTPS requests, the TSA service is available at the /tsa
absolute path.</p>
<p>Get a timestamp response for <em class="file">file1.tsq</em> over HTTP, output is written to
<em class="file">file1.tsr</em>:</p>
<pre>
tsget -h <a href="http://tsa.opentsa.org:8080/tsa">http://tsa.opentsa.org:8080/tsa</a> file1.tsq</pre>
<p>Get a timestamp response for <em class="file">file1.tsq</em> and <em class="file">file2.tsq</em> over HTTP showing
progress, output is written to <em class="file">file1.reply</em> and <em class="file">file2.reply</em> respectively:</p>
<pre>
tsget -h <a href="http://tsa.opentsa.org:8080/tsa">http://tsa.opentsa.org:8080/tsa</a> -v -e .reply \
file1.tsq file2.tsq</pre>
<p>Create a timestamp request, write it to <em class="file">file3.tsq</em>, send it to the server and
write the response to <em class="file">file3.tsr</em>:</p>
<pre>
openssl ts -query -data file3.txt -cert | tee file3.tsq \
| tsget -h <a href="http://tsa.opentsa.org:8080/tsa">http://tsa.opentsa.org:8080/tsa</a> \
-o file3.tsr</pre>
<p>Get a timestamp response for <em class="file">file1.tsq</em> over HTTPS without client
authentication:</p>
<pre>
tsget -h https://tsa.opentsa.org:8443/tsa \
-C cacerts.pem file1.tsq</pre>
<p>Get a timestamp response for <em class="file">file1.tsq</em> over HTTPS with certificate-based
client authentication (it will ask for the passphrase if <em class="file">client_key.pem</em> is
protected):</p>
<pre>
tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
-k client_key.pem -c client_cert.pem file1.tsq</pre>
<p>You can shorten the previous command line if you make use of the <strong>TSGET</strong>
environment variable. The following commands do the same as the previous
example:</p>
<pre>
TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
-k client_key.pem -c client_cert.pem'
export TSGET
tsget file1.tsq</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>openssl(1)</em>,
<em>openssl-ts(1)</em>,
<a href="/WWW/Curl/Easy.html">the WWW::Curl::Easy manpage</a>,
<a href="https://www.rfc-editor.org/rfc/rfc3161.html">https://www.rfc-editor.org/rfc/rfc3161.html</a></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2006-2019 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
</body>
</html>