File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ extern "C" {
70
70
pub fn i2d_TS_REQ ( a : * const TS_REQ , pp : * mut * mut c_uchar ) -> c_int ;
71
71
pub fn TS_REQ_set_version ( a : * mut TS_REQ , version : c_long ) -> c_int ;
72
72
pub fn TS_REQ_set_msg_imprint ( a : * mut TS_REQ , msg_imprint : * mut TS_MSG_IMPRINT ) -> c_int ;
73
+ pub fn TS_REQ_get_msg_imprint ( a : * mut TS_REQ ) -> * mut TS_MSG_IMPRINT ;
73
74
pub fn TS_REQ_set_nonce ( a : * mut TS_REQ , nonce : * const ASN1_INTEGER ) -> c_int ;
74
75
pub fn TS_REQ_set_cert_req ( a : * mut TS_REQ , cert_req : c_int ) -> c_int ;
75
76
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use crate::bio::MemBioSlice;
16
16
use crate :: error:: ErrorStack ;
17
17
use crate :: hash:: { Hasher , MessageDigest } ;
18
18
use crate :: pkey:: { HasPrivate , PKeyRef } ;
19
+ use crate :: util:: ForeignTypeExt ;
19
20
use crate :: x509:: { X509Algorithm , X509AlgorithmRef , X509Ref } ;
20
21
use crate :: { cvt, cvt_p} ;
21
22
@@ -155,6 +156,15 @@ impl TsReq {
155
156
unsafe { cvt ( ffi:: TS_REQ_set_msg_imprint ( self . as_ptr ( ) , imprint. as_ptr ( ) ) ) . map ( |_| ( ) ) }
156
157
}
157
158
159
+ /// Get the message imprint
160
+ #[ corresponds( TS_REQ_get_msg_imprint ) ]
161
+ pub fn get_msg_imprint ( & mut self ) -> Option < TsMsgImprint > {
162
+ unsafe {
163
+ let imprint = ffi:: TS_REQ_get_msg_imprint ( self . as_ptr ( ) ) ;
164
+ TsMsgImprint :: from_ptr_opt ( imprint)
165
+ }
166
+ }
167
+
158
168
/// Sets the OID of the policy under which we're requesting the timestamp.
159
169
///
160
170
/// This corresponds to `TS_REQ_set_policy_id`.
You can’t perform that action at this time.
0 commit comments