mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.
Fixes #754447.
This commit is contained in:
parent
bc12262593
commit
1867f24416
2 changed files with 7 additions and 14 deletions
|
@ -956,10 +956,7 @@ class HTTPSConnection(HTTPConnection):
|
|||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.connect((self.host, self.port))
|
||||
realsock = sock
|
||||
if hasattr(sock, "_sock"):
|
||||
realsock = sock._sock
|
||||
ssl = socket.ssl(realsock, self.key_file, self.cert_file)
|
||||
ssl = socket.ssl(sock, self.key_file, self.cert_file)
|
||||
self.sock = FakeSocket(sock, ssl)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue