Skip to main content

peer_id_from_certs

Function peer_id_from_certs 

Source
pub(crate) fn peer_id_from_certs(certs: &[CertificateDer<'_>]) -> Option<PeerID>
Expand description

Derive the peer id from a peer’s certificate chain post-handshake. Reuses verify_cert so the validation rules stay in one place. Returns None if the chain is empty or the cert lacks our extension.