pub struct PeerId {
pub cert: bool,
pub subject: Option<String>,
pub sans: Vec<String>,
}Expand description
A verified mTLS peer’s identity, surfaced to trust classification (RFC 0029 §10.3). All-empty for a plain / no-client-cert connection. rustls has already verified the chain; these fields are only read from the leaf certificate.
Fields§
§cert: boolA verified client certificate was presented (mutual TLS).
subject: Option<String>The leaf certificate’s subject CN, if any.
sans: Vec<String>The leaf certificate’s SANs (DNS / URI / IP); a SPIFFE X.509-SVID’s
spiffe://… arrives here as a URI SAN.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerId
impl RefUnwindSafe for PeerId
impl Send for PeerId
impl Sync for PeerId
impl Unpin for PeerId
impl UnsafeUnpin for PeerId
impl UnwindSafe for PeerId
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