This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients flox, giampaolo.rodola, janssen, pitrou, vstinner
Date 2010-03-12.00:53:35
SpamBayes Score 6.035271e-09
Marked as misclassified No
Message-id <1268355217.49.0.850120906422.issue8108@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-03-12 00:53:37vstinnersetrecipients: + vstinner, janssen, pitrou, giampaolo.rodola, flox
2010-03-12 00:53:37vstinnersetmessageid: <1268355217.49.0.850120906422.issue8108@psf.upfronthosting.co.za>
2010-03-12 00:53:35vstinnerlinkissue8108 messages
2010-03-12 00:53:35vstinnercreate