[issue8108] test_ftplib fails with OpenSSL 0.9.8m

STINNER Victor report at bugs.python.org
Fri Mar 12 01:53:37 CET 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

There are different kind of bugs, but all of them are related to SSL_Shutdown(). It depends on the socket timeout:
 - blocking socket: nothing special (no change from previous OpenSSL version)
 - timeout or non blocking socket: if SSL_shutdown() returns -1 and SSL_get_error()==SSL_ERROR_WANT_READ, we have to read bytes from the socket (to read the "close" notify acknowledge?)

I did't understood how much bytes have to be read, nor if we have to check the socket status using select() or not.

Attached patch is a draft to demonstrate how the bug have to be fixed, but I don't know OpenSSL nor asynchat enough to write a good fix. TODO: unwrap() returns None on SSL_shutdown() error and if the socket has been closed.

----------
keywords: +patch
Added file: http://bugs.python.org/file16527/ssl_shutdown.patch

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


More information about the Python-bugs-list mailing list