@@ -33,8 +33,7 @@ foreign_type_and_impl_send_sync! {
33
33
34
34
impl TsMsgImprint {
35
35
/// Creates a new message imprint.
36
- ///
37
- /// This corresponds to `TS_MSG_IMPRINT_new`.
36
+ #[ corresponds( TS_MSG_IMPRINT_new ) ]
38
37
pub fn new ( ) -> Result < TsMsgImprint , ErrorStack > {
39
38
ffi:: init ( ) ;
40
39
unsafe {
@@ -106,10 +105,7 @@ foreign_type_and_impl_send_sync! {
106
105
impl TsReq {
107
106
from_der ! {
108
107
/// Deserializes a DER-encoded TimeStampReq structure.
109
- ///
110
- /// This corresponds to [`d2i_TS_REQ`].
111
- ///
112
- /// [`d2i_TS_REQ`]: https://www.openssl.org/docs/man1.1.0/man3/d2i_TS_REQ.html
108
+ #[ corresponds( d2i_TS_REQ) ]
113
109
from_der,
114
110
TsReq ,
115
111
ffi:: d2i_TS_REQ
@@ -119,19 +115,15 @@ impl TsReq {
119
115
impl TsReqRef {
120
116
to_der ! {
121
117
/// Serializes the timestamp request into a DER-encoded TimeStampReq structure.
122
- ///
123
- /// This corresponds to [`i2d_TS_REQ`].
124
- ///
125
- /// [`i2d_TS_REQ`]: https://www.openssl.org/docs/man1.1.0/man3/i2d_TS_REQ.html
118
+ #[ corresponds( i2d_TS_REQ) ]
126
119
to_der,
127
120
ffi:: i2d_TS_REQ
128
121
}
129
122
}
130
123
131
124
impl TsReq {
132
125
/// Creates a new timestamp request.
133
- ///
134
- /// This corresponds to `TS_REQ_new`.
126
+ #[ corresponds( TS_REQ_new ) ]
135
127
pub fn new ( ) -> Result < TsReq , ErrorStack > {
136
128
unsafe {
137
129
ffi:: init ( ) ;
@@ -143,15 +135,13 @@ impl TsReq {
143
135
/// Set the version of the timestamp request.
144
136
///
145
137
/// RFC 3161 requires this to be 1.
146
- ///
147
- /// This corresponds to `TS_REQ_set_version`.
138
+ #[ corresponds( TS_REQ_set_version ) ]
148
139
pub fn set_version ( & mut self , version : c_long ) -> Result < ( ) , ErrorStack > {
149
140
unsafe { cvt ( ffi:: TS_REQ_set_version ( self . as_ptr ( ) , version) ) . map ( |_| ( ) ) }
150
141
}
151
142
152
143
/// Set the message imprint.
153
- ///
154
- /// This corresponds to `TS_REQ_set_msg_imprint`.
144
+ #[ corresponds( TS_REQ_set_msg_imprint ) ]
155
145
pub fn set_msg_imprint ( & mut self , imprint : & TsMsgImprintRef ) -> Result < ( ) , ErrorStack > {
156
146
unsafe { cvt ( ffi:: TS_REQ_set_msg_imprint ( self . as_ptr ( ) , imprint. as_ptr ( ) ) ) . map ( |_| ( ) ) }
157
147
}
@@ -166,22 +156,19 @@ impl TsReq {
166
156
}
167
157
168
158
/// Sets the OID of the policy under which we're requesting the timestamp.
169
- ///
170
- /// This corresponds to `TS_REQ_set_policy_id`.
159
+ #[ corresponds( TS_REQ_set_policy_id ) ]
171
160
pub fn set_policy_id ( & mut self , policy : & Asn1ObjectRef ) -> Result < ( ) , ErrorStack > {
172
161
unsafe { cvt ( ffi:: TS_REQ_set_policy_id ( self . as_ptr ( ) , policy. as_ptr ( ) ) ) . map ( |_| ( ) ) }
173
162
}
174
163
175
164
/// Sets the nonce.
176
- ///
177
- /// This corresopnds to `TS_REQ_set_nonce`.
165
+ #[ corresponds( TS_REQ_set_nonce ) ]
178
166
pub fn set_nonce ( & mut self , nonce : & Asn1IntegerRef ) -> Result < ( ) , ErrorStack > {
179
167
unsafe { cvt ( ffi:: TS_REQ_set_nonce ( self . as_ptr ( ) , nonce. as_ptr ( ) ) ) . map ( |_| ( ) ) }
180
168
}
181
169
182
170
/// Sets whether to request the public key certificate in the response.
183
- ///
184
- /// This corresponds to `TS_REQ_set_cert_req`.
171
+ #[ corresponds( TS_REQ_set_cert_req ) ]
185
172
pub fn set_cert_req ( & mut self , cert_req : bool ) -> Result < ( ) , ErrorStack > {
186
173
unsafe { cvt ( ffi:: TS_REQ_set_cert_req ( self . as_ptr ( ) , cert_req as c_int ) ) . map ( |_| ( ) ) }
187
174
}
@@ -201,10 +188,7 @@ foreign_type_and_impl_send_sync! {
201
188
impl TsResp {
202
189
from_der ! {
203
190
/// Deserializes a DER-encoded TimeStampResp structure.
204
- ///
205
- /// This corresponds to [`d2i_TS_RESP`].
206
- ///
207
- /// [`d2i_TS_RESP`]: https://www.openssl.org/docs/man1.1.0/man3/d2i_TS_RESP.html
191
+ #[ corresponds( d2i_TS_RESP) ]
208
192
from_der,
209
193
TsResp ,
210
194
ffi:: d2i_TS_RESP
@@ -214,17 +198,13 @@ impl TsResp {
214
198
impl TsRespRef {
215
199
to_der ! {
216
200
/// Serializes the timestamp request into a DER-encoded TimeStampResp structure.
217
- ///
218
- /// This corresponds to [`i2d_TS_RESP`].
219
- ///
220
- /// [`i2d_TS_RESP`]: https://www.openssl.org/docs/man1.1.0/man3/i2d_TS_RESP.html
201
+ #[ corresponds( i2d_TS_RESP) ]
221
202
to_der,
222
203
ffi:: i2d_TS_RESP
223
204
}
224
205
225
206
/// Verifies a timestamp response.
226
- ///
227
- /// This corresponds to `TS_RESP_verify_response`.
207
+ #[ corresponds( TS_RESP_verify_response ) ]
228
208
pub fn verify ( & self , context : & TsVerifyContext ) -> Result < ( ) , ErrorStack > {
229
209
unsafe {
230
210
cvt ( ffi:: TS_RESP_verify_response (
@@ -300,8 +280,7 @@ foreign_type_and_impl_send_sync! {
300
280
301
281
impl TsRespContextRef {
302
282
/// Creates a signed timestamp response for the request.
303
- ///
304
- /// This corresponds to `TS_RESP_create_response`.
283
+ #[ corresponds( TS_RESP_create_response ) ]
305
284
pub fn create_response ( & mut self , request : & TsReqRef ) -> Result < TsResp , ErrorStack > {
306
285
unsafe {
307
286
let der = request. to_der ( ) ?;
@@ -314,8 +293,7 @@ impl TsRespContextRef {
314
293
315
294
impl TsRespContext {
316
295
/// Creates a new response context.
317
- ///
318
- /// This corresponds to `TS_RESP_CTX_new`.
296
+ #[ corresponds( TS_RESP_CTX_new ) ]
319
297
pub fn new ( ) -> Result < TsRespContext , ErrorStack > {
320
298
unsafe {
321
299
ffi:: init ( ) ;
@@ -325,8 +303,7 @@ impl TsRespContext {
325
303
}
326
304
327
305
/// Sets the OID of the default policy used by the TSA.
328
- ///
329
- /// This corresponds to `TS_RESP_CTX_set_def_policy`.
306
+ #[ corresponds( TS_RESP_CTX_set_def_policy ) ]
330
307
pub fn set_default_policy ( & mut self , policy : & Asn1ObjectRef ) -> Result < ( ) , ErrorStack > {
331
308
unsafe {
332
309
cvt ( ffi:: TS_RESP_CTX_set_def_policy (
0 commit comments