summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/TS_REQ_new.3
blob: 8dbd15ea7e9515aac006704f5b90b989200c3863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.\"	$OpenBSD: TS_REQ_new.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: June 6 2019 $
.Dt TS_REQ_NEW 3
.Os
.Sh NAME
.Nm TS_REQ_new ,
.Nm TS_REQ_free ,
.Nm TS_RESP_new ,
.Nm TS_RESP_free ,
.Nm TS_STATUS_INFO_new ,
.Nm TS_STATUS_INFO_free ,
.Nm TS_TST_INFO_new ,
.Nm TS_TST_INFO_free ,
.Nm TS_ACCURACY_new ,
.Nm TS_ACCURACY_free ,
.Nm TS_MSG_IMPRINT_new ,
.Nm TS_MSG_IMPRINT_free
.Nd X.509 time-stamp protocol
.Sh SYNOPSIS
.In openssl/ts.h
.Ft TS_REQ *
.Fn TS_REQ_new void
.Ft void
.Fn TS_REQ_free "TS_REQ *req"
.Ft TS_RESP *
.Fn TS_RESP_new void
.Ft void
.Fn TS_RESP_free "TS_RESP *resp"
.Ft TS_STATUS_INFO *
.Fn TS_STATUS_INFO_new void
.Ft void
.Fn TS_STATUS_INFO_free "TS_STATUS_INFO *status"
.Ft TS_TST_INFO *
.Fn TS_TST_INFO_new void
.Ft void
.Fn TS_TST_INFO_free "TS_TST_INFO *token"
.Ft TS_ACCURACY *
.Fn TS_ACCURACY_new void
.Ft void
.Fn TS_ACCURACY_free "TS_ACCURACY *accuracy"
.Ft TS_MSG_IMPRINT *
.Fn TS_MSG_IMPRINT_new void
.Ft void
.Fn TS_MSG_IMPRINT_free "TS_MSG_IMPRINT *imprint"
.Sh 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.
.Pp
.Fn TS_REQ_new
allocates and initializes an empty
.Vt TS_REQ
object, representing an ASN.1
.Vt 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.
.Fn TS_REQ_free
frees
.Fa req .
.Pp
.Fn TS_RESP_new
allocates and initializes an empty
.Vt TS_RESP
object, representing an ASN.1
.Vt TimeStampResp
structure defined in RFC 3161 section 2.4.2.
It can hold status information and a time-stamp token.
.Fn TS_RESP_free
frees
.Fa resp .
.Pp
.Fn TS_STATUS_INFO_new
allocates and initializes an empty
.Vt TS_STATUS_INFO
object, representing an ASN.1
.Vt PKIStatusInfo
structure defined in RFC 3161 section 2.4.2.
It is used inside
.Vt TS_RESP
and describes the outcome of one time-stamp request.
.Fn TS_STATUS_INFO_free
frees
.Fa status .
.Pp
.Fn TS_TST_INFO_new
allocates and initializes an empty
.Vt TS_TST_INFO
object, representing an ASN.1
.Vt TSTInfo
structure defined in RFC 3161 section 2.4.2.
It is the time-stamp token included in a
.Vt 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.
.Fn TS_TST_INFO_free
frees
.Fa token .
.Pp
.Fn TS_ACCURACY_new
allocates and initializes an empty
.Vt TS_ACCURACY
object, representing an ASN.1
.Vt Accuracy
structure defined in RFC 3161 section 2.4.2.
It can be used inside a
.Vt TS_TST_INFO
object and indicates the maximum error of the time stated in the token.
.Fn TS_ACCURACY_free
frees
.Fa accuracy .
.Pp
.Fn TS_MSG_IMPRINT_new
allocates and initializes an empty
.Vt TS_MSG_IMPRINT
object, representing an ASN.1
.Vt MessageImprint
structure defined in RFC 3161 section 2.4.1.
It is used inside
.Vt TS_REQ
and
.Vt TS_RESP
objects.
It specifies a hash algorithm and stores the hash value of the datum.
.Fn TS_MSG_IMPRINT_free
frees
.Fa imprint .
.Sh RETURN VALUES
.Fn TS_REQ_new ,
.Fn TS_RESP_new ,
.Fn TS_STATUS_INFO_new ,
.Fn TS_TST_INFO_new ,
.Fn TS_ACCURACY_new ,
and
.Fn TS_MSG_IMPRINT_new
return the new
.Vt TS_REQ ,
.Vt TS_RESP ,
.Vt TS_STATUS_INFO ,
.Vt TS_TST_INFO ,
.Vt TS_ACCURACY ,
or
.Vt TS_MSG_IMPRINT
object, respectively, or
.Dv NULL
if an error occurred.
.Sh SEE ALSO
.Xr ACCESS_DESCRIPTION_new 3 ,
.Xr ESS_SIGNING_CERT_new 3 ,
.Xr X509_EXTENSION_new 3
.Sh STANDARDS
RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol
.Pp
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.
.Sh HISTORY
These functions first appeared in OpenSSL 1.0.0
and have been available since
.Ox 4.9 .