Skip to main content

SignerInfo

Struct SignerInfo 

Source
pub struct SignerInfo {
    pub version: u64,
    pub sid: SignerIdentifier,
    pub digest_algorithm_oid: Vec<u64>,
    pub digest_algorithm_params: Vec<u8>,
    pub signed_attrs: Vec<Attribute>,
    pub signed_attrs_der: Option<Vec<u8>>,
    pub signature_algorithm_oid: Vec<u64>,
    pub signature_algorithm_params: Vec<u8>,
    pub signature: Vec<u8>,
    pub unsigned_attrs: Vec<Attribute>,
}
Expand description

One SignerInfo slot inside the SignedData.signerInfos SET.

Round-19 keeps the surface inspection-only — the bytes that would feed signature verification are all surfaced (digest_algorithm OID, signature_algorithm OID, raw signature octet string), but no verify helper is implemented this round.

Fields§

§version: u64

CMS SignerInfo version — 1 (IAS) or 3 (SKI).

§sid: SignerIdentifier

Signer identifier — IAS (v1) or SKI (v3).

§digest_algorithm_oid: Vec<u64>

digestAlgorithm OID arcs (e.g. SHA-256 = 2.16.840.1.101.3.4.2.1).

§digest_algorithm_params: Vec<u8>

digestAlgorithm raw parameter bytes (typically a NULL or absent — we surface what was on the wire so a caller can distinguish encodings).

§signed_attrs: Vec<Attribute>

OPTIONAL signed attributes ([0] IMPLICIT SET OF Attribute). Per RFC 5652 §5.3, when present the signature is computed over the DER encoding of the SignedAttributes SET (with universal SET tag, NOT the implicit [0] tag — RFC 5652 §5.4). Empty vec means “absent”.

§signed_attrs_der: Option<Vec<u8>>

Round-19 verification helper — when signed_attrs was present on the wire, this carries the raw DER body of the [0] IMPLICIT SET. The verifier needs to re-encode this with the universal SET tag (0x31) before hashing per RFC 5652 §5.4 — to make that mechanical, we store the body bytes here and the re-tagging happens in the verify dispatch (deferred). None when signed_attrs was absent.

§signature_algorithm_oid: Vec<u64>

signatureAlgorithm OID arcs (e.g. RSAES-PKCS1-v1.5 = 1.2.840.113549.1.1.1, ECDSA-with-SHA256 = 1.2.840.10045.4.3.2).

§signature_algorithm_params: Vec<u8>

signatureAlgorithm raw parameter bytes.

§signature: Vec<u8>

signature OCTET STRING — the actual signature octets the verifier checks against the digest of the signed bytes.

§unsigned_attrs: Vec<Attribute>

OPTIONAL unsigned attributes ([1] IMPLICIT SET OF Attribute).

Trait Implementations§

Source§

impl Clone for SignerInfo

Source§

fn clone(&self) -> SignerInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SignerInfo

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V