xref: /freebsd/secure/usr.bin/openssl/man/tsget.1 (revision 4543ef516683042d46f3bd3bb8a4f3f746e00499)
Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

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'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF 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 1ossl"
TSGET 1ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
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 files] [-g EGD_socket] [request ...]
"DESCRIPTION"
Header "DESCRIPTION" This command can be used for sending a timestamp request, as specified in \s-1RFC 3161,\s0 to a timestamp server over \s-1HTTP\s0 or \s-1HTTPS\s0 and storing the timestamp response in a file. It cannot be used for creating the requests and verifying responses, you have to use openssl-ts\|(1) to do that. This command 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.

This command sends the following \s-1HTTP\s0 request for each timestamp 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

It 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 timestamp 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 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)
"-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 perl module WWW::Curl::Easy. 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 \fIprivate_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, it will be prompted for. (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 \fIclient_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 openssl-rehash\|(1). Either option -C or option -P must be given in case of \s-1HTTPS.\s0 (Optional)
"-r files" 4
Item "-r files" See \*(L"Random State Options\*(R" in openssl\|(1) for more information.
"-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 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)
"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 timestamp 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 timestamp response for file1.tsq over \s-1HTTP,\s0 output is written to \fIfile1.tsr:

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

Get a timestamp 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 timestamp 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 timestamp 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 timestamp 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

"SEE ALSO"
Header "SEE ALSO" \fBopenssl\|(1), \fBopenssl-ts\|(1), WWW::Curl::Easy, <https://www.rfc-editor.org/rfc/rfc3161.html>
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.