[New-bugs-announce] [issue13942] ssl.wrap_socket does not work on socket.socketpair()'s

weary report at bugs.python.org
Sat Feb 4 14:38:21 CET 2012


New submission from weary <bugs.python at weary.nl>:

ssl.wrap_socket does not work on socket.socketpair()'s

note, this is the same as issue 1552, but for python 2.7. Also, the supplied patch does not work (patch results in: TypeError: must be _socket.socket, not _socketobject)


>>> import ssl
>>> import socket
>>> s1, s2 = socket.socketpair()
>>> ssl.wrap_socket(s1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/ssl.py", line 372, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 105, in __init__
    socket.__init__(self, _sock=sock._sock)
AttributeError: '_socket.socket' object has no attribute '_sock'

----------
components: IO
messages: 152621
nosy: weary
priority: normal
severity: normal
status: open
title: ssl.wrap_socket does not work on socket.socketpair()'s
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13942>
_______________________________________


More information about the New-bugs-announce mailing list