pub struct ForbidDigestSignature;Expand description
Rejects packets signed with a bare DigestSha256 signature, while
still allowing unsigned packets and packets signed with other
signature types through.
A DigestSha256 signature only proves the packet’s bytes weren’t
altered; it doesn’t identify a signer, since anyone can compute a
digest. This verifier exists to be combined with a real signature
check (see simple_verifier) so digest-only packets don’t
masquerade as authenticated ones.
Implementations§
Source§impl ForbidDigestSignature
impl ForbidDigestSignature
pub fn new() -> ForbidDigestSignature
Trait Implementations§
Source§impl Clone for ForbidDigestSignature
impl Clone for ForbidDigestSignature
Source§fn clone(&self) -> ForbidDigestSignature
fn clone(&self) -> ForbidDigestSignature
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 moreimpl Copy for ForbidDigestSignature
Source§impl DataVerifier for ForbidDigestSignature
impl DataVerifier for ForbidDigestSignature
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
data: &'life1 Data<Bytes>,
_context: Arc<RwLock<TypeMap>>,
_app_handler: AppHandler,
_signature_verifiers: &'life2 (dyn ToVerifier + Sync),
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl Debug for ForbidDigestSignature
impl Debug for ForbidDigestSignature
Source§impl Default for ForbidDigestSignature
impl Default for ForbidDigestSignature
Source§fn default() -> ForbidDigestSignature
fn default() -> ForbidDigestSignature
Returns the “default value” for a type. Read more
Source§impl Hash for ForbidDigestSignature
impl Hash for ForbidDigestSignature
Source§impl InterestVerifier for ForbidDigestSignature
impl InterestVerifier for ForbidDigestSignature
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
interest: &'life1 Interest<Bytes>,
_context: Arc<RwLock<TypeMap>>,
_app_handler: AppHandler,
_signature_verifiers: &'life2 (dyn ToVerifier + Sync),
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl VerifierEx for ForbidDigestSignature
impl VerifierEx for ForbidDigestSignature
Source§fn or<T: Sized>(self, other: T) -> OrVerifier<Self, T>
fn or<T: Sized>(self, other: T) -> OrVerifier<Self, T>
Accepts a packet if either
self or other accepts it.Source§fn and<T: Sized>(self, other: T) -> AndVerifier<Self, T>
fn and<T: Sized>(self, other: T) -> AndVerifier<Self, T>
Accepts a packet only if both
self and other accept it.Auto Trait Implementations§
impl Freeze for ForbidDigestSignature
impl RefUnwindSafe for ForbidDigestSignature
impl Send for ForbidDigestSignature
impl Sync for ForbidDigestSignature
impl Unpin for ForbidDigestSignature
impl UnsafeUnpin for ForbidDigestSignature
impl UnwindSafe for ForbidDigestSignature
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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