[Patches] [ python-Patches-452110 ] socketmodule ssl: server & thread
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 17 Aug 2001 08:10:02 -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
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jozef Hatala (jhatala)
Assigned to: Nobody/Anonymous (nobody)
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
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452110&group_id=5470