Verification

Struct Verification 

Source
pub struct Verification { /* private fields */ }
Expand description

A successful signature verification.

Implementations§

Source§

impl Verification

Source

pub fn new<'m, T, K, C, M>( creation_time: T, signing_key_fingerprint: K, signing_cert_fingerprint: C, signature_mode: SignatureMode, message: M, ) -> Result<Verification>
where T: Into<SystemTime>, K: ToString, C: ToString, M: Into<Option<&'m str>>,

Creates a Verification object.

Source

pub fn add_signer<N: ToString>(&mut self, name: N)

Adds an issuer name.

This is used by the SOP cli to name the certificates that were used to verify the signature with.

Source

pub fn set_extension_info<E: Into<Value>>(&mut self, ext: E)

Sets arbitrary, implementation-defined data to the verification object.

Source

pub fn creation_time(&self) -> SystemTime

Returns the signature’s creation time.

Source

pub fn signing_key_fingerprint(&self) -> &str

Returns the fingerprint of the signing (sub)key.

Source

pub fn signing_cert_fingerprint(&self) -> &str

Returns the fingerprint of the signing certificate.

Source

pub fn signature_mode(&self) -> SignatureMode

Returns the signature mode.

Source

pub fn message(&self) -> Option<&str>

Returns a free-form message describing the verification.

Trait Implementations§

Source§

impl Debug for Verification

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Verification

Available on crate features cli or cliv only.
Source§

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

Formats the value using the given formatter. Read more
Source§

impl Hash for Verification

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> ToString for T
where T: Display + ?Sized,

§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.