[New-bugs-announce] [issue10808] ssl unwrap fails with Error 0
Florian Apolloner
report at bugs.python.org
Sun Jan 2 20:52:17 CET 2011
New submission from Florian Apolloner <florian at apolloner.eu>:
If I use the server code in the attachment I get this error in unwrap:
Traceback (most recent call last):
File "server.py", line 23, in <module>
deal_with_client(connstream)
File "server.py", line 13, in deal_with_client
s = connstream.unwrap()
File "/usr/lib/python3.1/ssl.py", line 302, in unwrap
s = self._sslobj.shutdown()
socket.error: [Errno 0] Error
This error message is imo far from optiomal as it gives no clue whatsoever. My Openssl version is: 'OpenSSL 0.9.8o 01 Jun 2010'. Aside from that connstream.close() doesn't close the underlying socket (as seen in http://bugs.python.org/issue10127 Reproduceable with py2.6 and 2.7). The only way to properly close the connection now is:
connstream.close(); newsocket.close()
or
del newsocket; connstream.close()
Maybe the docs should point that out more prominent.
If you need more info just tell me.
----------
components: None
files: server.py
messages: 125081
nosy: apollo13
priority: normal
severity: normal
status: open
title: ssl unwrap fails with Error 0
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file20227/server.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10808>
_______________________________________
More information about the New-bugs-announce
mailing list