Skip to content
Prev Previous commit
Next Next commit
Update ssl.py
  • Loading branch information
terryjreedy authored Jun 12, 2021
commit 10d8b7857006aa65f84c67db3eb228a4171692de
2 changes: 1 addition & 1 deletion Lib/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _ipaddress_match(cert_ipaddress, host_ip):
(section 1.7.2 - "Out of Scope").
"""
# OpenSSL may add a trailing newline to a subjectAltName's IP address,
# commonly worth IPv6 addresses. Strip off trailing \n.
# commonly with IPv6 addresses. Strip off trailing \n.
ip = _inet_paton(cert_ipaddress.rstrip())
return ip == host_ip

Expand Down