TS_REQ_NEW(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… NAME πŸ’…

okay so welcome to the TS_REQ_NEW(3) page from the Library Functions Manual, bestie β€” this is the whole X.509 time-stamp protocol friend group: TS_REQ_new, TS_REQ_free, TS_RESP_new, TS_RESP_free, TS_STATUS_INFO_new, TS_STATUS_INFO_free, TS_TST_INFO_new, TS_TST_INFO_free, TS_ACCURACY_new, TS_ACCURACY_free, TS_MSG_IMPRINT_new, and TS_MSG_IMPRINT_free. alloc/free icons only, no cap ✨


✨ SYNOPSIS ✨

bestie, it’s libcrypto, and you pull in <openssl/ts.h> β€” here’s the whole signature lineup, fr fr:

library β€œlibcrypto” #include <openssl/ts.h>

TS_REQ *
TS_REQ_new(void);

void
TS_REQ_free(TS_REQ *req);

TS_RESP *
TS_RESP_new(void);

void
TS_RESP_free(TS_RESP *resp);

TS_STATUS_INFO *
TS_STATUS_INFO_new(void);

void
TS_STATUS_INFO_free(TS_STATUS_INFO *status);

TS_TST_INFO *
TS_TST_INFO_new(void);

void
TS_TST_INFO_free(TS_TST_INFO *token);

TS_ACCURACY *
TS_ACCURACY_new(void);

void
TS_ACCURACY_free(TS_ACCURACY *accuracy);

TS_MSG_IMPRINT *
TS_MSG_IMPRINT_new(void);

void
TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *imprint);

πŸ¦‹ DESCRIPTION πŸ¦‹

A time-stamping authority is a trusted third party which allows its clients to prove that specific data existed at a particular point in time. Clients send time-stamping requests to the time-stamping server, which returns time-stamp tokens to the clients. that’s the whole β€œprove it happened then” vibe, but cryptographically iconic πŸ’…

  • TS_REQ_new() β€” allocates and initializes an empty TS_REQ object, representing an ASN.1 TimeStampReq structure defined in RFC 3161 section 2.4.1. It can hold a hash of the datum to be time-stamped and some auxiliary, optional information. TS_REQ_free() frees req.
  • TS_RESP_new() β€” allocates and initializes an empty TS_RESP object, representing an ASN.1 TimeStampResp structure defined in RFC 3161 section 2.4.2. It can hold status information and a time-stamp token. TS_RESP_free() frees resp.
  • TS_STATUS_INFO_new() β€” allocates and initializes an empty TS_STATUS_INFO object, representing an ASN.1 PKIStatusInfo structure defined in RFC 3161 section 2.4.2. It is used inside TS_RESP and describes the outcome of one time-stamp request. TS_STATUS_INFO_free() frees status.
  • TS_TST_INFO_new() β€” allocates and initializes an empty TS_TST_INFO object, representing an ASN.1 TSTInfo structure defined in RFC 3161 section 2.4.2. It is the time-stamp token included in a TS_RESP object in case of success, and it can hold the hash of the datum copied from a request, the time of generation, and some auxiliary information. TS_TST_INFO_free() frees token.
  • TS_ACCURACY_new() β€” allocates and initializes an empty TS_ACCURACY object, representing an ASN.1 Accuracy structure defined in RFC 3161 section 2.4.2. It can be used inside a TS_TST_INFO object and indicates the maximum error of the time stated in the token. TS_ACCURACY_free() frees accuracy.
  • TS_MSG_IMPRINT_new() β€” allocates and initializes an empty TS_MSG_IMPRINT object, representing an ASN.1 MessageImprint structure defined in RFC 3161 section 2.4.1. It is used inside TS_REQ and TS_RESP objects. It specifies a hash algorithm and stores the hash value of the datum. TS_MSG_IMPRINT_free() frees imprint.

πŸŽ€ RETURN VALUES πŸŽ€

the _new() girlies are the ones doing returns: TS_REQ_new() returns the new TS_REQ object, TS_RESP_new() returns the new TS_RESP object, TS_STATUS_INFO_new() returns the new TS_STATUS_INFO object, TS_TST_INFO_new() returns the new TS_TST_INFO object, TS_ACCURACY_new() returns the new TS_ACCURACY object, and TS_MSG_IMPRINT_new() returns the new TS_MSG_IMPRINT object, respectively β€” or NULL if an error occurred. sad girl hours 😭 The _free() functions are void in the synopsis; they just free.


🌈 SEE ALSO 🌈

go be nosy with these besties:


πŸ‘‘ STANDARDS πŸ‘‘

RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol

note, bestie: RFC 3161 has been updated by RFC 5816: ESSCertIDv2 Update for RFC 3161. That update allows using the Signing Certificate Attribute Definition Version 2 according to RFC 5035, but the current implementation only supports the Signing Certificate Attribute Definition Version 1 according to RFC 2634, and hence only supports RFC 3161, but not RFC 5816 functionality. so yes, that’s the tea β€” no RFC 5816 functionality in this implementation πŸ«–


πŸ’œ HISTORY πŸ’œ

These functions first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9. legacy but still serving looks ✨


Debian Β· June 8, 2025 Β· TS_REQ_NEW(3) β€” mwah, that’s the source/version + date sign-off, bestie πŸ’‹

πŸ“¦ where this page comes from