> Another problem is that Twisted doesn't yet support SSL on adopted sockets.

I did this by hand:

# Suppose your create/bind/list your listen_socket, and
# its file descriptor is listen_socket_fd


site = server.Site(MyHttpsSite())

cert = '/path/to/my/cert'
key = '/path/to/my/key'

ctx = DefaultOpenSSLContextFactory(key, cert)
tlsFactory = tls.TLSMemoryBIOFactory(ctx, False, site)
p = tcp.Port._fromListeningDescriptor(reactor,
                                             listen_socket_fd,
                                             socket.AF_INET,
                                             tlsFactory)
p._type = 'TLS'
p.startListening()

os.close(listen_socket_fd)
reactor.run()


_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to