Simple HTTPS Server

Trent Mick trentm at ActiveState.com
Tue Dec 17 14:11:11 EST 2002


[Sergio Lobo wrote]
> I use a CustomHTTPServer.py and the CGIHTTPServer.py in a production system.
> Python is really amazing!!! I just have no idea how to extend the code in
> order to handle SSL ServerSockets. If you have any piece of code, that would
> be really helpful.

You will have to obtain OpenSSL (www.openssl.org), compile it, and
re-build Python's _socket.pyd (if you are on Windows) or _socket.so (if
you are on Linux) with SSL support. On Linux setup.py is used to build
_socket.so (among other extensions). If it finds built OpenSSL libs it
will compile in SSL support. On Windows you have to get the _socket.dsp
project to define USE_SSL and include the openssl include directory when
compiling and links with the OpenSSL .lib files when linking.

I _thought_ you could find replacement _socket.pyd's on some site but I
can't find them anymore.

Trent


-- 
Trent Mick
TrentM at ActiveState.com




More information about the Python-list mailing list