[Twisted-Python] examples/echoserv_ssl.py, win32

Jp Calderone exarkun at intarweb.us
Sun May 4 23:13:09 EDT 2003


On Sun, May 04, 2003 at 07:32:58PM -0400, Eric C. Newton wrote:
> Windows ME (yes, Windows ME, the trashy one)
> Python 2.2.2
> Twisted 1.0.4
> pyOpenSSL-0.4.1.win32-py2.2    (from sourceforge)
> OpenSSL 0.9.7b

  Current CVS Twisted has extensively refactored SSL support.  

> 
> After fixing the reported bug in echoserv_ssl.py, I ran this at a
> cygwin prompt:
> 
> 	$ python echoserv_ssl.py
> 
> I tried running echoclient, and I get a dialog box saying:
> 
>        Python has caused an error in SSLEAY32.DLL. 
>        Python will now close.
>        
>        If you continue to experience problems,
>        try restarting your computer.
> 
> After clicking "OK" the echoclient_ssl quits. Alright... I won't do
> that.  But I also get a stack trace in the server, which reproduces
> the error I get in my actual application.

  Ouch. :o

> 
> I don't really want an SSL client, I want an SSL server.  So I point
> InternetExplorer to: https://127.0.0.1:8000.  Same stack trace.  Here
> it is:
> 
>     2003/05/04 19:28 [-] Log opened.
>     2003/05/04 19:28 [*echo-ssl*] twisted.internet.protocol.Factory starting on 8000
>     2003/05/04 19:28 [*echo-ssl*] Starting factory <twisted.internet.protocol.Factory instance at 0x00B56B40>
>     2003/05/04 19:29 [twisted.internet.protocol.Factory] Traceback (most recent call last):
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]   File "C:\PYTHON22\lib\site-packages\twisted\internet\app.py", line 869, in run
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]     reactor.run(installSignalHandlers=installSignalHandlers)
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]   File "C:\PYTHON22\lib\site-packages\twisted\internet\default.py", line 123, in run
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]     self.mainLoop()
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]   File "C:\PYTHON22\lib\site-packages\twisted\internet\default.py", line 134, in mainLoop
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]     self.doIteration(t)
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]   File "C:\PYTHON22\lib\site-packages\twisted\internet\default.py", line 469, in doSelect
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]     why = getattr(selectable, method)()
>     2003/05/04 19:29 [twisted.internet.protocol.Factory] --- <exception caught here> ---
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]   File "C:\PYTHON22\lib\site-packages\twisted\internet\ssl.py", line 269, in doRead
>     2003/05/04 19:29 [twisted.internet.protocol.Factory]     skt, addr = self.socket.accept()
>     2003/05/04 19:29 [twisted.internet.protocol.Factory] SSL.WantReadError: 


  Current CVS of Twisted has somewhat dramatically refactored SSL support. 
Would it be possible for you to grab it and see if the same problem occurs?

  Looking at the SSL code for 1.0.4, it seems like the "except SSL.Error:"
around the accept() call should be catching SSL.WantReadError.  Can you
check the output of this?

    from OpenSSL import SSL
    print isinstance(SSL.WantReadError, SSL.Error)

  Jp

-- 
"Minerals are inexhaustible and will never be depleted. A stream of
investment creates additions to proved reserves, a very large in-ground
inventory, constantly renewed as it is extracted... How much was in the
ground at the start and how much will be left at the end are unknown and
irrelevant."  -- Morry Adelman, World Renowned Economist
-- 
 up 3 days, 0:38, 2 users, load average: 0.18, 0.19, 0.13
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030504/4bc3ce2d/attachment.pgp 


More information about the Twisted-Python mailing list