STINNER Victor <victor.stin...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue8108> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com