Message73434
python 2.6's compatibility socket.ssl() method does not handle 'sock'
parameter in the same way.
in 2.5, ssl() looked like this:
def ssl(sock, keyfile=None, certfile=None):
if hasattr(sock, "_sock"):
sock = sock._sock
return _realssl(sock, keyfile, certfile)
in 2.6 the call is handed to ssl.sslwrap_simple, which then blindly does
_ssl.sslwrap(sock._sock, 0, keyfile, certfile, CERT_NONE,
PROTOCOL_SSLv23, None)
instead of checking whether the sock is the socket itself or the socket
object.
This causes code that passes the socket directly to fail with
"AttributeError: '_socket.socket' object has no attribute '_sock'
"
the attached patch fixes the behavior. |
|
Date |
User |
Action |
Args |
2008-09-19 17:49:36 | matejcik | set | recipients:
+ matejcik |
2008-09-19 17:49:35 | matejcik | set | messageid: <1221846575.92.0.833754739866.issue3910@psf.upfronthosting.co.za> |
2008-09-19 17:49:35 | matejcik | link | issue3910 messages |
2008-09-19 17:49:34 | matejcik | create | |
|