Skip to main content

SignerInfo

Struct SignerInfo 

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

One parsed CMS signer, retaining original byte identity and diagnostic storage.

Implementations§

Source§

impl<'a> SignerInfo<'a>

Source

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

Reads a signer at the original depth with both producing work ceilings.

A uniquely readable version mismatch is retained as a fault, never a successful conformance claim. Signed attributes remain DER and their original octets are never repaired (RFC5652 §§5.3–5.4). https://www.rfc-editor.org/rfc/rfc5652#section-5.3

Source

pub fn version(&self) -> u64

Declared numeric version, independently of any retained mismatch.

Source

pub fn sid(&self) -> &SignerIdentifier<'a>

The document’s signer identity CHOICE.

Source

pub fn digest_algorithm(&self) -> AlgorithmIdentifier<'a>

Original digest algorithm and opaque parameters.

Source

pub fn signed_attributes(&self) -> Option<&Attributes<'a>>

Original signed attributes, when present.

Source

pub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>

Original signature algorithm and opaque parameters.

Source

pub fn signature(&self) -> &Octets<'a>

Logical signature octets without joining.

Source

pub fn unsigned_attributes(&self) -> Option<&Attributes<'a>>

Original attributes outside the signature’s coverage.

Source

pub fn countersignatures_in<'s>( &'s self, parent: &'s Reader<'a>, ) -> Countersignatures<'s, 'a> ⓘ

Reads direct unsigned countersignatures lazily through original provenance. Malformed values remain independent answers; resource refusal stops once.

Source

pub fn encoding(&self) -> Encoding

Encoding contract of the envelope, not that of the signed attributes.

Source

pub fn span(&self) -> Span

Original signer range.

Source

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

Entire original encoding, including non-DER envelope spelling.

Source

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

Retained document faults; resource refusals never enter this list.

Source

pub fn same_value( &self, other: &SignerInfo<'_>, parent: &Reader<'_>, ) -> Result<bool>

Parsed-field identity for duplicate recovery, not signature acceptance.

BER outer headers and octet segmentation are ignored. Issuer names use the common PKIX equality rules; serial bytes, opaque parameters and attribute sets retain encoded identity. Two present NULL parameters compare by their parsed NULL value, so its root length spelling cannot create a different reading. Signed attributes therefore remain byte-identical. RFC5754 §2 SHA-2 digest absence/NULL defaults share the PKIX comparer; other algorithm defaults and selected-provider acceptance remain separate operations.

Trait Implementations§

Source§

impl<'a> Debug for SignerInfo<'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 SignerInfo<'a>

§

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

§

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

§

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

§

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

§

impl<'a> Unpin for SignerInfo<'a>

§

impl<'a> UnsafeUnpin for SignerInfo<'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.