pub struct P2pCertificate<'a> { /* private fields */ }Available on crate feature
tls only.Expand description
An X.509 certificate with a libp2p-specific extension is used to secure libp2p connections.
Implementations§
Source§impl P2pCertificate<'_>
impl P2pCertificate<'_>
Sourcepub fn verify_signature(
&self,
signature_scheme: SignatureScheme,
message: &[u8],
signature: &[u8],
) -> Result<(), VerificationError>
pub fn verify_signature( &self, signature_scheme: SignatureScheme, message: &[u8], signature: &[u8], ) -> Result<(), VerificationError>
Verify the signature of the message signed by the private key corresponding to the
public key stored in the certificate.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for P2pCertificate<'a>
impl<'a> Freeze for P2pCertificate<'a>
impl<'a> Move for P2pCertificate<'a>
impl<'a> RefUnwindSafe for P2pCertificate<'a>where
Vec<u8>: RefUnwindSafe,
NonZero<i32>: RefUnwindSafe,
NonZero<usize>: RefUnwindSafe,
AffinePoint: RefUnwindSafe,
AffinePoint<NistP256>: RefUnwindSafe,
impl<'a> Send for P2pCertificate<'a>
impl<'a> Sync for P2pCertificate<'a>
impl<'a> Unpin for P2pCertificate<'a>
impl<'a> UnsafeUnpin for P2pCertificate<'a>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
&'a [u8]: UnsafeUnpin,
Vec<u8>: UnsafeUnpin,
PhantomData<RelativeDistinguishedName<'a>>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
PhantomData<X509Extension<'a>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
AffinePoint: UnsafeUnpin,
AffinePoint<NistP256>: UnsafeUnpin,
impl<'a> UnwindSafe for P2pCertificate<'a>where
RawVecInner: UnwindSafe,
&'a [u8]: UnwindSafe,
Vec<u8>: UnwindSafe,
NonZero<i32>: UnwindSafe,
NonZero<usize>: UnwindSafe,
&'a str: UnwindSafe,
&'a [u8; 32]: UnwindSafe,
AffinePoint: UnwindSafe,
AffinePoint<NistP256>: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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