[Python-bugs-list] [Bug #123924] Windows - using OpenSSL, problem with socket in httplib.py
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 30 Nov 2000 06:11:12 -0800
Bug #123924, was updated on 2000-Nov-30 06:11
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Windows - using OpenSSL, problem with socket in httplib.py
Details: We found that when compiling python with USE_SSL on Windows, an exception occurred on the line:
ssl = socket.ssl(sock, self.key_file, self.cert_file)
The socket.ssl function expected arg 1 to be a socket object and not an instance of a class. We changed it to the following, which resolved the problem. However, this is not a generic solution and breaks again under Linux.
on class HTTPSConnection:
def connect(self):
"Connect to a host on a given (SSL) port."
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((self.host, self.port))
ssl = socket.ssl(sock._sock, self.key_file, self.cert_file)
self.sock = FakeSocket(sock, ssl)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=123924&group_id=5470