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 certificate_choice_reader_in<'query>( &self, query: &Reader<'query>, ordinal: usize, ) -> Result<Option<Reader<'query>>>
where 'a: 'query,

Opens an original non-X.509 certificate CHOICE under the current query.

Preserves the original parser, encoding, location and certificate-set depth. The current operation funds new work while original ceilings remain active. An absent ordinal or X.509 index returns None after metadata admission; parsed X.509 certificates have their own accessors. No certificate is implicitly trusted or decoded by opening this reader.

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 revocation_reader_in<'query>( &self, query: &Reader<'query>, ordinal: usize, ) -> Result<Option<Reader<'query>>>
where 'a: 'query,

Opens one original revocation CHOICE under the current query operation.

The reader contains the whole original CRL or other-format CHOICE, not its contents. Original parser, encoding, location and set-member depth are preserved; the query may come from another document and pays all new work/storage while both source and operation ceilings remain active. No bytes are copied and no new parser or authentication is introduced. An absent ordinal returns None only after paid metadata admission.

Source

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

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

Source

pub fn require_session( &self, parent: &Reader<'_>, field: &'static str, ) -> Result<()>

Refuses a reader of another parser session.

Source

pub fn require_signer( &self, signer: &SignerInfo<'_>, field: &'static str, ) -> Result<()>

Refuses a SignerInfo that is not one of these signers, by identity.

Constant work: a reference to one of these signers lies inside their storage, so an address range test replaces a scan of every signer.

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.