Oct. 1, 2003
6:43 a.m.
Thomas Weholt wrote:
Can anybody provide a working, simple example of a SSL-capable web-server using Twisted ? Any hints or clues regarding installation of openssl or other required library is also interesting.
twisted-web deb http://twistedmatrix.com/~moshez/apt/ ./ cvs -d :ext:cvs.twistedmatrix.com:/cvs co TwistedWebDeb Put this in /etc/twisted-web/local.d/20ssl from twisted.internet import reactor, ssl from twisted.web import static, server port = 443 ctx = ssl.DefaultOpenSSLContextFactory( '/etc/twisted-web/ssl/private/privkey.pem', '/etc/twisted-web/ssl/cert.pem') application.listenSSL(port, site, ctx) Of course, you'll need to create the SSL key with openssl.