xref: /freebsd/secure/usr.bin/openssl/man/tsget.1 (revision 389e4940069316fe667ffa263fa7d6390d0a960f)
Automatically generated by Pod::Man 4.07 (Pod::Simple 3.35)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\}
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "TSGET 1"
TSGET 1 "2018-03-27" "1.0.2o" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
openssl-tsget, tsget - Time Stamping HTTP/HTTPS client
"SYNOPSIS"
Header "SYNOPSIS" \fBtsget \fB-h server_url [-e extension] [-o output] [-v] [-d] [-k private_key.pem] [-p key_password] [-c client_cert.pem] [-C CA_certs.pem] [-P CA_path] [-r file:file...] [-g EGD_socket] [request]...
"DESCRIPTION"
Header "DESCRIPTION" The tsget command can be used for sending a time stamp request, as specified in \s-1RFC 3161\s0, to a time stamp server over \s-1HTTP\s0 or \s-1HTTPS\s0 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 \f(BIts\|(1) command to do that. tsget can send several requests to the server without closing the \s-1TCP\s0 connection if more than one requests are specified on the command line.

The tool sends the following \s-1HTTP\s0 request for each time stamp request:

.Vb 7 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... .Ve

\fBtsget expects a response of type application/timestamp-reply, which is written to a file without any interpretation.

"OPTIONS"
Header "OPTIONS"
"-h server_url" 4
Item "-h server_url" The \s-1URL\s0 of the \s-1HTTP/HTTPS\s0 server listening for time stamp requests.
"-e extension" 4
Item "-e extension" If the -o 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)
"-o output" 4
Item "-o output" 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)
"-v" 4
Item "-v" The name of the currently processed request is printed on standard error. (Optional)
"-d" 4
Item "-d" Switches on verbose mode for the underlying curl library. You can see detailed debug messages for the connection. (Optional)
"-k private_key.pem" 4
Item "-k private_key.pem" (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0 <private_key.pem> must contain the private key of the user. The private key file can optionally be protected by a passphrase. The -c option must also be specified. (Optional)
"-p key_password" 4
Item "-p key_password" (\s-1HTTPS\s0) Specifies the passphrase for the private key specified by the -k argument. If this option is omitted and the key is passphrase protected tsget will ask for it. (Optional)
"-c client_cert.pem" 4
Item "-c client_cert.pem" (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0 <client_cert.pem> must contain the X.509 certificate of the user. The -k option must also be specified. If this option is not specified no certificate-based client authentication will take place. (Optional)
"-C CA_certs.pem" 4
Item "-C CA_certs.pem" (\s-1HTTPS\s0) The trusted \s-1CA\s0 certificate store. The certificate chain of the peer's certificate must include one of the \s-1CA\s0 certificates specified in this file. Either option -C or option -P must be given in case of \s-1HTTPS. \s0(Optional)
"-P CA_path" 4
Item "-P CA_path" (\s-1HTTPS\s0) The path containing the trusted \s-1CA\s0 certificates to verify the peer's certificate. The directory must be prepared with the c_rehash OpenSSL utility. Either option -C or option -P must be given in case of \s-1HTTPS. \s0(Optional)
"-rand file:file..." 4
Item "-rand file:file..." The files containing random data for seeding the random number generator. Multiple files can be specified, the separator is ; for MS-Windows, , for \s-1VMS\s0 and : for all other platforms. (Optional)
"-g EGD_socket" 4
Item "-g EGD_socket" The name of an \s-1EGD\s0 socket to get random data from. (Optional)
"[request]..." 4
Item "[request]..." List of files containing \s-1RFC 3161\s0 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)
"ENVIRONMENT VARIABLES"
Header "ENVIRONMENT VARIABLES" The \s-1TSGET\s0 environment variable can optionally contain default arguments. The content of this variable is added to the list of command line arguments.
"EXAMPLES"
Header "EXAMPLES" The examples below presume that file1.tsq and file2.tsq contain valid time stamp requests, tsa.opentsa.org listens at port 8080 for \s-1HTTP\s0 requests and at port 8443 for \s-1HTTPS\s0 requests, the \s-1TSA\s0 service is available at the /tsa absolute path.

Get a time stamp response for file1.tsq over \s-1HTTP,\s0 output is written to file1.tsr:

.Vb 1 tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq .Ve

Get a time stamp response for file1.tsq and file2.tsq over \s-1HTTP\s0 showing progress, output is written to file1.reply and file2.reply respectively:

.Vb 2 tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \e file1.tsq file2.tsq .Ve

Create a time stamp request, write it to file3.tsq, send it to the server and write the response to file3.tsr:

.Vb 3 openssl ts -query -data file3.txt -cert | tee file3.tsq \e | tsget -h http://tsa.opentsa.org:8080/tsa \e -o file3.tsr .Ve

Get a time stamp response for file1.tsq over \s-1HTTPS\s0 without client authentication:

.Vb 2 tsget -h https://tsa.opentsa.org:8443/tsa \e -C cacerts.pem file1.tsq .Ve

Get a time stamp response for file1.tsq over \s-1HTTPS\s0 with certificate-based client authentication (it will ask for the passphrase if client_key.pem is protected):

.Vb 2 tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \e -k client_key.pem -c client_cert.pem file1.tsq .Ve

You can shorten the previous command line if you make use of the \s-1TSGET\s0 environment variable. The following commands do the same as the previous example:

.Vb 4 TSGET=\*(Aq-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \e -k client_key.pem -c client_cert.pem\*(Aq export TSGET tsget file1.tsq .Ve

"AUTHOR"
Header "AUTHOR" Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org)
"SEE ALSO"
Header "SEE ALSO" \fIopenssl\|(1), ts\|(1), curl\|(1), \fB\s-1RFC 3161\s0