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

Entity for incrementally deriving a SignedData primitive.

Use this type for generating an RFC 5652 payload for signed data.

By default, the encapsulated content to sign is empty. Call Self::content_inline() or Self::content_external() to define encapsulated content.

Implementations§

Define encapsulated content that will be stored inline in the produced signature.

Define encapsulated content that won’t be present in the produced signature.

The content will be digested and that digest conveyed in the built signature. But the content itself won’t be present in the signature. RFC 5652 refers to this as an external signature.

Add a signer.

The signer is the thing generating the cryptographic signature over data to be signed.

Add a certificate defined by our crate’s Certificate type.

Add multiple certificates to the certificates chain.

Force the OID for the ContentInfo.contentType field.

Construct a DER-encoded ASN.1 document containing a SignedData object.

RFC 5652 says SignedData is BER encoded. However, DER is a stricter subset of BER. DER encodings are valid BER. So producing DER encoded data is perfectly valid. We choose to go with the more well-defined encoding format.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more