pub struct PeerIdentity { /* private fields */ }Expand description
A peer’s validated client-certificate chain from the mTLS handshake.
Returned by crate::Request::peer_identity when the peer presented a
certificate that chained to a configured Server::root. Owns the chain
(leaf first) so callers can inspect it, e.g. expiry,
without re-parsing the type-erased QUIC identity.
Implementations§
Source§impl PeerIdentity
impl PeerIdentity
Sourcepub fn chain(&self) -> &[CertificateDer<'static>]
pub fn chain(&self) -> &[CertificateDer<'static>]
The validated certificate chain, leaf first.
Exposes rustls::pki_types::CertificateDer directly (already part of
this crate’s public API via the rustls re-export), so a major rustls
bump is a breaking change for consumers of this method.
Sourcepub fn expiry(&self) -> Option<SystemTime>
pub fn expiry(&self) -> Option<SystemTime>
The leaf certificate’s notAfter, if it parses. A notAfter before the
Unix epoch is reported as None.
Auto Trait Implementations§
impl Freeze for PeerIdentity
impl RefUnwindSafe for PeerIdentity
impl Send for PeerIdentity
impl Sync for PeerIdentity
impl Unpin for PeerIdentity
impl UnsafeUnpin for PeerIdentity
impl UnwindSafe for PeerIdentity
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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