[Twisted-web] Twisted Web with SSL?
Andrea Arcangeli
andrea at cpushare.com
Sat Feb 5 08:29:56 MST 2005
On Fri, Feb 04, 2005 at 02:58:47PM -0500, James Y Knight wrote:
> # Add two more lines to start a HTTPs port. (you'll need to have made
> your ssl key/crt beforehand)
Here an example of this (which is the only non trivial bit):
from twisted.internet import ssl
from OpenSSL import SSL
ssl_context = ssl.DefaultOpenSSLContextFactory(config.get('https_privkey'),
config.get('https_cert'),
SSL.SSLv23_METHOD,)
internet.SSLServer(int(config.get('https_port')), nevow_site,
ssl_context,
backlog = int(config.get('https_backlog')),
interface = config.get('https_interface'),).setServiceParent(service_collection)
More information about the Twisted-web
mailing list