mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge 3.4 (#22921)
This commit is contained in:
commit
f9284ae8ed
16 changed files with 24 additions and 79 deletions
|
@ -1288,10 +1288,9 @@ else:
|
|||
server_hostname = self._tunnel_host
|
||||
else:
|
||||
server_hostname = self.host
|
||||
sni_hostname = server_hostname if ssl.HAS_SNI else None
|
||||
|
||||
self.sock = self._context.wrap_socket(self.sock,
|
||||
server_hostname=sni_hostname)
|
||||
server_hostname=server_hostname)
|
||||
if not self._context.check_hostname and self._check_hostname:
|
||||
try:
|
||||
ssl.match_hostname(self.sock.getpeercert(), server_hostname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue