[Patches] [ python-Patches-452110 ] socketmodule ssl: server & thread
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 16 Oct 2001 03:21:39 -0700
Patches item #452110, was opened at 2001-08-17 08:10
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452110&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jozef Hatala (jhatala)
Assigned to: Jeremy Hylton (jhylton)
Summary: socketmodule ssl: server & thread
Initial Comment:
Simple enhancement to the SSL support in module socket
:
- support for writing SSL servers (as well as clients)
- Py_*_ALLOW_THREADS arround blocking calls to openssl
- rsa temp key to work with older export netscape
- renamed attribute server to peer
This patch allows for powerfull application servers
like the following one to be accessed with "netscape
https://localhost:1443/"
from socket import *
p=socket(AF_INET,SOCK_STREAM)
p.bind(('localhost',1443))
p.listen(1)
while 1 :
s,a = p.accept()
c = sslserver(s,'server.key','server.crt')
print "They said:", c.read()
c.write('HTTP/1.0 200 OK\r\n')
c.write('Content-Type: text/plain\r\n\r\n** Hi!
**')
c.close()
TODO: a kind of makefile() on the ssl object like on a
socket would be welcome.
Have fun,
jh
----------------------------------------------------------------------
>Comment By: Jozef Hatala (jhatala)
Date: 2001-10-16 03:21
Message:
Logged In: YES
user_id=300564
I'll submit a simple test with certificates and an enhanced
patch for 2.2a2 (does not patch cleanly any more) soon (this
week) [time and inet access issues].
I haven't written any doc. There was none for ssl. I know
that is no excuse...
Does some-one volonotere?
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2001-10-11 09:13
Message:
Logged In: YES
user_id=31392
Jozef-- are you going to contribute tests and documentation?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-18 23:17
Message:
Logged In: YES
user_id=6380
Nice, but where's the documentation? (Thanks for the
docstrings though!) And the test suite?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452110&group_id=5470