{
    "mode": "man",
    "parameter": "tsget",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tsget/1/json",
    "generated": "2026-10-24T06:29:17Z",
    "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 ...]",
    "sections": {
        "NAME": {
            "content": "tsget - Time Stamping HTTP/HTTPS client\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "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",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This 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",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h _",
                    "content": "The URL of the HTTP/HTTPS server listening for timestamp requests.\n",
                    "flag": "-h"
                },
                {
                    "name": "-e _",
                    "content": "If  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",
                    "flag": "-e"
                },
                {
                    "name": "-o _",
                    "content": "This  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",
                    "flag": "-o"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-d",
                    "content": "detailed debug messages for the connection. (Optional)\n",
                    "flag": "-d"
                },
                {
                    "name": "-k _",
                    "content": "(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",
                    "flag": "-k"
                },
                {
                    "name": "-p _",
                    "content": "(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",
                    "flag": "-p"
                },
                {
                    "name": "-c _",
                    "content": "(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",
                    "flag": "-c"
                },
                {
                    "name": "-C _",
                    "content": "(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",
                    "flag": "-C"
                },
                {
                    "name": "-P _",
                    "content": "(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",
                    "flag": "-P"
                },
                {
                    "name": "-r _",
                    "content": "See \"Random State Options\" in openssl(1) for more information.\n",
                    "flag": "-r"
                },
                {
                    "name": "-g _",
                    "content": "The 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",
                    "flag": "-g"
                }
            ]
        },
        "ENVIRONMENT VARIABLES": {
            "content": "The  TSGET environment variable can optionally contain default arguments. The content of this\nvariable is added to the list of command line arguments.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "The 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",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "openssl(1), openssl-ts(1), WWW::Curl::Easy, <https://www.rfc-editor.org/rfc/rfc3161.html>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 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\n3.0.13                                       2026-07-29                                  TSGET(1SSL)",
            "subsections": []
        }
    },
    "summary": "tsget - Time Stamping HTTP/HTTPS client",
    "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"
        }
    ]
}