pub struct RequireValidSignature(pub Certificate);Expand description
Requires a valid cryptographic signature, chaining up through certificates to the trust anchor held in the tuple field.
A packet’s signature is checked directly against the anchor first;
if the signing key isn’t the anchor itself, the verifier fetches the
signer’s certificate (by expressing an Interest for it through
AppHandler) and recurses, up to a fixed depth, until it either
reaches the anchor or gives up. This lets an application trust one
root key while still accepting packets signed by keys the root has
certified, rather than needing every valid signer’s key listed
up front.
Tuple Fields§
§0: CertificateTrait Implementations§
Source§impl Clone for RequireValidSignature
impl Clone for RequireValidSignature
Source§fn clone(&self) -> RequireValidSignature
fn clone(&self) -> RequireValidSignature
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 DataVerifier for RequireValidSignature
impl DataVerifier for RequireValidSignature
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 RequireValidSignature
impl Debug for RequireValidSignature
Source§impl Hash for RequireValidSignature
impl Hash for RequireValidSignature
Source§impl InterestVerifier for RequireValidSignature
impl InterestVerifier for RequireValidSignature
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 RequireValidSignature
impl VerifierEx for RequireValidSignature
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 RequireValidSignature
impl RefUnwindSafe for RequireValidSignature
impl Send for RequireValidSignature
impl Sync for RequireValidSignature
impl Unpin for RequireValidSignature
impl UnsafeUnpin for RequireValidSignature
impl UnwindSafe for RequireValidSignature
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