Struct openssl::cms::CmsContentInfo
[−]
pub struct CmsContentInfo(_);
High level CMS wrapper
CMS supports nesting various types of data, including signatures, certificates,
encrypted data, smime messages (encrypted email), and data digest. The ContentInfo
content type is the encapsulation of all those content types. RFC 5652
describes
CMS and OpenSSL follows this RFC's implmentation.
Methods
impl CmsContentInfo
[src]
pub fn smime_read_cms(smime: &[u8]) -> Result<CmsContentInfo, ErrorStack>
[src]
Parses a smime formatted vec
of bytes into a CmsContentInfo
.
OpenSSL documentation at SMIME_read_CMS
Methods from Deref<Target = CmsContentInfoRef>
pub fn decrypt(
&self,
pkey: &PKeyRef,
cert: &X509
) -> Result<Vec<u8>, ErrorStack>
[src]
&self,
pkey: &PKeyRef,
cert: &X509
) -> Result<Vec<u8>, ErrorStack>
Given the sender's private key, pkey
and the recipient's certificiate, cert
,
decrypt the data in self
.
OpenSSL documentation at CMS_decrypt
Trait Implementations
impl ForeignType for CmsContentInfo
type CType = CMS_ContentInfo
The raw C type.
type Ref = CmsContentInfoRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut CMS_ContentInfo) -> CmsContentInfo
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut CMS_ContentInfo
Returns a raw pointer to the wrapped value.
impl Drop for CmsContentInfo
impl Deref for CmsContentInfo
type Target = CmsContentInfoRef
The resulting type after dereferencing.
fn deref(&self) -> &CmsContentInfoRef
Dereferences the value.
impl DerefMut for CmsContentInfo
fn deref_mut(&mut self) -> &mut CmsContentInfoRef
Mutably dereferences the value.