pub struct VerifyConfig { /* private fields */ }Expand description
Pinned trust roots the verifier consults. Constructed by the integrator; the verifier itself never fetches keys from the network.
Implementations§
Source§impl VerifyConfig
impl VerifyConfig
pub fn new() -> Self
Add an authority JWK (Ed25519, RFC 8037 form). The verifier
computes kid = sha256(pubkey)[..16].hex() and indexes by it.
Sourcepub fn pin_vk(self, vk_hash_hex: &str, vk_bytes: Vec<u8>) -> Self
pub fn pin_vk(self, vk_hash_hex: &str, vk_bytes: Vec<u8>) -> Self
Pin a verifying key by its content hash. vk_hash_hex MAY
have an optional 0x prefix; it is normalized to lowercase
hex without prefix.
Sourcepub fn at_time(self, unix_secs: u64) -> Self
pub fn at_time(self, unix_secs: u64) -> Self
Override the wall clock for tests + fixture replay.
Sourcepub fn with_clock_skew(self, secs: u64) -> Self
pub fn with_clock_skew(self, secs: u64) -> Self
Allow more clock skew than the default 30s (e.g. for batch replay of historical receipts).
Trait Implementations§
Source§impl Clone for VerifyConfig
impl Clone for VerifyConfig
Source§fn clone(&self) -> VerifyConfig
fn clone(&self) -> VerifyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerifyConfig
impl Debug for VerifyConfig
Source§impl Default for VerifyConfig
impl Default for VerifyConfig
Source§fn default() -> VerifyConfig
fn default() -> VerifyConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VerifyConfig
impl RefUnwindSafe for VerifyConfig
impl Send for VerifyConfig
impl Sync for VerifyConfig
impl Unpin for VerifyConfig
impl UnsafeUnpin for VerifyConfig
impl UnwindSafe for VerifyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more