309 lines
9.2 KiB
HTML
309 lines
9.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of TSGET</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>TSGET</H1>
|
|
Section: OpenSSL (1SSL)<BR>Updated: 2021-03-22<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
openssl-tsget, tsget - Time Stamping HTTP/HTTPS client
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
<B>tsget</B>
|
|
<B>-h</B> server_url
|
|
[<B>-e</B> extension]
|
|
[<B>-o</B> output]
|
|
[<B>-v</B>]
|
|
[<B>-d</B>]
|
|
[<B>-k</B> private_key.pem]
|
|
[<B>-p</B> key_password]
|
|
[<B>-c</B> client_cert.pem]
|
|
[<B>-C</B> CA_certs.pem]
|
|
[<B>-P</B> CA_path]
|
|
[<B>-r</B> file:file...]
|
|
[<B>-g</B> EGD_socket]
|
|
[request]...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The <B>tsget</B> command can be used for sending a time stamp request, as
|
|
specified in <B></B><FONT SIZE="-1"><B>RFC 3161</B></FONT><B></B>, to a time stamp server over <FONT SIZE="-1">HTTP</FONT> or <FONT SIZE="-1">HTTPS</FONT> and storing
|
|
the time stamp response in a file. This tool cannot be used for creating the
|
|
requests and verifying responses, you can use the OpenSSL <B><A HREF="/cgi-bin/man/man2html?1+ts">ts</A>(1)</B> command to
|
|
do that. <B>tsget</B> can send several requests to the server without closing
|
|
the <FONT SIZE="-1">TCP</FONT> connection if more than one requests are specified on the command
|
|
line.
|
|
<P>
|
|
|
|
The tool sends the following <FONT SIZE="-1">HTTP</FONT> request for each time stamp request:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
POST url HTTP/1.1
|
|
User-Agent: OpenTSA tsget.pl/<version>
|
|
Host: <host>:<port>
|
|
Pragma: no-cache
|
|
Content-Type: application/timestamp-query
|
|
Accept: application/timestamp-reply
|
|
Content-Length: length of body
|
|
|
|
...binary request specified by the user...
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
<B>tsget</B> expects a response of type application/timestamp-reply, which is
|
|
written to a file without any interpretation.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-h</B> server_url<DD>
|
|
|
|
|
|
The <FONT SIZE="-1">URL</FONT> of the <FONT SIZE="-1">HTTP/HTTPS</FONT> server listening for time stamp requests.
|
|
<DT id="2"><B>-e</B> extension<DD>
|
|
|
|
|
|
If the <B>-o</B> 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 '.tsr'. (Optional)
|
|
<DT id="3"><B>-o</B> output<DD>
|
|
|
|
|
|
This option can be specified only when just one request is sent to the
|
|
server. The time stamp response will be written to the given output file. '-'
|
|
means standard output. In case of multiple time stamp 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)
|
|
<DT id="4"><B>-v</B><DD>
|
|
|
|
|
|
The name of the currently processed request is printed on standard
|
|
error. (Optional)
|
|
<DT id="5"><B>-d</B><DD>
|
|
|
|
|
|
Switches on verbose mode for the underlying <B>curl</B> library. You can see
|
|
detailed debug messages for the connection. (Optional)
|
|
<DT id="6"><B>-k</B> private_key.pem<DD>
|
|
|
|
|
|
(<FONT SIZE="-1">HTTPS</FONT>) In case of certificate-based client authentication over <FONT SIZE="-1">HTTPS</FONT>
|
|
<private_key.pem> must contain the private key of the user. The private key
|
|
file can optionally be protected by a passphrase. The <B>-c</B> option must also
|
|
be specified. (Optional)
|
|
<DT id="7"><B>-p</B> key_password<DD>
|
|
|
|
|
|
(<FONT SIZE="-1">HTTPS</FONT>) Specifies the passphrase for the private key specified by the <B>-k</B>
|
|
argument. If this option is omitted and the key is passphrase protected <B>tsget</B>
|
|
will ask for it. (Optional)
|
|
<DT id="8"><B>-c</B> client_cert.pem<DD>
|
|
|
|
|
|
(<FONT SIZE="-1">HTTPS</FONT>) In case of certificate-based client authentication over <FONT SIZE="-1">HTTPS</FONT>
|
|
<client_cert.pem> must contain the X.509 certificate of the user. The <B>-k</B>
|
|
option must also be specified. If this option is not specified no
|
|
certificate-based client authentication will take place. (Optional)
|
|
<DT id="9"><B>-C</B> CA_certs.pem<DD>
|
|
|
|
|
|
(<FONT SIZE="-1">HTTPS</FONT>) The trusted <FONT SIZE="-1">CA</FONT> certificate store. The certificate chain of the peer's
|
|
certificate must include one of the <FONT SIZE="-1">CA</FONT> certificates specified in this file.
|
|
Either option <B>-C</B> or option <B>-P</B> must be given in case of <FONT SIZE="-1">HTTPS.</FONT> (Optional)
|
|
<DT id="10"><B>-P</B> CA_path<DD>
|
|
|
|
|
|
(<FONT SIZE="-1">HTTPS</FONT>) The path containing the trusted <FONT SIZE="-1">CA</FONT> certificates to verify the peer's
|
|
certificate. The directory must be prepared with the <B>c_rehash</B>
|
|
OpenSSL utility. Either option <B>-C</B> or option <B>-P</B> must be given in case of
|
|
<FONT SIZE="-1">HTTPS.</FONT> (Optional)
|
|
<DT id="11"><B>-rand</B> file:file...<DD>
|
|
|
|
|
|
The files containing random data for seeding the random number
|
|
generator. Multiple files can be specified, the separator is <B>;</B> for
|
|
MS-Windows, <B>,</B> for <FONT SIZE="-1">VMS</FONT> and <B>:</B> for all other platforms. (Optional)
|
|
<DT id="12"><B>-g</B> EGD_socket<DD>
|
|
|
|
|
|
The name of an <FONT SIZE="-1">EGD</FONT> socket to get random data from. (Optional)
|
|
<DT id="13">[request]...<DD>
|
|
|
|
|
|
List of files containing <B></B><FONT SIZE="-1"><B>RFC 3161</B></FONT><B></B> DER-encoded time stamp 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)
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ENVIRONMENT VARIABLES</H2>
|
|
|
|
|
|
|
|
The <B></B><FONT SIZE="-1"><B>TSGET</B></FONT><B></B> environment variable can optionally contain default
|
|
arguments. The content of this variable is added to the list of command line
|
|
arguments.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
|
|
|
|
The examples below presume that <B>file1.tsq</B> and <B>file2.tsq</B> contain valid
|
|
time stamp requests, tsa.opentsa.org listens at port 8080 for <FONT SIZE="-1">HTTP</FONT> requests
|
|
and at port 8443 for <FONT SIZE="-1">HTTPS</FONT> requests, the <FONT SIZE="-1">TSA</FONT> service is available at the /tsa
|
|
absolute path.
|
|
<P>
|
|
|
|
Get a time stamp response for file1.tsq over <FONT SIZE="-1">HTTP,</FONT> output is written to
|
|
file1.tsr:
|
|
<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 time stamp response for file1.tsq and file2.tsq over <FONT SIZE="-1">HTTP</FONT> showing
|
|
progress, output is written to file1.reply and file2.reply 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 time stamp request, write it to file3.tsq, send it to the server and
|
|
write the response to file3.tsr:
|
|
<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 time stamp response for file1.tsq over <FONT SIZE="-1">HTTPS</FONT> without client
|
|
authentication:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
tsget -h <A HREF="https://tsa.opentsa.org:8443/tsa">https://tsa.opentsa.org:8443/tsa</A> \
|
|
-C cacerts.pem file1.tsq
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
Get a time stamp response for file1.tsq over <FONT SIZE="-1">HTTPS</FONT> with certificate-based
|
|
client authentication (it will ask for the passphrase if client_key.pem is
|
|
protected):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
tsget -h <A HREF="https://tsa.opentsa.org:8443/tsa">https://tsa.opentsa.org:8443/tsa</A> -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 <B></B><FONT SIZE="-1"><B>TSGET</B></FONT><B></B>
|
|
environment variable. The following commands do the same as the previous
|
|
example:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
TSGET='-h <A HREF="https://tsa.opentsa.org:8443/tsa">https://tsa.opentsa.org:8443/tsa</A> -C cacerts.pem \
|
|
-k client_key.pem -c client_cert.pem'
|
|
export TSGET
|
|
tsget file1.tsq
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+openssl">openssl</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+ts">ts</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+curl">curl</A></B>(1),
|
|
<B></B><FONT SIZE="-1"><B>RFC 3161</B></FONT><B></B>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
<P>
|
|
|
|
Licensed under the OpenSSL license (the ``License''). You may not use
|
|
this file except in compliance with the License. You can obtain a copy
|
|
in the file <FONT SIZE="-1">LICENSE</FONT> in the source distribution or at
|
|
<<A HREF="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="18"><A HREF="#lbAF">ENVIRONMENT VARIABLES</A><DD>
|
|
<DT id="19"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="20"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="21"><A HREF="#lbAI">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:28 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|