Exact matching of IP addresses. RFC 6125 explicitly doesn't define an algorithm for this (section 1.7.2 - "Out of Scope").
(cert_ipaddress, host_ip)
| 362 | |
| 363 | |
| 364 | def _ipaddress_match(cert_ipaddress, host_ip): |
| 365 | """Exact matching of IP addresses. |
| 366 | |
| 367 | RFC 6125 explicitly doesn't define an algorithm for this |
| 368 | (section 1.7.2 - "Out of Scope"). |
| 369 | """ |
| 370 | # OpenSSL may add a trailing newline to a subjectAltName's IP address, |
| 371 | # commonly with IPv6 addresses. Strip off trailing \n. |
| 372 | ip = _inet_paton(cert_ipaddress.rstrip()) |
| 373 | return ip == host_ip |
| 374 | |
| 375 | |
| 376 | DefaultVerifyPaths = namedtuple("DefaultVerifyPaths", |
nothing calls this directly
no test coverage detected
searching dependent graphs…