code: def _ipaddress_match(ipname, host_ip):
      
      # OpenSSL may add a trailing newline to a subjectAltName's IP address
      ip = ipaddress.ip_address(six.text_type(ipname.rstrip()))
      return ip == host_ip
docs: Exact matching of IP addresses.
  
      RFC 6125 explicitly doesn't define an algorithm for this
      (section 1.7.2 - "Out of Scope").