File tree 2 files changed +12
-0
lines changed
openssl-sys/src/handwritten
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -62,4 +62,6 @@ extern "C" {
62
62
out : * mut BIO ,
63
63
flags : c_uint ,
64
64
) -> c_int ;
65
+
66
+ pub fn CMS_get0_type ( cms : * const CMS_ContentInfo ) -> * const ASN1_OBJECT ;
65
67
}
Original file line number Diff line number Diff line change @@ -10,11 +10,13 @@ use foreign_types::{ForeignType, ForeignTypeRef};
10
10
use libc:: c_uint;
11
11
use std:: ptr;
12
12
13
+ use crate :: asn1:: Asn1ObjectRef ;
13
14
use crate :: bio:: { MemBio , MemBioSlice } ;
14
15
use crate :: error:: ErrorStack ;
15
16
use crate :: pkey:: { HasPrivate , PKeyRef } ;
16
17
use crate :: stack:: StackRef ;
17
18
use crate :: symm:: Cipher ;
19
+ use crate :: util:: ForeignTypeRefExt ;
18
20
use crate :: x509:: { store:: X509StoreRef , X509Ref , X509 } ;
19
21
use crate :: { cvt, cvt_p} ;
20
22
use openssl_macros:: corresponds;
@@ -275,6 +277,14 @@ impl CmsContentInfo {
275
277
Ok ( ( ) )
276
278
}
277
279
}
280
+
281
+ #[ corresponds( CMS_get0_type ) ]
282
+ pub fn get_type ( & self ) -> & Asn1ObjectRef {
283
+ unsafe {
284
+ let asn1_type = ffi:: CMS_get0_type ( self . as_ptr ( ) as * const _ ) ;
285
+ & Asn1ObjectRef :: from_const_ptr ( asn1_type)
286
+ }
287
+ }
278
288
}
279
289
280
290
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments