pub struct CMSDecoder(/* private fields */);
Expand description
A type representing CMS Decoder
Implementations§
Source§impl CMSDecoder
impl CMSDecoder
Sourcepub fn update_message(&self, message: &[u8]) -> Result<()>
pub fn update_message(&self, message: &[u8]) -> Result<()>
Feeds raw bytes of the message to be decoded into the decoder
Sourcepub fn finalize_message(&self) -> Result<()>
pub fn finalize_message(&self) -> Result<()>
Indicates that there is no more data to decode
Sourcepub fn set_detached_content(&self, detached_content: &[u8]) -> Result<()>
pub fn set_detached_content(&self, detached_content: &[u8]) -> Result<()>
Specifies the message’s detached content, if any
Sourcepub fn get_detached_content(&self) -> Result<Vec<u8>>
pub fn get_detached_content(&self) -> Result<Vec<u8>>
Obtains the detached content specified with the set_detached_content
function
Sourcepub fn get_num_signers(&self) -> Result<usize>
pub fn get_num_signers(&self) -> Result<usize>
Obtains the number of signers of a message
Sourcepub fn get_signer_status(
&self,
signer_index: usize,
policies: &[SecPolicy],
) -> Result<SignerStatus>
pub fn get_signer_status( &self, signer_index: usize, policies: &[SecPolicy], ) -> Result<SignerStatus>
Obtains the status of a CMS message’s signature
Sourcepub fn get_signer_email_address(&self, signer_index: usize) -> Result<String>
pub fn get_signer_email_address(&self, signer_index: usize) -> Result<String>
Obtains the email address of the specified signer of a CMS message
Sourcepub fn is_content_encrypted(&self) -> Result<bool>
pub fn is_content_encrypted(&self) -> Result<bool>
Determines whether a CMS message was encrypted
Sourcepub fn get_encapsulated_content_type(&self) -> Result<Vec<u8>>
pub fn get_encapsulated_content_type(&self) -> Result<Vec<u8>>
Obtains the object identifier for the encapsulated data of a signed message
Sourcepub fn get_all_certs(&self) -> Result<Vec<SecCertificate>>
pub fn get_all_certs(&self) -> Result<Vec<SecCertificate>>
Obtains an array of all of the certificates in a message
Sourcepub fn get_content(&self) -> Result<Vec<u8>>
pub fn get_content(&self) -> Result<Vec<u8>>
Obtains the message content, if any
Sourcepub fn get_signer_signing_time(
&self,
signer_index: usize,
) -> Result<CFAbsoluteTime>
pub fn get_signer_signing_time( &self, signer_index: usize, ) -> Result<CFAbsoluteTime>
Obtains the signing time of a CMS message, if present
Sourcepub fn get_signer_timestamp(
&self,
signer_index: usize,
) -> Result<CFAbsoluteTime>
pub fn get_signer_timestamp( &self, signer_index: usize, ) -> Result<CFAbsoluteTime>
Returns the timestamp of a signer of a CMS message, if present
Sourcepub fn get_signer_timestamp_with_policy(
&self,
timestamp_policy: Option<CFStringRef>,
signer_index: usize,
) -> Result<CFAbsoluteTime>
pub fn get_signer_timestamp_with_policy( &self, timestamp_policy: Option<CFStringRef>, signer_index: usize, ) -> Result<CFAbsoluteTime>
Returns the timestamp of a signer of a CMS message using a given policy, if present
Sourcepub fn get_signer_timestamp_certificates(
&self,
signer_index: usize,
) -> Result<Vec<SecCertificate>>
pub fn get_signer_timestamp_certificates( &self, signer_index: usize, ) -> Result<Vec<SecCertificate>>
Returns an array containing the certificates from a timestamp response
Trait Implementations§
Source§impl Clone for CMSDecoder
impl Clone for CMSDecoder
Source§fn clone(&self) -> CMSDecoder
fn clone(&self) -> CMSDecoder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CMSDecoder
impl Debug for CMSDecoder
Source§impl Drop for CMSDecoder
impl Drop for CMSDecoder
Source§impl PartialEq for CMSDecoder
impl PartialEq for CMSDecoder
Source§impl TCFType for CMSDecoder
impl TCFType for CMSDecoder
Source§type Ref = *mut OpaqueCMSEncoderRef
type Ref = *mut OpaqueCMSEncoderRef
Source§fn as_concrete_TypeRef(&self) -> CMSDecoderRef
fn as_concrete_TypeRef(&self) -> CMSDecoderRef
TypeRef
.Source§unsafe fn wrap_under_get_rule(reference: CMSDecoderRef) -> Self
unsafe fn wrap_under_get_rule(reference: CMSDecoderRef) -> Self
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.Source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
CFTypeRef
. The reference count is not adjusted.Source§unsafe fn wrap_under_create_rule(reference: CMSDecoderRef) -> Self
unsafe fn wrap_under_create_rule(reference: CMSDecoderRef) -> Self
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.Source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
CFType
. The reference count is incremented by one.Source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
CFType
. Consumes self and avoids changing the reference
count.Source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
true
if this value is an instance of another type.Source§impl<'a> ToVoid<CMSDecoder> for &'a CMSDecoder
impl<'a> ToVoid<CMSDecoder> for &'a CMSDecoder
Source§impl ToVoid<CMSDecoder> for CMSDecoderRef
impl ToVoid<CMSDecoder> for CMSDecoderRef
Source§impl ToVoid<CMSDecoder> for CMSDecoder
impl ToVoid<CMSDecoder> for CMSDecoder
impl ConcreteCFType for CMSDecoder
impl Eq for CMSDecoder
impl Send for CMSDecoder
impl Sync for CMSDecoder
Auto Trait Implementations§
impl Freeze for CMSDecoder
impl RefUnwindSafe for CMSDecoder
impl Unpin for CMSDecoder
impl UnwindSafe for CMSDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)