Skip to main content

SignedData

Struct SignedData 

Source
pub struct SignedData<'a> { /* private fields */ }
Expand description

Original CMS SignedData with independently accounted metadata and faults.

Implementations§

Source§

impl<'a> SignedData<'a>

Source

pub fn read(parser: &'a Parser, encoded: &'a [u8], base: u64) -> Result<Self>

Reads one entire CMS ContentInfo and its SignedData using the same parser.

Source

pub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>

Reads an original embedded SignedData, preserving enclosing depth/work.

Source

pub fn version(&self) -> u64

Declared version.

Source

pub fn required_version(&self) -> u64

Version independently required by the encoded choices.

Source

pub fn digest_algorithms(&self) -> &[AlgorithmIdentifier<'a>]

Original advertised digest algorithms; provider resolution is separate. RFC5652 §§5.1, 5.3 permit zero entries and do not require recipients to refuse an unlisted signer digest. These advertisements never replace the original signer algorithm; stricter catalogue acceptance is caller policy. https://www.rfc-editor.org/rfc/rfc5652#section-5.1

Source

pub fn content(&self) -> &Encapsulated<'a>

Original attached or absent content.

Source

pub fn certificate_choices(&self) -> &[CertificateChoice<'a>]

Certificate choices in their original order.

Source

pub fn certificates(&self) -> &[Certificate<'a>]

Parsed X.509 certificates, in the order referenced by X509 choices.

Source

pub fn certificate_field(&self) -> Option<Span>

Original presence of the certificate field, including an empty written set.

Source

pub fn revocation_field(&self) -> Option<Span>

Original presence of the revocation field, including an empty written set.

Source

pub fn revocations(&self) -> &[Element<'a>]

Original revocation choices, not implicitly authenticated or fetched.

Source

pub fn signers(&self) -> &[SignerInfo<'a>]

Independent signers in their original order, without an all-signers verdict.

Source

pub fn faults(&self) -> &[Error]

Readable document faults, retaining their allocation lifetime.

Source

pub fn span(&self) -> Span

Original SignedData source range.

Source

pub fn as_bytes(&self) -> &'a [u8] ⓘ

Original encoding without serialization.

Trait Implementations§

Source§

impl<'a> Debug for SignedData<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for SignedData<'a>

§

impl<'a> !RefUnwindSafe for SignedData<'a>

§

impl<'a> !Send for SignedData<'a>

§

impl<'a> !Sync for SignedData<'a>

§

impl<'a> !UnwindSafe for SignedData<'a>

§

impl<'a> Unpin for SignedData<'a>

§

impl<'a> UnsafeUnpin for SignedData<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.