summaryrefslogtreecommitdiffstats
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-06-14 13:30:53 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-06-14 13:30:53 (GMT)
commit1867f244168b0f809c4b8796e374e68c21ba880f (patch)
tree8b93e1e58ad41cdab30973483d4ad6e9ccc82116 /Lib/httplib.py
parentbc122625937ab4c8ff6c8d10e835bd17656ec6fd (diff)
downloadcpython-1867f244168b0f809c4b8796e374e68c21ba880f.zip
cpython-1867f244168b0f809c4b8796e374e68c21ba880f.tar.gz
cpython-1867f244168b0f809c4b8796e374e68c21ba880f.tar.bz2
Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.
Fixes #754447.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index efd4842..7eb9ad7 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -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)