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>
impl<'a> SignerInfo<'a>
Sourcepub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
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). Each algorithm uses the PKIX inspection reader: a uniquely bounded malformed parameter stays visible with its located diagnostic, while missing/ambiguous fields and resource/processing refusals remain errors. Provider preparation refuses either malformed algorithm before callbacks. https://www.rfc-editor.org/rfc/rfc5652#section-5.3
Sourcepub fn sid(&self) -> &SignerIdentifier<'a>
pub fn sid(&self) -> &SignerIdentifier<'a>
The document’s signer identity CHOICE.
Sourcepub fn digest_algorithm(&self) -> &AlgorithmReading<'a>
pub fn digest_algorithm(&self) -> &AlgorithmReading<'a>
Original digest inspection, including any parameter syntax fault.
Only the reading’s identifier() exposes a validated provider input.
Sourcepub fn signed_attributes(&self) -> Option<&Attributes<'a>>
pub fn signed_attributes(&self) -> Option<&Attributes<'a>>
Original signed attributes, when present.
Sourcepub fn signature_algorithm(&self) -> &AlgorithmReading<'a>
pub fn signature_algorithm(&self) -> &AlgorithmReading<'a>
Original signature inspection, including any parameter syntax fault. A readable malformed algorithm is never a validated provider input.
Sourcepub fn unsigned_attributes(&self) -> Option<&Attributes<'a>>
pub fn unsigned_attributes(&self) -> Option<&Attributes<'a>>
Original attributes outside the signature’s coverage.
Sourcepub fn countersignatures_in<'s>(
&'s self,
parent: &'s Reader<'a>,
) -> Countersignatures<'s, 'a> ⓘ
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.
Sourcepub fn encoding(&self) -> Encoding
pub fn encoding(&self) -> Encoding
Encoding contract of the envelope, not that of the signed attributes.
Sourcepub fn element(&self) -> &Element<'a>
pub fn element(&self) -> &Element<'a>
Original whole element, including its index in the source container.
This is not a global signer ordinal: nested counter values retain their own original container positions. Ranges use the producing reader’s coordinates; joined-source projection remains with its source map.
Sourcepub fn as_bytes(&self) -> &'a [u8] ⓘ
pub fn as_bytes(&self) -> &'a [u8] ⓘ
Entire original encoding, including non-DER envelope spelling.
Sourcepub fn faults(&self) -> &[Error]
pub fn faults(&self) -> &[Error]
Retained document faults; resource refusals never enter this list.
Registered CMS instance/placement violations are retained independently of certificate selection. Unknown generic attribute repetition is not a blanket fault; value syntax and context-specific binding stay separate.
Sourcepub fn same_value(
&self,
other: &SignerInfo<'_>,
parent: &Reader<'_>,
) -> Result<bool>
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.