TS_REQ_NEW(3)

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

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.