{
    "content": [
        {
            "type": "text",
            "text": "# tsget(1ssl) (man)\n\n**Summary:** tsget - Time Stamping HTTP/HTTPS client\n\n**Synopsis:** tsget -h serverurl [-e extension] [-o output] [-v] [-d] [-k privatekey.pem] [-p\nkeypassword] [-c clientcert.pem] [-C CAcerts.pem] [-P CApath] [-r files] [-g EGDsocket]\n[request ...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -h | — | — | The URL of the HTTP/HTTPS server listening for timestamp requests. |\n| -e | — | — | If the -o option is not given this argument specifies the extension of the output files. The base name of the output fil |\n| -o | — | — | This option can be specified only when just one request is sent to the server. The timestamp response will be written to |\n| -v | — | — |  |\n| -d | — | — | detailed debug messages for the connection. (Optional) |\n| -k | — | — | (HTTPS) In case of certificate-based client authentication over HTTPS privatekey.pem must contain the private key of the |\n| -p | — | — | (HTTPS) Specifies the passphrase for the private key specified by the -k argument. If this option is omitted and the key |\n| -c | — | — | (HTTPS) In case of certificate-based client authentication over HTTPS clientcert.pem must contain the X.509 certificate  |\n| -C | — | — | (HTTPS) The trusted CA certificate store. The certificate chain of the peer's certificate must include one of the CA cer |\n| -P | — | — | (HTTPS) The path containing the trusted CA certificates to verify the peer's certificate. The directory must be prepared |\n| -r | — | — | See \"Random State Options\" in openssl(1) for more information. |\n| -g | — | — | The name of an EGD socket to get random data from. (Optional) request ... List of files containing RFC 3161 DER-encoded  |\n\n## Examples\n\n- `The examples below presume that file1.tsq and file2.tsq contain valid timestamp requests,`\n- `tsa.opentsa.org listens at port 8080 for HTTP requests and at port 8443 for HTTPS requests,`\n- `the TSA service is available at the /tsa absolute path.`\n- `Get a timestamp response for file1.tsq over HTTP, output is written to file1.tsr:`\n- `tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq`\n- `Get a timestamp response for file1.tsq and file2.tsq over HTTP showing progress, output is`\n- `written to file1.reply and file2.reply respectively:`\n- `tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \\`\n- `file1.tsq file2.tsq`\n- `Create a timestamp request, write it to file3.tsq, send it to the server and write the`\n- `response to file3.tsr:`\n- `openssl ts -query -data file3.txt -cert | tee file3.tsq \\`\n- `| tsget -h http://tsa.opentsa.org:8080/tsa \\`\n- `-o file3.tsr`\n- `Get a timestamp response for file1.tsq over HTTPS without client authentication:`\n- `tsget -h https://tsa.opentsa.org:8443/tsa \\`\n- `-C cacerts.pem file1.tsq`\n- `Get a timestamp response for file1.tsq over HTTPS with certificate-based client`\n- `authentication (it will ask for the passphrase if clientkey.pem is protected):`\n- `tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\`\n- `-k clientkey.pem -c clientcert.pem file1.tsq`\n- `You can shorten the previous command line if you make use of the TSGET environment variable.`\n- `The following commands do the same as the previous example:`\n- `TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\`\n- `-k clientkey.pem -c clientcert.pem'`\n- `export TSGET`\n- `tsget file1.tsq`\n\n## See Also\n\n- openssl(1)\n- openssl-ts(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (21 lines)\n- **OPTIONS** (1 lines) — 12 subsections\n  - -h (2 lines)\n  - -e (4 lines)\n  - -o (6 lines)\n  - -v (1 lines)\n  - -d (2 lines)\n  - -k (4 lines)\n  - -p (4 lines)\n  - -c (5 lines)\n  - -C (4 lines)\n  - -P (4 lines)\n  - -r (2 lines)\n  - -g (7 lines)\n- **ENVIRONMENT VARIABLES** (3 lines)\n- **EXAMPLES** (40 lines)\n- **SEE ALSO** (2 lines)\n- **COPYRIGHT** (9 lines)\n\n## Full Content\n\n### NAME\n\ntsget - Time Stamping HTTP/HTTPS client\n\n### SYNOPSIS\n\ntsget -h serverurl [-e extension] [-o output] [-v] [-d] [-k privatekey.pem] [-p\nkeypassword] [-c clientcert.pem] [-C CAcerts.pem] [-P CApath] [-r files] [-g EGDsocket]\n[request ...]\n\n### DESCRIPTION\n\nThis command can be used for sending a timestamp request, as specified in RFC 3161, to a\ntimestamp server over HTTP or HTTPS and storing the timestamp response in a file. It cannot\nbe used for creating the requests and verifying responses, you have to use openssl-ts(1) to\ndo that. This command can send several requests to the server without closing the TCP\nconnection if more than one requests are specified on the command line.\n\nThis command sends the following HTTP request for each timestamp request:\n\nPOST url HTTP/1.1\nUser-Agent: OpenTSA tsget.pl/<version>\nHost: <host>:<port>\nPragma: no-cache\nContent-Type: application/timestamp-query\nAccept: application/timestamp-reply\nContent-Length: length of body\n\n...binary request specified by the user...\n\nIt expects a response of type application/timestamp-reply, which is written to a file without\nany interpretation.\n\n### OPTIONS\n\n#### -h\n\nThe URL of the HTTP/HTTPS server listening for timestamp requests.\n\n#### -e\n\nIf the -o option is not given this argument specifies the extension of the output files.\nThe base name of the output file will be the same as those of the input files. Default\nextension is .tsr. (Optional)\n\n#### -o\n\nThis option can be specified only when just one request is sent to the server. The\ntimestamp response will be written to the given output file. '-' means standard output.\nIn case of multiple timestamp requests or the absence of this argument the names of the\noutput files will be derived from the names of the input files and the default or\nspecified extension argument. (Optional)\n\n#### -v\n\n#### -d\n\ndetailed debug messages for the connection. (Optional)\n\n#### -k\n\n(HTTPS) In case of certificate-based client authentication over HTTPS privatekey.pem\nmust contain the private key of the user. The private key file can optionally be\nprotected by a passphrase. The -c option must also be specified. (Optional)\n\n#### -p\n\n(HTTPS) Specifies the passphrase for the private key specified by the -k argument. If\nthis option is omitted and the key is passphrase protected, it will be prompted for.\n(Optional)\n\n#### -c\n\n(HTTPS) In case of certificate-based client authentication over HTTPS clientcert.pem\nmust contain the X.509 certificate of the user.  The -k option must also be specified. If\nthis option is not specified no certificate-based client authentication will take place.\n(Optional)\n\n#### -C\n\n(HTTPS) The trusted CA certificate store. The certificate chain of the peer's certificate\nmust include one of the CA certificates specified in this file.  Either option -C or\noption -P must be given in case of HTTPS. (Optional)\n\n#### -P\n\n(HTTPS) The path containing the trusted CA certificates to verify the peer's certificate.\nThe directory must be prepared with openssl-rehash(1). Either option -C or option -P must\nbe given in case of HTTPS. (Optional)\n\n#### -r\n\nSee \"Random State Options\" in openssl(1) for more information.\n\n#### -g\n\nThe name of an EGD socket to get random data from. (Optional)\n\nrequest ...\nList of files containing RFC 3161 DER-encoded timestamp requests. If no requests are\nspecified only one request will be sent to the server and it will be read from the\nstandard input.  (Optional)\n\n### ENVIRONMENT VARIABLES\n\nThe TSGET environment variable can optionally contain default arguments. The content of this\nvariable is added to the list of command line arguments.\n\n### EXAMPLES\n\nThe examples below presume that file1.tsq and file2.tsq contain valid timestamp requests,\ntsa.opentsa.org listens at port 8080 for HTTP requests and at port 8443 for HTTPS requests,\nthe TSA service is available at the /tsa absolute path.\n\nGet a timestamp response for file1.tsq over HTTP, output is written to file1.tsr:\n\ntsget -h http://tsa.opentsa.org:8080/tsa file1.tsq\n\nGet a timestamp response for file1.tsq and file2.tsq over HTTP showing progress, output is\nwritten to file1.reply and file2.reply respectively:\n\ntsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \\\nfile1.tsq file2.tsq\n\nCreate a timestamp request, write it to file3.tsq, send it to the server and write the\nresponse to file3.tsr:\n\nopenssl ts -query -data file3.txt -cert | tee file3.tsq \\\n| tsget -h http://tsa.opentsa.org:8080/tsa \\\n-o file3.tsr\n\nGet a timestamp response for file1.tsq over HTTPS without client authentication:\n\ntsget -h https://tsa.opentsa.org:8443/tsa \\\n-C cacerts.pem file1.tsq\n\nGet a timestamp response for file1.tsq over HTTPS with certificate-based client\nauthentication (it will ask for the passphrase if clientkey.pem is protected):\n\ntsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\\n-k clientkey.pem -c clientcert.pem file1.tsq\n\nYou can shorten the previous command line if you make use of the TSGET environment variable.\nThe following commands do the same as the previous example:\n\nTSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\\n-k clientkey.pem -c clientcert.pem'\nexport TSGET\ntsget file1.tsq\n\n### SEE ALSO\n\nopenssl(1), openssl-ts(1), WWW::Curl::Easy, <https://www.rfc-editor.org/rfc/rfc3161.html>\n\n### COPYRIGHT\n\nCopyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-04-07                                  TSGET(1SSL)\n\n"
        }
    ],
    "structuredContent": {
        "command": "tsget",
        "section": "1ssl",
        "mode": "man",
        "summary": "tsget - Time Stamping HTTP/HTTPS client",
        "synopsis": "tsget -h serverurl [-e extension] [-o output] [-v] [-d] [-k privatekey.pem] [-p\nkeypassword] [-c clientcert.pem] [-C CAcerts.pem] [-P CApath] [-r files] [-g EGDsocket]\n[request ...]",
        "flags": [
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "The URL of the HTTP/HTTPS server listening for timestamp requests."
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": "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)"
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "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)"
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "detailed debug messages for the connection. (Optional)"
            },
            {
                "flag": "-k",
                "long": null,
                "arg": null,
                "description": "(HTTPS) In case of certificate-based client authentication over HTTPS privatekey.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)"
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "(HTTPS) 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)"
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "(HTTPS) In case of certificate-based client authentication over HTTPS clientcert.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)"
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "(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 -C or option -P must be given in case of HTTPS. (Optional)"
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "(HTTPS) The path containing the trusted CA 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 HTTPS. (Optional)"
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "See \"Random State Options\" in openssl(1) for more information."
            },
            {
                "flag": "-g",
                "long": null,
                "arg": null,
                "description": "The name of an EGD socket to get random data from. (Optional) request ... List of files containing RFC 3161 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)"
            }
        ],
        "examples": [
            "The examples below presume that file1.tsq and file2.tsq 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.",
            "Get a timestamp response for file1.tsq over HTTP, output is written to file1.tsr:",
            "tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq",
            "Get a timestamp response for file1.tsq and file2.tsq over HTTP showing progress, output is",
            "written to file1.reply and file2.reply respectively:",
            "tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \\",
            "file1.tsq file2.tsq",
            "Create a timestamp request, write it to file3.tsq, send it to the server and write the",
            "response to file3.tsr:",
            "openssl ts -query -data file3.txt -cert | tee file3.tsq \\",
            "| tsget -h http://tsa.opentsa.org:8080/tsa \\",
            "-o file3.tsr",
            "Get a timestamp response for file1.tsq over HTTPS without client authentication:",
            "tsget -h https://tsa.opentsa.org:8443/tsa \\",
            "-C cacerts.pem file1.tsq",
            "Get a timestamp response for file1.tsq over HTTPS with certificate-based client",
            "authentication (it will ask for the passphrase if clientkey.pem is protected):",
            "tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\",
            "-k clientkey.pem -c clientcert.pem file1.tsq",
            "You can shorten the previous command line if you make use of the TSGET environment variable.",
            "The following commands do the same as the previous example:",
            "TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \\",
            "-k clientkey.pem -c clientcert.pem'",
            "export TSGET",
            "tsget file1.tsq"
        ],
        "see_also": [
            {
                "name": "openssl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/openssl/1/json"
            },
            {
                "name": "openssl-ts",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/openssl-ts/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h",
                        "lines": 2,
                        "flag": "-h"
                    },
                    {
                        "name": "-e",
                        "lines": 4,
                        "flag": "-e"
                    },
                    {
                        "name": "-o",
                        "lines": 6,
                        "flag": "-o"
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "-d",
                        "lines": 2,
                        "flag": "-d"
                    },
                    {
                        "name": "-k",
                        "lines": 4,
                        "flag": "-k"
                    },
                    {
                        "name": "-p",
                        "lines": 4,
                        "flag": "-p"
                    },
                    {
                        "name": "-c",
                        "lines": 5,
                        "flag": "-c"
                    },
                    {
                        "name": "-C",
                        "lines": 4,
                        "flag": "-C"
                    },
                    {
                        "name": "-P",
                        "lines": 4,
                        "flag": "-P"
                    },
                    {
                        "name": "-r",
                        "lines": 2,
                        "flag": "-r"
                    },
                    {
                        "name": "-g",
                        "lines": 7,
                        "flag": "-g"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT VARIABLES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}