nemunaire added the comment:
The documentation already recommends to use SSLContext.wrap_socket(), but it
didn't cover all use cases. Eg. I use multiple inheritance to handle both
socket and SSLSocket inside a factory pattern, in order to override some
methods defined in both classes.
Changes by nemunaire :
Removed file:
http://bugs.python.org/file43927/fix_sslsocket_init_without_socket_3_3-3_6.patch
___
Python tracker
<http://bugs.python.org/issue27
New submission from nemunaire:
I got this stacktrace:
File "test_ssl.py", line 3, in
sock = ssl.SSLSocket(server_hostname="docs.python.org")
File "/usr/lib/python3.4/ssl.py", line 536, in __init__
if sock.getsockopt(SOL_SOCKET, SO_TYPE) != SOCK_STR
Changes by nemunaire :
--
title: Cannot create raw ssl.SSLSocket -> Cannot create ssl.SSLSocket without
existing socket
___
Python tracker
<http://bugs.python.org/issu
nemunaire added the comment:
Here is a new patch with tests on constructor.
The patch on the feature is quite different: instead of testing for None
socket, I choose to delay the != SOCK_STREAM check in the later condition, when
we know we treat a socket.
Tests include different constructor
Changes by nemunaire :
Removed file:
http://bugs.python.org/file43900/fix_sslsocket_init_without_socket_3.3-3_6.patch
___
Python tracker
<http://bugs.python.org/issue27