pub struct PeerCerts(pub Arc<[CertificateDer<'static>]>);Available on crate features
server-tls and server only.Expand description
TLS client certificate chain presented by the peer (leaf first).
Inserted by the built-in Server’s TLS accept loop and by
connectrpc::axum::serve_tls when the rustls::ServerConfig requests
client authentication and the peer presents a valid chain. Absent on
plaintext connections or when the client presents no certificate.
Handlers read it via
RequestContext::peer_certs (or
ctx.extensions().get::<PeerCerts>()).
The Arc makes per-request insertion cheap: all requests on a
connection share one chain, so this is a refcount bump, not a copy.
Tuple Fields§
§0: Arc<[CertificateDer<'static>]>Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerCerts
impl RefUnwindSafe for PeerCerts
impl Send for PeerCerts
impl Sync for PeerCerts
impl Unpin for PeerCerts
impl UnsafeUnpin for PeerCerts
impl UnwindSafe for PeerCerts
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