[Python-Dev] SSL bug in socketmodule
zaril@walla.co.il
zaril@walla.co.il
Fri, 18 Jul 2003 03:42:08 +0300
--------=_WallaWebMail_38929_6299_Part_1000
Content-Type: text/plain
Hi,
I recently came across a bug in the SSL code in Modules/socketmodule.c.
Most of the SSL functions support python threads, but the the constructor function for the SSL session
does not.
This can hang a multi threaded application if the SSL_connect stalls / hangs / takes a really long time etc.
In my application, for example, this prevented me from cancelling an SSL connection to a badly routed destination,
since the GUI hanged.
Once I enabled threading support in that function in socketmodule.c, the problem was fixed.
Is there any reason for the SSL constructor to be thread unsafe?
Just thought I'd let you know.
PS: I'm not a subcriber to python-dev, could someone update me if / how this was resolved?
-----------------------------------------------------------------------
Walla! Mail, Get Your Private, Free E-mail from Walla! at:
http://mail.walla.co.il
--------=_WallaWebMail_38929_6299_Part_1000
Content-Type: text/html
<table width=100% dir="ltr"><tr><td><DIV name="wrteplaceholder">Hi,</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">I recently came across a bug in the SSL code in Modules/socketmodule.c.</DIV>
<DIV name="wrteplaceholder">Most of the SSL functions support python threads, but the the constructor function for the SSL session</DIV>
<DIV name="wrteplaceholder">does not. </DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">This can hang a multi threaded application if the SSL_connect stalls / hangs / takes a really long time etc.</DIV>
<DIV name="wrteplaceholder">In my application, for example, this prevented me from cancelling an SSL connection to a badly routed destination,</DIV>
<DIV name="wrteplaceholder">since the GUI hanged.</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">Once I enabled threading support in that function in socketmodule.c, the problem was fixed. </DIV>
<DIV name="wrteplaceholder">Is there any reason for the SSL constructor to be thread unsafe?</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">Just thought I'd let you know.</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">PS: I'm not a subcriber to python-dev, could someone update me if / how this was resolved?</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">
<HR SIZE=1>
</DIV></td></tr></table>
<br>
<hr size=1 noshade>
Walla! Mail, Get Your Private, Free E-mail from Walla! at:<br>
<a href="http://mail.walla.co.il">http://mail.walla.co.il</a><br>
--------=_WallaWebMail_38929_6299_Part_1000--