Author tinolange
Recipients
Date 2004-04-30.22:14:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Hi!

Unfortunately the applied patches #675750 and #676472
(End of January by G. Talvola / B. Laurie / G. v.
Rossum) for timeout-sockets in version 1.09 and 1.10 to
Modules/_ssl.c broke the nonblocking SSL I/O.

In fact sslobj.read() became *always* blocking -
whether the underlying socket is blocking or
nonblocking doesn't matter at all.

In Python < 2.3 this has worked correctly, starting
with 2.3, 2.3.x up to the current CVS it doesn't work
anymore.

Attached is a sample:

0) [ Preparation ]
Please run stunnel on your machine to have a SSL service:
/usr/sbin/stunnel -p /path/to/some/cert -f -d 4711 -r 4712

1) [ Server ]
Please run the easy server.py 

2) [Client showing the bug]
Please run the client - and see how it hangs when you
use Python2.3.

Also attached is a diff against the current _ssl.c
which shows how to correct that behaviour while also
having the possibilities from the above timeout patches.

I carefully tested it,  please review and test yourself
and finally check-in.

If you have questions, please don't hesitate to ask me.

I really would like to see that not only in 2.4, but
also (if possible together with patch #909007 from S.
Nicolary) in a 2.3.4 release. Otherwise 2.3.x wasn't at
all able to handle nonblocking SSL connections properly.

Thanks and cheers,

Tino
History
Date User Action Args
2007-08-23 15:37:30adminlinkissue945642 messages
2007-08-23 15:37:30admincreate