---
name: "libressl-TS_REQ_new"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-TS_REQ_new"
---

# libressl-TS\_REQ\_new(3)

X.509 time-stamp protocol

## NAME

**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**, **TS\_MSG\_IMPRINT\_free** – X.509 time-stamp protocol

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

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

**TS\_REQ\_new**(), **TS\_RESP\_new**(), **TS\_STATUS\_INFO\_new**(), **TS\_TST\_INFO\_new**(), **TS\_ACCURACY\_new**(), and **TS\_MSG\_IMPRINT\_new**() return the new *TS\_REQ*, *TS\_RESP*, *TS\_STATUS\_INFO*, *TS\_TST\_INFO*, *TS\_ACCURACY*, or *TS\_MSG\_IMPRINT* object, respectively, or NULL if an error occurred.

## SEE ALSO

ACCESS\_DESCRIPTION\_new(3), ESS\_SIGNING\_CERT\_new(3), X509\_EXTENSION\_new(3)

## STANDARDS

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

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

## HISTORY

These functions first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9.
