TSGET(1ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’Œ TSGET(1ossl) β€” the tsget manual, but make it a group chat

ok so bestie, welcome to tsget, aka the Time Stamping HTTP/HTTPS client πŸ•βœ¨. This is the 1ossl manual page, and yes, she's an OpenSSL girlie.


✨ SYNOPSIS ✨

tsget -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 ...]

that's the whole vibe check right there, no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie: this command sends a timestamp request β€” the kind specified in RFC 3161 β€” to a timestamp server over HTTP or HTTPS, and then it stores the timestamp response in a file. iconic behavior honestly 🌸

but listen β€” and this is the important part β€” she cannot create the requests and she cannot verify responses. like, that is not her job. for that you gotta go use openssl-ts(1). periodt. πŸ’€

the slay part? if you specify more than one request on the command line, this command can send several requests to the server without closing the TCP connection. efficiency queen, we stan πŸ‘‘

for each timestamp request, she sends this HTTP request:

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

and then she expects a response of type application/timestamp-reply, which gets written to a file without any interpretation. no thoughts, head empty, just vibes and bytes 🫢


πŸŽ€ OPTIONS πŸŽ€

okay bestie, here's every single flag, no skipping, no summarizing, we're doing this right πŸ’–

  • -h server_url β€” literally the URL of the HTTP/HTTPS server that's listening for timestamp requests. this one's kind of non-negotiable, she needs to know where to go πŸ—ΊοΈ
  • -e extension β€” so if you didn't give her -o, this argument specifies the extension of the output files. the base name of the output file will be the same as the base name of the input files. default extension is .tsr. (Optional ✨)
  • -o output β€” you can only use this one when you're sending just one request to the server. the timestamp response gets written to the given output file. '-' means standard output, cute right? but if you've got multiple timestamp requests, or you just don't pass this argument, the output file names get derived from the input file names plus the default or specified extension. (Optional πŸ’«)
  • -v β€” prints the name of the currently processed request on standard error. so you can watch her work, main character energy πŸ‘€ (Optional)
  • -d β€” switches on verbose mode for the underlying perl module WWW::Curl::Easy. you get detailed debug messages for the connection. nerdy and I love her for it πŸ” (Optional)
  • -k private_key.pem β€” (HTTPS) for certificate-based client authentication over HTTPS, private_key.pem must contain the user's private key. the private key file can optionally be protected by a passphrase. the -c option must also be specified. no exceptions bestie πŸ” (Optional)
  • -p key_password β€” (HTTPS) specifies the passphrase for the private key given by the -k argument. if you omit this option and the key is passphrase protected, she'll prompt you for it. so don't panic 🫢 (Optional)
  • -c client_cert.pem β€” (HTTPS) for certificate-based client authentication over HTTPS, client_cert.pem must contain the user's X.509 certificate. the -k option must also be specified. and if you don't specify this option, no certificate-based client authentication happens at all. (Optional πŸŽ€)
  • -C CA_certs.pem β€” (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. in case of HTTPS, either option -C or option -P must be given. pick one, bestie βš–οΈ (Optional)
  • -P CA_path β€” (HTTPS) the path containing the trusted CA certificates used to verify the peer's certificate. the directory must be prepared with openssl-rehash(1). in case of HTTPS, either option -C or option -P must be given. (Optional 🌈)
  • -r files β€” see "Random State Options" in openssl(1) for more information. that's the whole explanation, go read the other page, I don't make the rules πŸ“–
  • -g EGD_socket β€” the name of an EGD socket to get random data from. (Optional 🎲)
  • request ... β€” a list of files containing RFC 3161 DER-encoded timestamp requests. if you specify no requests at all, only one request gets sent to the server and it's read from standard input. (Optional πŸ’œ)

🌸 ENVIRONMENT VARIABLES 🌸

the TSGET environment variable can optionally contain default arguments. the content of this variable gets added to the list of command line arguments. so you can be lazy and it's fine, we love efficiency πŸ’…βœ¨


πŸ”₯ EXAMPLES πŸ”₯

okay so all the examples below presume that file1.tsq and file2.tsq contain valid timestamp requests, that tsa.opentsa.org listens at port 8080 for HTTP requests and at port 8443 for HTTPS requests, and that the TSA service is available at the /tsa absolute path. setting the scene, love that for us 🎬

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 client_key.pem is protected):

tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
      -k client_key.pem -c client_cert.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 client_key.pem -c client_cert.pem'
export TSGET
tsget file1.tsq

like?? look how clean that is. obsessed πŸ˜­πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

openssl(1), openssl-ts(1), WWW::Curl::Easy, <https://www.rfc-editor.org/rfc/rfc3161.html>

go read those too, iykyk πŸ“šβœ¨


Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.

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

real talk bestie: the license stuff is not a vibe, it's a requirement. respect the license fr fr πŸ™

and that's the page!! this whole thing is from OpenSSL 3.5.0, dated 2026-09-25, and it's the TSGET(1ossl) manual β€” now go timestamp something, you absolute icon πŸ•πŸ‘‘πŸ’…βœ¨

πŸ“¦ where this page comes from