Skip to main content

matches_ip

Function matches_ip 

Source
pub fn matches_ip(cert_ip: &IpAddr, client_ip: &IpAddr) -> bool
Expand description

Check whether a certificate iPAddress SAN matches a client IP address.

RFC 6125 Section 6.5.2: iPAddress SANs contain the binary encoding of the IP address (4 bytes for IPv4, 16 bytes for IPv6). Matching is an exact binary comparison — no CIDR or subnet matching.