Struct cryptographic_message_syntax::SignerBuilder [−][src]
pub struct SignerBuilder<'a> { /* fields omitted */ }
Builder type to construct an entity that will sign some data.
Instances will be attached to SignedDataBuilder
instances where they
will sign data using configured settings.
Implementations
impl<'a> SignerBuilder<'a>
[src]
impl<'a> SignerBuilder<'a>
[src]pub fn new(
signing_key: &'a InMemorySigningKeyPair,
signing_certificate: CapturedX509Certificate
) -> Self
[src]
pub fn new(
signing_key: &'a InMemorySigningKeyPair,
signing_certificate: CapturedX509Certificate
) -> Self
[src]Construct a new entity that will sign content.
An entity is constructed from a signing key, which is mandatory.
pub fn signature_algorithm(&self) -> SignatureAlgorithm
[src]
pub fn signature_algorithm(&self) -> SignatureAlgorithm
[src]Obtain the signature algorithm used by the signing key.
pub fn message_id_content(self, data: Vec<u8>) -> Self
[src]
pub fn message_id_content(self, data: Vec<u8>) -> Self
[src]Define the content to use to calculate the message-id
attribute.
In most cases, this is never called and the encapsulated content
embedded within the generated message is used. However, some users
omit storing the data inline and instead use a message-id
digest
calculated from a different source. This defines that different source.
pub fn content_type(self, oid: Oid) -> Self
[src]
pub fn content_type(self, oid: Oid) -> Self
[src]Define the content type of the signed content.
pub fn signed_attribute(self, typ: Oid, values: Vec<AttributeValue>) -> Self
[src]
pub fn signed_attribute(self, typ: Oid, values: Vec<AttributeValue>) -> Self
[src]Add an additional attribute to sign.
pub fn signed_attribute_octet_string(self, typ: Oid, data: &[u8]) -> Self
[src]
pub fn signed_attribute_octet_string(self, typ: Oid, data: &[u8]) -> Self
[src]Add an additional OctetString signed attribute.
This is a helper for converting a byte slice to an OctetString and AttributeValue without having to go through low-level ASN.1 code.
pub fn time_stamp_url(self, url: impl IntoUrl) -> Result<Self, Error>
[src]
pub fn time_stamp_url(self, url: impl IntoUrl) -> Result<Self, Error>
[src]Obtain a time-stamp token from a server.
If this is called, the URL must be a server implementing the Time-Stamp Protocol (TSP) as defined by RFC 3161. At signature generation time, the server will be contacted and the time stamp token response will be added as an unsigned attribute on the SignedData instance.
Auto Trait Implementations
impl<'a> RefUnwindSafe for SignerBuilder<'a>
impl<'a> Send for SignerBuilder<'a>
impl<'a> Sync for SignerBuilder<'a>
impl<'a> Unpin for SignerBuilder<'a>
impl<'a> UnwindSafe for SignerBuilder<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]