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.

classification
Title: test_ssl.py doesn't properly test ssl integration with asyncore
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, janssen, josiah.carlson, josiahcarlson, pitrou
Priority: normal Keywords: patch

Created on 2008-09-18 13:35 by giampaolo.rodola, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_ssl.patch giampaolo.rodola, 2008-09-18 13:35
unnamed janssen, 2008-09-19 20:29
Messages (5)
msg73382 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2008-09-18 13:35
The AsyncoreEchoServer class in test_ssl.py doesn't actually test a real
integration with asyncore since the do_handshake_on_connect flag is set
to True and hence temporarily blocks the asyncore polling loop as long
as the ssl handshake finishes.
The patch in attachment subclasses some asyncore internals so that a
non-blocking ssl handshake takes place.

Tested under Windows XP SP3, Python 2.6rc1.
msg73398 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2008-09-18 20:50
The server wasn't meant to be non-blocking.  The non-blocking test is
performed when the client (which is non-blocking) connects to it.
msg73417 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2008-09-19 02:33
Being able to test the async features of both sides of the SSL 
connection is a good thing.

Also, the subclass provides a useful example for users who want to use 
asyncore and ssl servers without blocking on an incoming connection.
msg73441 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2008-09-19 20:29
Sure, no argument.  I was just making clear what was going on.

Bill

On Thu, Sep 18, 2008 at 7:33 PM, Josiah Carlson <report@bugs.python.org>wrote:

>
> Josiah Carlson <josiahcarlson@users.sourceforge.net> added the comment:
>
> Being able to test the async features of both sides of the SSL
> connection is a good thing.
>
> Also, the subclass provides a useful example for users who want to use
> asyncore and ssl servers without blocking on an incoming connection.
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue3899>
> _______________________________________
>
msg115551 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-04 00:35
This has been integrated long ago.
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48149
2010-09-04 00:35:25pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg115551

resolution: out of date
2008-09-19 20:29:27janssensetfiles: + unnamed
messages: + msg73441
2008-09-19 02:33:04josiahcarlsonsetmessages: + msg73417
2008-09-18 20:50:25janssensetmessages: + msg73398
2008-09-18 13:35:50giampaolo.rodolacreate