diff --git a/src/rust/cryptography-x509-verification/src/policy/mod.rs b/src/rust/cryptography-x509-verification/src/policy/mod.rs index f124d17d3a69..2703e868dbde 100644 --- a/src/rust/cryptography-x509-verification/src/policy/mod.rs +++ b/src/rust/cryptography-x509-verification/src/policy/mod.rs @@ -183,7 +183,7 @@ impl Subject<'_> { DNSPattern::new(pattern.0).map_or(false, |p| p.matches(name)) } (GeneralName::IPAddress(addr), Self::IP(name)) => { - IPAddress::from_bytes(addr).map_or(false, |addr| addr == *name) + IPAddress::from_bytes(addr) == Some(*name) } _ => false, }