Pure Python HTTPS Server

Trevor Perrin trevp at trevp.net
Fri Feb 27 20:01:08 CET 2004

At 07:11 AM 2/27/2004 -0600, A.M. Kuchling wrote:

>On Thu, 26 Feb 2004 14:45:56 -0800,
>         Trevor Perrin <trevp at trevp.net> wrote:
> > tlslite lets you run Python's BaseHTTPServer or SimpleHTTPServer with 
> > http://trevp.net/tlslite/
>Would tlslite be able to handle TLS asynchronously?

Not at the moment, I don't think.  Right now it assumes it has a blocking 
socket, and when you call TLSConnection.read() it blocks until one (or 
more) TLS records has been fully received.

I'm a little fuzzy about asynch stuff.  I don't think I can emulate a 
file-descriptor to make it work with select().  What about an interface 
where you can say "get any available bytes", with no blocking?  Is that on 
the right track?

>   I've been wanting to
>add SSL/TLS support to Medusa, but didn't want to require external packages
>such as PyOpenSSL.

It'll be slow, of course, with pure-Python ciphers:
  - ~25 KB/sec AES, on a P4 1.7 Ghz
  - ~250 KB/sec RC4, " "

Are you and Paul still looking at adding ciphers to stdlib?  That would 
make me really, really happy :-)....


More information about the Python-list mailing list